views:

140

answers:

1

This question has two related parts. First, I'm looking for a a small example of how to handle a series of RESTful URLs, such as /Account/{userName} and /Account/{userName}/Profile with a single HttpHandler. At this time, I'm not interested in embracing MVC or using the REST Starter Kit. Should I place the HttpHandler class in a Class Library? Should I publish to the root of the RESTful URL?

My second issue stems from the fact that my ASP.NET hosting is done through a web-hosting company. Will I need to ask their tech team to configure IIS for me? Is that normal practice?

A: 

This is already built into ASP.NET 3.5 SP1 with the UrlRoutingModule. For details check out this article. If a hosting company supports ASP.NET 3.5 SP1, it will support this.

Matt Brunell
Thanks for the answer. I attempted to use this method for my project and it works great in Visual Studio and fails horribly when published to my web server. There's no compilation errors so I expect that my service provider has SP1 installed.The ashx pages load perfectly if I request them directly in the browser but I'm getting 404 errors when using my routes.
Kivin