【发布时间】:2011-07-20 17:04:49
【问题描述】:
我有一个使用模拟的 .net v4 网络应用程序,因为我们的网络服务器和数据库服务器位于不同的物理服务器上。
当我们尝试运行应用程序时,我们会收到服务器错误
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 is denied.
查看堆栈跟踪似乎应用程序无权访问
C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET
如果我授予此文件夹的模拟用户权限,则应用程序可以正常工作。但是如果我们将应用程序编译到 3.5,这显然使用了 .net 2 运行时,我们不必授予模拟用户对 .net 2 框架文件夹中“Temporary ASP.NET”文件夹的权限。
所以我的问题是,为什么我们必须为 .net v4 授予此文件夹的权限,但如果没有任何权限,它就可以正常工作?
【问题讨论】:
-
现在已排序,发现是全局 Web 配置中的服务器配置问题。我们应该一直使用 E 盘作为我们的编译目录,而不是 C 盘。
标签: .net asp.net impersonation