开发者

Setting up permissions to allow ASP.net code behind to create folders on Server

I have an A开发者_开发百科SP.net website that will allow users to upload images using a third party webHTMLEditor. I have the overall folder created and the editor finds it but when I try to dynamically create a user specific folder it throws "WinIOError. Access to the path '../common/upload/1' is denied."

I'm not very familiar with setting up permissions and IIS on the server side so I was hoping someone could run me through how to give ASP.net code behind the ability to create the numbered folder portion of the "../common/upload/1" path.

I'm using Windows Server 2008 and IIS 7.


You just need to set the proper filesystem level permissions for the user context the site is running in. So if this is a site open to random visitors, you would look at the settings for your anonymous user account (IUSR). If you are requiring user authentication, then you would need to set the permissions based on the user or group(s) they belong to. Note, your filesystem permissions pertain to the same permissions as if you are configuring for file access on a server for a user on your network/machine. Thus this is not the same thing as the IIS server access permissions, so to make sure you are not looking at the wrong permissions, do not use IIS manager.

The following article may help with some more specific details: http://learn.iis.net/page.aspx/583/secure-content-in-iis-through-file-system-acls/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜