ckv
ckv

Reputation: 10838

Processing request URLs from browser by the .NET Framework

How does the .net framework know in what way the incoming URL is to be processed?

My question is not about routing mechanism within the application.

I want to know how the .net framework in the system finds out that it has to delegate the request to its MVC assemblies to route the URL to appropriate controller and action.

I hope the question is clear.

Just saw some other questions in stackoverflow and came across this link which somewhat explains i guess. https://docs.google.com/file/d/0B0_EIyBZvSQsOTU3N2Q2NDEtMWNjMS00ZTc0LWJmMjUtM2I0M2I5NDY2ZDNl/edit?pli=1

This link has detailed information http://stephenwalther.com/archive/2008/03/18/asp-net-mvc-in-depth-the-life-of-an-asp-net-mvc-request

Upvotes: 0

Views: 167

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1039498

If you host your application in IIS, then when a request comes-in, then this request is initially intercepted by IIS. Let's suppose that you hosted your application in a virtual directory called /myapp. When a request comes by starting with /myapp then IIS will handle the execution of the request to the corresponding ASP.NET pipeline. The ASP.NET pipeline will then parse the incoming request and search for corresponding managed handlers that can serve the request. If a managed handler is found that can serve the request then the processing will be passed to this handler. In the case of as ASP.NET MVC application that will be the MvcHandler which will then take care of routing and dispatching to the appropriate controller and action to serve the request.

Upvotes: 1

Related Questions