ASP.NET routing on IIS 6
Asked Answered
A

5

18

I have created a basic site using ASP.NET routing according to Mike Ormond's example "Using ASP.NET routing Independent of MVC". This works fine on my local machine running the built-in web server.

However, when I deploy it to my server (Windows Server 2003, IIS 6, ASP.NET 3.5 SP1) it just shows a 404 error.

I have read somewhere that I am meant to set up wildcard routing. How can I do this?

What other configuration changes needs to be done to make it work on my server?

Atrice answered 1/5, 2009 at 15:28 Comment(0)
R
21

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

Rutledge answered 1/5, 2009 at 15:30 Comment(0)
A
18

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
Azores answered 1/5, 2009 at 15:50 Comment(2)
For info, a user has reported (now deleted) that the "insert" button is missing in his case. That isn't your fault, of course!Barra
Any reason for using the v2 version of the dll and not the v4?Powel
D
3

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.

Dolf answered 1/5, 2009 at 15:35 Comment(0)
N
0

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

Nodababus answered 24/7, 2009 at 16:3 Comment(0)
G
0

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

Grandmamma answered 24/11, 2009 at 6:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.