且构网

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

在文件夹中保存图像时的文件夹权限

更新时间:2022-11-05 09:09:15



此问题是由于文件夹访问权限所致.当您在IIS上托管应用程序时,它将在名为IUSER_machine的用户名下运行,它具有非常有限的访问权限,而在使用Visual Studio在本地计算机上运行代码的同时,Visual Studio将在对文件夹具有完全访问权限的本地admin用户下运行.

用于在服务器上运行应用程序

D:\ PLESKVHOSTS \ vhosts \ hoteldeluxe.com \ httpdocs \ dbImage

需要以下用户的权限

-IUSER_machin名称
-ASPNET

右键单击文件夹,然后转到共享和安全性
在安全性"选项卡中,添加提供的用户并为该用户提供完全访问权限.
Hi,

This issue is due to permission of the folder access. when you host your application on IIS it will run under the user called IUSER_machine name it has very restricted access, where as while running the code on the local machine with visual studio which will run under the local admin user which has complete access for the folders.

For running the application on the server

D:\PLESKVHOSTS\vhosts\hoteldeluxe.com\httpdocs\dbImage

needs the permission for the following users

- IUSER_machin name
- ASPNET

Right click on the Folder and go to sharing and security
in Security Tab add the provided users and and provide the full access for this users.