How to get ASP.NET MVC working under IIS 5.1 on Windows XP


I have spent the last hour trying to get ASP.NET MVC working on my Windows XP development machine running IIS 5.1. The trick is to configure a wildcard extension handler for the ASP.NET application, routing all requests through the ASP.NET ISAPI DLL. The problem, though, is IIS 5.1 doesn’t support wildcard handlers. IIS 6.0 and above has an easy way to  manage these.

BUT… there is a bug in the IIS Manager for IIS 5.1 that allows you to set this up anyway. Here is how I did it:

  1.  Open IIS Manager. Make sure it’s the OLD IIS manager that comes with XP. If you’re like me, I installed the IIS 6.0 manager to remotely manage some IIS servers. You HAVE to use the OLD one. If you go to Help -> About Internet Information Services it should show version 5.1, not 6.0.
  2. Right-click your virtual directory application and hit Properties
  3. If it isn’t already, make sure the virtual directory is an Application and execute permissions are set to Scripts only. Click Configuration.
  4. Find out what the DLL path for .aspx is by selecting it from the list and click edit.
  5. Add a new extension, putting the path from the .aspx extension in the Executable field. In the extension field, put “.*” (without quotes). uncheck “Check that file exists.”
  6. Here is the bug. You should notice at this point that the OK box is disabled. Since .* isn’t really a valid extension, it thinks you’ve made a mistake. However, if you click your cursor back into the “Executable” field you should notice that you can now click OK. :-)
  7. Save your settings and it should work!

Good luck with ASP.NET and the MVC framework!

Leave a comment ?

13 Comments.

  1. thanks, it was really helpful article

  2. Thank you very much, it really helped me.

  3. Doesn’t work on with my case.
    Windows Xp sp3, added IIS sp3 after install sp3

  4. Sanjay Kr. Chaki (India-WB-Kolkata-Uttarpara)

    thanks,thanks, thanks, its really working

  5. Looked like a good idea.

    I don’t know if Microsoft have patched this up, but I can no longer paste the magic .* . It just won’t do it. Using XP sp3, with IIS 5.1.

  6. Fixed my problem deploying MVC2 under IIS 5.1

    Thanks a lot Chris

  7. Thanx Bro
    Its really very helpfull.

  8. You are the most awesome person EVER! Muchas gracias amigo

  9. Hi, this got the MVC working, but my app also serves some asmx webservices, after making this config change , while i could still see the service description, as soon as i tried to call one of the services i now get “The resource cannot be found”

  10. Thanks! It worked for me too!

  11. Thanks buddy! That was a very wierd bug and kudos to you to have explained it so well. :smile:

  12. It worked good for me. thanks

  13. thx, man. now all works fine. Using XP sp3, with IIS 5.1.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word