Search code examples
asp.netvisual-studio-2008ms-access-2003

IIS Permission Access on a App_Data Folder to read / write database


IIS 7.0 ( Windows 2003 Server )

I have deployed a ASP.Net ( VS 2008) Application on IIS. Application is trying to read MS Access DB, delete the existing Tables and again re extract the data to the MS Access DB.

Read & Write takes place on MS Access DB. Application works great from Source Code.

On deploying it on Windows XP or Windows 2003 Server IIS, Application fails to interact with MS Access DB and so it throws an Exception.

I realized this is causes because of Read & Write Access to MS Access DB which is located on the App_Data Folder.

How to enable Read and Write ( Admin ) Rights on the Deployed folder ?


Solution

  • A better answer for IIS 7.5+ (Windows Server 2008) is to allow write by the group "IIS_IUSRS". I believe this group even incorporates the IIS 8+ AppPool users, so its a much more durable way to ensure write access to App_Data

    C:\inetpub\wwwroot> icacls App_Data /grant IIS_IUSRS:M
    processed file: App_Data
    Successfully processed 1 files; Failed processing 0 files
    
    C:\inetpub\wwwroot>