开发者

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

开发者 https://www.devze.com 2023-03-03 16:24 出处:网络
After migrating an ASP.NET application to 4.0, i g开发者_JAVA技巧et a weird System.IO error: System.UnauthorizedAccessException: Access to the path \'xxxx\' is denied.

After migrating an ASP.NET application to 4.0, i g开发者_JAVA技巧et 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.

0

精彩评论

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