且构网

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

asp.net网站可以访问本地硬盘吗?

更新时间:2023-12-02 15:35:16

使用服务器端代码,您可以访问服务器主机的本地硬盘驱动器,但只有为您的站点配置的根目录下的文件系统部分。而且您无法访问客户端系统。 (严格地说,在Windows上,对于某些浏览器来说,浏览器中托管的ActiveX组件有一种不安全的东西,但是任何精通安全的用户都知道你这样做了,他们可能不会回到你的网站不要做坏事。:-))



-SA
With the server-side code, you can access the local hard drive of the server's host, but only the part of the file system under the root directory configured for your site. And you cannot access a client system. (Strictly speaking, on Windows, for some browsers, there is such a dirty an insecure thing as ActiveX components hosted in the browser, but is any security-savvy users learn that you do it, they probably won't come back to your site. Don't do evil. :-))

—SA