views:

285

answers:

2

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 ?

A: 

I had this issue earlier. I'm trying to find advice myself.

Homework
how long ago ?
Binder
BTW, I had a 32 bit version of windows 7 before this and the same website was running fine on it !
Binder
If this worked in 32-bit, try enabling ASP.NET 32-bit execution. See http://www.aboutmeadows.com/articles/how-to-enable-32-bit-asp.net-on-windows-server-2003.aspx.
David Andres
Roughly 20 minutes before you posted this question.
Homework
It was running fine on my 32 bit as well, when I went 64, it stopped working.
Homework
Dude ! Jirapong posted the solution, it works !
Binder
YES! I've been looking everywhere. It was that simple.....
Homework
+8  A: 

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

Jirapong
OMG !!! It worked :) Thank you so much !
Binder
One day I will learn. Check stackoverflow first! Thanks for this answer.
firedfly