簡體   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