Max Toro
Max Toro

Reputation: 28618

How does ASP.NET WebPages implement extensionless URLs?

I'd like to implement the same thing for my own build providers.


I'm talking about an ASP.NET Webpages application, in Visual Studio: File > New Website > ASP.NET Website (Razor)
Works with Cassini, so it's not an IIS Express thing.

Upvotes: 1

Views: 939

Answers (3)

Sir CodesALot
Sir CodesALot

Reputation: 956

I found this information in regard to the "Routing" that you might find handy if you are building an ASP.Net WebPages site w/o MVC3 and wanted to mention it.

Creating More Readable and Searchable URLs - About Routing

HTH

Upvotes: 0

Max Toro
Max Toro

Reputation: 28618

I found it, it's an HTTP module, System.Web.WebPages.WebPageHttpModule This module checks if the file exists, and if it does it creates a handler from that file and remaps the request to that handler.

Upvotes: 3

Darin Dimitrov
Darin Dimitrov

Reputation: 1039080

Razor is a templating engine. It has nothing to do with URLs. They are handled by the ASP.NET routing engine. Extensionless URLs are supported starting from IIS 7.0. In IIS 6.0 you need to associate the aspnet_isapi extension with all incoming requests if you want to support extensionless urls.

Upvotes: 0

Related Questions