Strange ASP.NET error !

我的未来我决定 提交于 2020-01-13 05:09:10

问题


I'm running Windows 7 - x64 Edition with IIS 7.5

I have a simple asp.net website that i've run on other versions of windows and IIS but now, on SOME pages it gives me the following error

Exception information: Exception type: HttpParseException Exception message: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Stack trace: at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) ......

Now, when i run this application under cassini everything works fine. I also was able to figure out that where ever i have used the AjaxToolkit controls those pages are throwing this error.

Any advice ?


回答1:


In IIS, Under the advanced settings. You must try to set

Load User Profile=True

see this link for more detail http://geekswithblogs.net/ProjectLawson/archive/2009/05/05/iis-system.web.aspnethostingpermission-exception-on-windows-7-rc.aspx



来源:https://stackoverflow.com/questions/1385999/strange-asp-net-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!