How to fix Security Error When Installing DNN On Windows 7

When you install DotNetNuke (in my case it was latest 5.3.1 release), you may run into the following exception and error when you try to launch the wizard for fresh install. This error can actually occur even after you have configured your DNN site correctly.


Server Error in '/DNN53' Application.
-------------------------------------

Security Exception
Description: The application attempted to perform an operation not allowed by
the security policy.  To grant this application the required permission please
contact your system administrator or change the application's trust level in 
the configuration file.

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

The issue here is related how you created and configured your virtual directory or web application in IIS7 or higher. When creating a virtual directory in IIS on Windows 7, the default setting make use of DefaultAppPool. And that pool is configured to use Integrated Pipe Line as shown in the following screenshot. DNN framework does not seem to be configured and implemented to handle this integrated IIS pipeline and ends up throwing security exception. The simple fix is to switch your application pool to use Classic .Net AppPool or if you have some other custom application pool that does not use Integrated pipe line.

Search

Social

Weather

0.1 °C / 32.2 °F

weather conditions Clouds

Monthly Posts

Blog Tags