为什么我收到此错误信息:System.Security.SecurityException:请求类型的权限'System.Web.AspNetHostingPermission,......'失败 [英] Why am I getting this error: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, ...' failed

查看:1409
本文介绍了为什么我收到此错误信息:System.Security.SecurityException:请求类型的权限'System.Web.AspNetHostingPermission,......'失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WHE我尝试运行我的网站在本地我得到这个错误:

Whe I try to run my site locally I get this error:

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

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.

异常详细信息: System.Security.SecurityException:请求类型的权限'System.Web.AspNetHostingPermission,系统,版本= 2.0.0.0,文化=中性公钥= b77a5c561934e089'失败。

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上运行的IIS7的.NET 3.5网站7盒。

I'm not running across a UNC share or accessing any shared network resources. It's a .NET 3.5 site running on IIS7 on a windows 7 box.

我不认为我所做的任何更改之前开始发生,因为它有我重建了解决方案和放大器;重新启动计算机。

I don't think I made any changes before this started happening, and since it has I've rebuilt the solution & restarted the computer.

推荐答案

尝试<一个href=\"http://geekswithblogs.net/ProjectLawson/archive/2009/05/05/iis-system.web.aspnethostingpermission-exception-on-windows-7-rc.aspx\">following.它与应用程序池设置,加载用户配置文件= TRUE。

Try the following. It has to do with Application Pool setting, "Load User Profile=True".

这篇关于为什么我收到此错误信息:System.Security.SecurityException:请求类型的权限'System.Web.AspNetHostingPermission,......'失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆