views:

415

answers:

3

I have an ASP.NET web application(webforms,not MVC) developed in VS 2008 and i have implemented ASP.NET web forms URL routing by following this link http://www.4guysfromrolla.com/articles/051309-1.aspx#postadlink

It works pretty good when i run it on the Visual studion IDE.But does not works when i created a site under my IIS (IIS 5.1 in XP) and deployed the same files there.I have set ASP.NET version as 2.0 in the Properties window of my application too.But does not work. Any idea Why ? Is there anything else to be setup ? Thanks in advance

A: 

Are you trying to rewrite for a specific file extension, or are you trying to route all requests?

The reason I ask is because you may not have success with wildcard routing on IIS 5.1.

It works on IIS6 if you specify a wildcard map for the ASP.NET ISAPI filter. Link with more info

IIS7 supports this via the integrated pipeline.

Berkshire
A: 

Try using the following content from "Using ASP.NET MVC with Different Versions of IIS" @ http://www.asp.net/%28S%28ywiyuluxr3qb2dfva1z5lgeg%29%29/learn/mvc/tutorial-08-cs.aspx

Creating a Wildcard Script Map
If you don’t want to modify the URLs for your ASP.NET MVC application, and you have access to your web server, then you have an additional option. You can create a wildcard script map that maps all requests to the web server to the ASP.NET framework. That way, you can use the default ASP.NET MVC route table with IIS 7.0 (in classic mode) or IIS 6.0.

Be aware that this option causes IIS to intercept every request made against the web server. This includes requests for images, classic ASP pages, and HTML pages. Therefore, enabling a wildcard script map to ASP.NET does have performance implications.

Follow these steps to create a wildcard script map with IIS 6.0:
1. Right-click a website and select Properties
2. Select the Home Directory tab
3. Click the Configuration button
4. Select the Mappings tab
5. Click the Insert button (see Figure 4)
6. Paste the path to the aspnet_isapi.dll into the Executable field (you can copy this path from the script map for .aspx files)
7. Entery ".*" in the Extensions field
8. Uncheck the checkbox labeled Verify that file exists
9. Click the OK button

Dhwanil Shah
Does it work for WebForms ?
Shyju
It works with ASP.NET MVC - not sure about WebForms. Ideally it should work as it is part of core ASP.NET.
Dhwanil Shah
A: 

Check this System.Web.Routing RouteTable not working with IIS?

Ron Jacobs