加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 为什么我收到此错误:System.Security.SecurityExcep

发布时间:2020-12-16 09:31:17 所属栏目:asp.Net 来源:网络整理
导读:当我尝试在本地运行我的网站时,我收到此错误: 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 ch
当我尝试在本地运行我的网站时,我收到此错误:

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,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 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站点.

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

解决方法

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读