2011-07-20 25 views
1

我有一個.net v4網絡應用程序,它使用模擬作爲我們的Web服務器和數據庫服務器位於單獨的物理服務器上。使用.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的權限,但是對於任何少於它的工作正常?

+1

這有幫助嗎? http://msdn.microsoft.com/en-us/library/aa302435.aspx –

+2

相關:http://stackoverflow.com/questions/5239533/impersonation-in-net-crashes-when-reading-registry-keys- linklabel-securityexcep –

+0

這是現在排序的,它被發現是全球網絡配置中的服務器配置問題。我們應該使用E盤作爲我們的compliation目錄,而不是C盤。 – suggy1982

回答

0

這是現在排序,它被發現是全球網絡配置中的服務器配置問題。我們應該使用E盤作爲我們的編譯目錄,而不是C盤