3

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 ?

Storm
  • 4,307
  • 11
  • 40
  • 57

1 Answers1

9

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

Load User Profile=True

see this link for more detail Link

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Jirapong
  • 24,074
  • 10
  • 54
  • 72
  • One day I will learn. Check stackoverflow first! Thanks for this answer. – firedfly Jan 07 '10 at 20:08
  • Or try the answers in here. http://forums.asp.net/t/1116931.aspx?Ajax+Request+for+the+permission+of+type+System+Web+AspNetHostingPermission+System The reply from @Pepepe was the only solution that worked for me. – Fandango68 Jun 08 '16 at 06:39