如何在windows XP IIS 5.1 上部署 Asp.net MVC?

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

(http://www.ee99ee.com/blog/2009/02/08/how-to-get-aspnet-mvc-working-under-iis-51-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.

(C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll )

(Limit to: GET,HEAD,POST,DEBUG )

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!

HP Laptop battery

Apple laptop battery

IIS 6 上部署请参考:

http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx