廣告:
環(huán)境:asp.net mvc2.0 asp.net 3.5 sp1
win208 R2 服務(wù)器上面 System.Web.AspNetHostingPermission 類型的權(quán)限已失敗
“/”應(yīng)用程序中的服務(wù)器錯誤。
--------------------------------------------------------------------------------
安全性異常
說明: 應(yīng)用程序試圖執(zhí)行安全策略不允許的操作。要授予此應(yīng)用程序所需的權(quán)限,請與系統(tǒng)管理員聯(lián)系,或在配置文件中更改該應(yīng)用程序的信任級別。
異常詳細信息: System.Security.SecurityException: 請求“System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”類型的權(quán)限已失敗。
源錯誤:
執(zhí)行當前 Web 請求期間生成了未處理的異常?梢允褂孟旅娴漠惓6褩8櫺畔⒋_定有關(guān)異常原因和發(fā)生位置的信息。
堆棧跟蹤:
[SecurityException: 請求“System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”類型的權(quán)限已失敗。]
System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0
System.Reflection.Assembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) +42
System.Web.UI.Util.GetTypeFromAssemblies(ICollection assemblies, String typeName, Boolean ignoreCase) +145
System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError) +73
System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) +111
System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) +279
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.5466; ASP.NET 版本:2.0.50727.5456
解決方法:
1. 打開iis 選中該連接池。
2. 點擊選擇 高級設(shè)置。
3. 選擇 進程模型--》選擇標識 --》設(shè)置NetworkService
4. 確定 OK
廣告: