ApplicationPoolIdentity Does Not Have Write Permission to Asp.Net App_Data folder

Article translations Article translations
Close Close
Article ID: 2005172 - View products that this article applies to.
Expand all | Collapse all

Symptoms

A web application is created using Microsoft Visual Studio and then published to Microsoft Internet Information Services (IIS) 7.5.  As part of the application's request processing, it needs to write data to the App_Data folder on the server.  For example, the application uses a SQLDataSource or XMLDataSource.  When it attempts to do so, an error message similar to the following is displayed:

 

Exception Details: System.UnauthorizedAccessException: Access to the path '[path to App_Data folder]' is denied.

 

Cause

Beginning in IIS 7.5, the default identity for an application pool is ApplicationPoolIdentity.  When a web application is created using Visual Studio, the App_Data folder is not automatically configured to allow write access for ApplicationPoolIdentity.  Therefore the attempt to write to the App_Data folder will fail.

 

Resolution

To work around this behavior, grant both read and write ACL permissions to the ApplicationPoolIdentity (IIS APPPOOL\ApplicationPool) on the App_Data folder. 

 

More Information

ApplicationPoolIdentity is a Managed Service Account, which is a new concept introduced in Windows Server 2008 R2 and Windows 7.  For more information on Managed Service Accounts, please see the following link:

http://technet.microsoft.com/en-us/library/dd367859(WS.10).aspx

 

 

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2005172 - Last Review: October 30, 2009 - Revision: 2.0
APPLIES TO
  • Microsoft Internet Information Services 7.5
Keywords: 
KB2005172

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com