2010-02-26 49 views
1

我已經寫了一個ASP.NET WebForms應用程序,它使用了ASP.NET AJAX Toolkit。我已將MultiView控件放到Web窗體上,並且在Vista下運行時它工作正常。那麼,我不得不更換我的機器(高清失敗),我去了Windows 7旗艦版。我嘗試從系統中複製ASP.NET應用程序(在它最終失敗之前)並將它放到Windows 7機器上。我可以調出應用程序,轉到所有頁面,但帶有這些控件的頁面。當我這樣做時,出現以下錯誤:ASP.NET AJAX工具包的安全異常

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

發生了什麼事?我如何解決它?

回答

3

我能夠通過更改我的默認應用程序池上的高級設置來解決此問題,我的開發環境(本地計算機)。標題爲「過程模型」的部分有一個設置「加載用戶配置文件」。當我將其更改爲「真」時,問題停止發生。

+0

WOW,有趣!我必須檢查一下,謝謝Kevin G.因爲這個更改是針對默認應用程序池的,所以我認爲它會影響所有的ASP.NET應用程序,對嗎? – Rod 2010-03-09 20:28:21

+0

這似乎已經奏效!你是怎麼找到的? – Rod 2010-03-10 03:50:55

+0

大量的挖掘/試錯。 ;) – 2010-03-24 17:33:39