Close this search box.

IIS System.Web.AspNetHostingPermission exception on Windows 7 RC

I recently upgraded my office workstation to Windows 7 RC from Vista SP1. Everything in the upgrade went smoothly, until I after installed the IIS 7 server components and tested my sites on my local IIS server.

When loading any site, I received the following error:

Request for the permission of type ‘System.Web.AspNetHostingPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.

I configured my usual permissions for the temp folders, .NET Temp folders, Application Pool security accounts and IIS Virtual directories. After doing some digging, I found several articles that pointed to changing the Trust Levels in the Security Zones for the Machine to Full Trust, however this did not correct the issue.

Anyway … After much trial and error, it seems that the Application Pool setting, “Load User Profile=True” was the solution. It was set to False by Default. This is not a new setting of the application pools in IIS7, but it is now visible in the console.

In Windows Vista SP1, IIS 7 by default sets LoadUserProfile=True for you automatically, however it was not available in the console. This is why in IIS 7 this issue was not encountered on my previous Vista Development station. In Windows 7 RC this option is available in the Application Pool Advanced Properties and is set to False by Default.

It seems on Vista there were many cases when this setting needed to be set to false, but was not accessible via the console. The .config file had to be changed manually. In Windows 7 RC this setting is now available.

Print posted @ Tuesday, May 05, 2009 6:33 PM

This article is part of the GWB Archives. Original Author: Jonathan Lawson

Related Posts