1

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!

hlovdal
  • 26,565
  • 10
  • 94
  • 165
Shawn
  • 19,465
  • 20
  • 98
  • 152

3 Answers3

7

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

Pat James
  • 4,348
  • 26
  • 39
0

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

Gavin Miller
  • 43,168
  • 21
  • 122
  • 188
0

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
  • 42,787
  • 22
  • 113
  • 137