System.Security.SecurityException: Request for the permission of type ‘System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′ failed

This error can be caused by a variety of reasons. In my case I got it when I published my ASP.NET MVC 2 application to my local IIs instance in IIS 7.5 / Windows 7.

As it turns out, I needed to set the application pool account property “Load User profile” to true:

image

 

That did the trick.

Show all Control Panel settings in Windows 7/Vista. A.k.a “GodMode”

If you want to see all the settings you can adjust in the Control Panel in one window, do the following:

On the desktop, create a new folder and name it: All Settings.{ED7BA470-8E54-465E-825C-99712043E01C}

When opened, it will show all the possible action you can do in the Control Panel in one large scrollable window:

 

image

Note that it doesn’t show you anything that you otherwise could not see in the Control Panel. It just show you a list of all available items.

So, whoever coined the term “GodMode” apparently didn’t have much high expectations.

Taken from Steve Claytons blog.