Configuring IIS 6 and ASP.NET MVC

By default, IIS 6 does not work with ASP.NET MVC and needs to be configured to use wild-card mapping to get MVC’s routing and clean URLs to work correctly. Unfortunately, IIS 6 does take a performance hit because all requests are processed by ASP.NET. Static files, such as images, CSS, and JavaScript are processed as a dynamic page instead of a static one.

Install ASP.NET MVC
Follow the first two steps of the instructions for installing ASP.NET MVC. The third step can be ignored since Visual Studio will not be installed on the server.

Configuring ASP.NET 2.0
First thing to do is open the IIS Manager ->expand your server ->Web Service Extensions folder. Right-click on the white space under the list of Web Service Extensions and select to Add a new Web service extension…

The New Web Service Extension window will pop open. Enter “ASP.NET v2.0.50727” as the Extension Name and click the Add button.  Browse to the C:\Windows\Microsoft.Net\Framework\v2.0.50727 folder and select the aspnet_isapi.dll file. Make sure to check the “Set extension status is Allowed” button before clicking OK.

This will allow your programs to run ASP.NET 2.0, 3.0, and 3.5 versions of the .NET framework.

Configuring Your Web Application
The next thing to do is open the properties of the Web Site where your web application is. Select the ASP.NET tab and select 2.0.50717 in the ASP.NET version drop down box.

Next, click on the Home Directory tab. Click on the Configuration button. Under the Wild-card application maps area, click the Insert button. Browse to the C:\Windows\Microsoft.Net\Framework\v2.0.50727 folder and select the aspnet_isapi.dll file. Uncheck the “Verify that file exists” before clicking OK. Save your changes and your site should now be able to run ASP.NET MVC and use the routes setup by your application.

You may also like...

2 Responses

  1. February 1, 2010

    […] to VoteConfiguring IIS 6 and ASP.NET MVC (1/28/2010)Thursday, January 28, 2010 from http://www.cmjackson.netBy default, IIS 6 does not work with ASP. … NET […]

Leave a Reply

Your email address will not be published. Required fields are marked *