运行一个asp.net web应用程序项目在IIS7抛出异常 [英] Running a asp.net web application project on IIS7 throws exception

查看:168
本文介绍了运行一个asp.net web应用程序项目在IIS7抛出异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是转换了一个网站,Web应用程序项目,我得到这个错误:

I just converted a website to a web application project and I am getting this error:

System.Security.SecurityException: Request for the permission of type 
'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

任何想法?其他一切运行正常IIS7上。该应用程序需要完全信任,我必须在web.config那一套。我需要的地方给它在IIS中完全信任的访问?

Any ideas? Everything else runs fine on IIS7. The application requires full trust, and I have that set in the web.config. Do I need to give it full trust access somewhere in IIS?

谢谢!

推荐答案

我觉得缺少的秘密武器是进入应用程序池默认设置,并设置加载用户档案= TRUE

I think the missing secret sauce is to go into the Application Pool defaults and set Load User Profile = True

这篇关于运行一个asp.net web应用程序项目在IIS7抛出异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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