“在浏览器中查看”时获得安全例外。为网页选择了选项。 [英] Security Exception gets when "view in browser" option is chosen for web page.

查看:120
本文介绍了“在浏览器中查看”时获得安全例外。为网页选择了选项。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web应用程序,其中包含一些用户控件和在ASP .NET(C#)中开发的网页。

我最近在我的开发机器上安装了IIS 7.0。当我尝试通过右键单击Visual Studio IDE中的在浏览器中查看菜单选项查看浏览器中的任何网页时,我收到以下异常:



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





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



我的web项目中没有任何预编译的dll。在安装ISS 7.0之前,一切正常。

我使用Visual Studio 2008和.NET Framework 3.5





提前致谢,

Aryan。

I have a web application with some user controls and web pages develpoed in ASP .NET (C#).
I recently installed IIS 7.0 on my development machine. When I try to view any of the web pages in browser using the "View In Browser" menu option by right clicking in Visual Studio IDE, I am getting the below exception :

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.

I do not have any pre-compiled dlls in my web project. Prior to the ISS 7.0 installation, everything worked fine.
I am using Visual Studio 2008 with .NET Framework 3.5


Thanks in advance,
Aryan.

推荐答案

check http://stackoverflow.com/questions/523636/system-web-aspnethostingpermission-securityexception-when-trying-to-use- managedf [ ^ ]

如果该链接没有帮助,为什么不从 google [ ^ ]
check http://stackoverflow.com/questions/523636/system-web-aspnethostingpermission-securityexception-when-trying-to-use-managedf[^]
if that link not helped, why not ask from google[^]


这篇关于“在浏览器中查看”时获得安全例外。为网页选择了选项。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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