ASP.NET routing on IIS 6

老子叫甜甜 提交于 2019-11-30 06:29:22
Johnno Nolan

You will find some good information on Steve Sanderson’s blog post "Deploying ASP.NET MVC to IIS 6."

Chris Van Opstal

On the server, open IIS:

  1. Right-click on the site/virtual directory, select properties
  2. Goto the Home Directory/Virtual Directory tab, click Configuration (near the bottom)
  3. Near the bottom again, click the insert button
  4. Enter C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
  5. Alternate: Enter C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll for ASP.NET 4.0
  6. Uncheck the "Verify that file exists" button, click Okay and close all the dialogues
hilkiah

You can find the "official" discussion of wildcard mappings on TechNet here but I like Phil Haack's walkthrough that you can find here. Don't worry about the fact that it's a discussion of setting up ASP.NET MVC, just look for the section titled "IIS6 Extension-less URLs" - that set up applies to both MVC and using routing with a classic web form application.

Under IIS 6 64 bit, make sure that the path under 4.) points to C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll

Url rewriting can help you to solve the problem. I've implemented solution allowing to deploy MVC application at any IIS version even when virtual hosting is used. http://www.codeproject.com/KB/aspnet/iis-aspnet-url-rewriting.aspx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!