bpag:how it is that MVC manages to process requests even though they don't contain any file extension
This is with IIS7 which allows extensionless urls, so with IIS6 you'd typically need to either use .aspx or .mvc if you have mapped these extensions to ASP.NET in IIS, and updated your routes accordingly, unless you use a ISAPI filter with IIS6.
bpag:correctly route such a request to your controller and action
bpag:HttpModule and Handler even get control
Web.config:
<add name="UrlRoutingModule" type="System.Web.Mvc.UrlRoutingModule, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
You can view the source of the httpmodules on Codeplex:
http://www.codeplex.com/aspnet/SourceControl/FileView.aspx?itemId=8296&changeSetId=590
http://www.codeplex.com/aspnet/SourceControl/FileView.aspx?itemId=8295&changeSetId=590
protected internal virtual void ProcessRequest(HttpContextBase httpContext) {
// Get the controller type
string controllerName = RequestContext.RouteData.GetRequiredString("controller");
// Instantiate the controller and call Execute
IControllerFactory factory = ControllerBuilder.GetControllerFactory();
IController controller = factory.CreateController(RequestContext, controllerName);
if (controller == null) {
throw new InvalidOperationException(
String.Format(
CultureInfo.CurrentUICulture,
MvcResources.ControllerBuilder_FactoryReturnedNull,
factory.GetType(),
controllerName));
}
try {
ControllerContext controllerContext = new ControllerContext(RequestContext, controller);
controller.Execute(controllerContext);
}
finally {
factory.DisposeController(controller);
}
}