且构网

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

asp.net中的createdirectory提供未经授权的问题

更新时间:2023-12-01 15:35:22

请确保ABC,BCD 文件夹是托管站点的(子文件夹)一部分. 如果没有,那么您将无法在其中创建文件夹..

解决方案:
创建一个站点并将其托管在IIS中的c://ABC文件夹中.并授予该文件夹的完全许可权,那么您可以从其他站点访问该文件夹.
Make sure that the ABC,BCD folder is part of(sub folder) the Hosted Site.
if not, then you wont be able to Create folder in it..

Solution:
Create a site and host it in the IIS for c://ABC folder. and give full permission for that folder, then you can access the folder from other site..


授予许可权还不够. Web应用程序在沙盒环境中执行,该环境不允许它们访问任何服务器端文件对象,但为您的站点配置的根目录下的对象除外.

—SA
Giving permission is not enough. Web applications are executed in the sandboxed environment which does not allow them to access any server-side file objects except those under the root directory configured for your site.

—SA