Wednesday, January 5, 2011

How to give permissions to write to the App_Data folder

If you get an error when trying to write programatically to the App_Data folder, that means the web application doesn't have the rights to write on it.
To resolve the issue, you should grant Full Control permission to ASPNET, NETWORK SERVICE and Internet Guest Account system accounts over App_Data folder:

1. In Windows Explorer, go to the folder, right-click on App_Data folder and choose Properties:


2. In General tab, make sure "Read-only" option is not set:


3. In Security tab, gran "Full Control" permission to ASPNET, NETWORK SERVICE and Internet Guest Account accounts:


4. Click OK. Now, ASP.NET should have enough permissions to read/write files and folders in the App_Data folder.

No comments:

Post a Comment