tags:

views:

667

answers:

3

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.

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?

Thanks!

A: 

Looks like permissions on the website root folder. Are the IIS7 worker processes configured correctly?

Gavin Miller
I think so, I'll try upping the settings for All users.
Shawn Simon
still nothing... it looks like its running under a user that has the same name as the app_pool, weird.
Shawn Simon
Gavin Miller
this wound up being a setting under the app pool, ill append it to this tomorrow. something like: use user ____
Shawn Simon
+3  A: 

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

Pat James
A: 

FullTrust need to be given by the Administrator. You can not attain FullTrust to your ASP.NET application by just setting so in Web.Config. The Admin. will need to do this in IIS Manager.

Thanks.

this. __curious_geek