为什么asp.net请求中频繁出现System.W开头的SecurityException错误?

2026-03-30 13:081阅读0评论SEO教程
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计332个文字,预计阅读时间需要2分钟。

为什么asp.net请求中频繁出现System.W开头的SecurityException错误?

在本地运行我的网站时,遇到了以下错误:错误描述:应用程序尝试执行安全策略不允许的操作。要授予此应用程序所需的权限,请联系您的系统管理员。

当我尝试在本地运行我的网站时,我收到此错误:

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.

堆栈跟踪:

[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0 System.Web.UI.Util.GetTypeFromAssemblies(ICollection assemblies, String typeName, Boolean ignoreCase) +201 System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +302 System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +64

我没有运行UNC共享或访问任何共享网络资源.它是在Windows 7机器上的IIS7上运行的.NET 3.5站点.

为什么asp.net请求中频繁出现System.W开头的SecurityException错误?

我不认为在这个开始发生之前我做了任何改变,因为我已经重建了解决方案&重新启动电脑.

试试 following.它与应用程序池设置“加载用户配置文件=真”有关.

本文共计332个文字,预计阅读时间需要2分钟。

为什么asp.net请求中频繁出现System.W开头的SecurityException错误?

在本地运行我的网站时,遇到了以下错误:错误描述:应用程序尝试执行安全策略不允许的操作。要授予此应用程序所需的权限,请联系您的系统管理员。

当我尝试在本地运行我的网站时,我收到此错误:

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.

堆栈跟踪:

[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0 System.Web.UI.Util.GetTypeFromAssemblies(ICollection assemblies, String typeName, Boolean ignoreCase) +201 System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +302 System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +64

我没有运行UNC共享或访问任何共享网络资源.它是在Windows 7机器上的IIS7上运行的.NET 3.5站点.

为什么asp.net请求中频繁出现System.W开头的SecurityException错误?

我不认为在这个开始发生之前我做了任何改变,因为我已经重建了解决方案&重新启动电脑.

试试 following.它与应用程序池设置“加载用户配置文件=真”有关.