ASP.NET – Using routing with webforms - Peter's Software House

ASP.NET – Using routing with webforms

I followed the great samples provided by Phil Haack and Wally McClure, but Phil’s sample required that you still needed to provide a .aspx suffix, as in http://localhost/Party/1.aspx instead of http://localhost/Party/1 which was what I wanted, and Wally’s sample didn’t do what I expected. 

Well to get this functionality is extremely simple, all you need to do is open Internet Information Services (IIS) Manager.  Right click on your website and select properties.  Then go to the Home Directory tab and select Configuration.  Near the WildCard application maps listbox, click on the Insert button.  And add the path to the aspnet_isapi assembly.  Make sure you unselect the ‘Verify that file exists’ checkbox. 

image 

Now my routing works exactly as expected.

Published Tuesday, March 24, 2009 11:08 AM by Pieter
Filed under: , ,

Comments

# re: ASP.NET – Using routing with webforms

It is pretty well known that this works, the only problem being is that it can cause problems serving up static files and asd it wasn't intended to do this, there is a performance hit in forcing all file handling through ASP.NET.

Caveat Emptor

Friday, September 04, 2009 3:51 PM by Kenny Goers

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: