Tuesday, August 4, 2009

Configuring IIS5 for ASP.NET MVC

I was trying to setup an ASP.NET MVC application to run under a virtual directory on IIS 5.1. When I click the properties on that virtual directory and then click the "Configuration..." button nothing happens - i.e. the configuration dialog doesn't pop up as it should. I suspect this is because I've also installed the IIS6 manager on this XP machine.

My objective is to Add an Application Extension Mapping to this virtual directory but I can't get into the configuration page which means I can't reach the Add/Edit Application Extension Mapping dialog either. Ironically I can get to this from the IIS6 manager but when I try and add the ".*" extension to the c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll executable I get the message "Wrong extension format." Not being able to add ".*" I added ".mvc" as a placeholder.

The solution is to use the IIS Metabase Explorer. You can install the Internet Information Services (6.0) Resource Kit Tools from here and one of the utilities installed will be the IIS Metabase Explorer.

Once open, navigate the tree in the left panel to LM > W3SVC > 1 > ROOT > AppName. Once selected, in the right panel you'll see a list of records, one of those will be ScriptMaps. Double click ScriptMaps and then scroll down the list until you find the .mvc placeholder. Double click this and change the ".mvc" to ".*" Click Apply and Save

No comments:

Post a Comment