Setting up BlogEngine on Windows 2008 with IIS7

17. February 2009

 

There are many differences between IIS6 and IIS7, one of these is the introduction of Managed Pipeline Mode. This is a new way to run an application pool.

IIS uses the Internet Server Application Programming Interface. This is the interface which lets website components communicate with IIS. Because of the way that the ISAPI interface interacts with ASP.NET there are two ways for a component to run. There is one ‘pipeline’ for ISAPI components/extensions and another for managed application components.

Microsoft have never been happy with this situation. Yet since .Net was added on to IIS as a separate component it has been unavoidable. In IIS7 this is different, ASP.NET is now integrated with the core of IIS. This offers numerous benefits, the only down side is that some applications do not work out of the box, BlogEngine is one of these applications.

 

Image3

 

You may see a page like this if you attempt to visit a website that has not been setup to run in integrated mode.

 

There are two ways to deal with this error. The easiest is to simply set the application pool to run in ‘Classic Mode’. This is guaranteed to work for all .Net applications not just BlogEngine so you may find it useful in future.

Run BE.NET in IIS Classic Mode

Image2

 

To do this you should open IIS Manager and navigate to the ‘Application Pools’ node on the left. After you have found your website’s application pool you then need to double click it and select ‘Classic’.

 

 

 

 

 

This solution will work with BlogEngine but if you use it then you will be missing out on lots of the new features in IIS7.

 

Run BE.NET in IIS Pipeline Mode

A much better approach is to migrate the application to integrated pipeline mode. This can be done using the appcmd.exe tool.

Run the following command from the command line:

Start > Run > cmd

Execute this command: appcmd migrate config “sitename.com/”

(Replace sitename.com with your site name. You must include the trailing slash - doesn't work without it.)

You should then see something similar to this:

Successfully migrated section "system.web/httpModules".
Successfully migrated section "system.web/httpHandlers".

Your BlogEngine website is now fully IIS7 compatible and ready to go!

Joe Shearn
team Ambay Software

BlogEngine.NET