简体   繁体   中英

Weird System.IO error after migrating an asp.net 1.1 application to 4.0

After migrating an ASP.NET application to 4.0, i get a weird System.IO error: System.UnauthorizedAccessException: Access to the path 'xxxx' is denied.

Why is this weird.. the server is also running my 1.1 application, also hosted on IIS7, and working with the exact same folder (outside the application). NETWORK SERVICE has write access to this folder, and most of all, the 1.1 application just works and doesn't throw the exception.

I'm hosting more 4.0 websites, and never had this problem.

Hope someone can help me out!

give a full read/write and execute permission in that folder...

Does the V4 web application have "AppPool Identity" enabled>

If so you need to ensure the app pool user has appropriate access to the resources (application folder, database, ...) by the app pool identity and not Network Service.

See here for more details on assigning access to app pools. Note, most of the GUI approaches only work on Windows 7/Server 2008 R2 for IIS7.5; with Vista/Server 2008 for IIS 7.0 you'll need to use the command line. With SQL Server you'll need to use SQL statements to create logins/users that map to app pool identities (once created you can use the GUI to assign roles/access.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM