且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在ASP.Net Web应用程序中打开文件

更新时间:2022-11-05 20:06:25

试想一下:你的本地应用程序在哪里运行?您的Web应用程序在哪里运行?安全性如何:您是否希望在网络服务器上运行的某些应用程序可以简单地访问您计算机上的任何文件?

因此,答案是:您不能这样做。幸运的!块引用>

Hi frnds,

I have a doubt regarding web application(VS 2012). In windows applications, there is possibility to open a file using the exe(ie, by right clicking the file(eg .txt file) and open with this application). In this way we can open any file in our windows application.

Is there any way to do this with ASP.Net web application ?
ie, I want to open a file in the web application by right clicking on the file and choose "Open with.."

Tanks in advance..

Just think about it: where does your local application run? And where does your Web Application run? And what about security: would you like that some application running somewhere on a server in the web could simply access any file on your computer?
So, the answer is: you cannot do so. Fortunately!