开发者

Impersonation with .net v4

I have a .net v4 web app which uses impersonation as our web server and database server are on separate physical servers.

When we attempt to run the application we receive a server error

    Could not load file or assembly '######' or one of its dependencies. Access is denied. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.IO.FileLoadException: Could not load file or assembly '######' or one of its dependencies. Access i开发者_开发问答s denied.

Looking at the stack trace it seems the application doesn't have access to

C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET 

If I grant the impersonation user permissions on this folder the application works fine. But if we compile the application down to 3.5, this obviously uses the .net 2 runtime and we don't have to give the impersonation user permissions on the folder "Temporary ASP.NET" in the .net 2 framework folder.

So my question is why do we have to give permissions on this folder for .net v4, but for anything less it works fine?


This is now sorted, it was found to be a server config issue within the global web config. We should have been using the E drive for our compliation directory and not the C drive

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜