当前位置: 代码迷 >> .NET Framework >> 怎么在配置文件中更改该应用程序的信任级别
  详细解决方案

怎么在配置文件中更改该应用程序的信任级别

热度:71   发布时间:2016-05-02 00:59:30.0
如何在配置文件中更改该应用程序的信任级别
在用VS2008开发ASP.NET程序时,出现了这样的错误:[size=14px][/size]

安全性异常
说明: 应用程序试图执行安全策略不允许的操作。要授予此应用程序所需的权限,请与系统管理员联系,或在配置文件中更改该应用程序的信任级别。

异常详细信息: System.Security.SecurityException: 请求“System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”类型的权限已失败。

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[SecurityException: 请求“System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”类型的权限已失败。]
System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0
System.Reflection.Assembly.GetType(String name) +25
System.Web.Compilation.BaseTemplateBuildProvider.GetGeneratedType(CompilerResults results) +55
System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results) +45
System.Web.Compilation.TemplateControlBuildProvider.CreateBuildResult(CompilerResults results) +33
System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results) +13
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +310
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +160
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155



请问该如何在配置文件中更改该应用程序的信任级别?

------解决方案--------------------
没遇到过帮顶了
------解决方案--------------------
帮顶了
留名
  相关解决方案