繁体   English   中英

使用 .net v4 模拟

[英]Impersonation with .net v4

我有一个 .net v4 web 应用程序,它使用模拟作为我们的 web 服务器和数据库服务器位于不同的物理服务器上。

当我们尝试运行应用程序时,我们会收到服务器错误

    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 框架文件夹中的“临时 ASP.NET”文件夹授予模拟用户权限。

所以我的问题是为什么我们必须为 .net v4 授予此文件夹的权限,但对于任何更少的它都可以正常工作?

现在已对此进行排序,发现它是全局 web 配置中的服务器配置问题。 我们应该一直使用 E 驱动器作为我们的编译目录,而不是 C 驱动器

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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