ASP.NET MVC应用程序生命周期 [英] ASP.NET MVC Application Life Cycle

查看:94
本文介绍了ASP.NET MVC应用程序生命周期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是asp.net MVC架构的新手

i想知道应用程序流程。

我已经通过这个链接

http://msdn.microsoft.com/en-us/library/dd381612.aspx [ ^ ]



在此基础上,用户请求页面---

在Global.asax文件中,Route对象被添加到RouteTable对象。



我想知道从请求到iis的流程。



我的疑问是当用户请求一页Asp时.Net MVC IIS如何知道它是对MVC应用程序的请求而不是正常的Asp.Net应用程序。



请指导我

I am new to asp.net MVC architecture
i want to know the application flow.
I have already gone through this link
http://msdn.microsoft.com/en-us/library/dd381612.aspx[^]

In this it is given that as user request a page ---
In the Global.asax file, Route objects are added to the RouteTable object.

I want to know the flow from request to iis.

My doubt is When user request a page of Asp.Net MVC How IIS know's that it is request for MVC application and not normal Asp.Net Application.

Please guid me

推荐答案

下面的文章包含有关mvc应用程序生命周期的详细信息



MVC应用程序生命周期 [ ^ ]
following article contains details about the mvc application lifecycle

MVC Application Lifecycle[^]


点击这里 [ ^ ]



http://stackoverflow.com/questions/460145/what-is-the-page-lifecycle-of-an-asp-net- mvc-page-comparison-to-asp-net-webform [ ^ ]


看看这篇文章还有



http://blogs.msdn.com/b/tmarq/archive/2010/04 /01/asp-net-4-0-enables-routing-of-extensionless-urls-without-impacting-static-requests.aspx [ ^ ]



IIS检查传入的请求并查找该类型的处理程序,大多数项目都映射到aspnet_isapi.dll。 IIS - >虚拟目录 - >配置 - >映射



Have a look at this article as well

http://blogs.msdn.com/b/tmarq/archive/2010/04/01/asp-net-4-0-enables-routing-of-extensionless-urls-without-impacting-static-requests.aspx[^]

IIS inspects the incoming request and looks up the handler for the type, most items are mapped into aspnet_isapi.dll. IIS -> Virtual Directory -> Configuration -> Mappings

引用:

当请求是IIS时,IIS将映射到处理程序最初收到。我将ASP.NET处理程序称为托管处理程序,将其他所有处理程序称为非托管处理程序。具有托管处理程序的请求将进入ASP.NET并由管道中的各个托管模块处理。在IIS 6上,托管代码不会处理具有非托管处理程序的请求。在IIS 7上,具有非托管处理程序的请求也不会被托管代码处理,至少在默认情况下不会。

URLs are mapped to handlers by IIS when the request is initially received. I'll refer to the ASP.NET handlers as managed handlers, and everything else as unmanaged handlers. A request with a managed handler will enter ASP.NET and be processed by the various managed modules in the pipeline. On IIS 6, a request with an unmanaged handler won't be processed by managed code. On IIS 7, a request with an unmanaged handler, also, won't be processed by managed code, at least not by default.





我'我只是要重复文章中的大部分内容,请仔细阅读......但是它的行是



IIS收到请求 - >确定请求的映射 - >将请求传递给托管代码 - >查找路线表..等等



I'm just going to repeat a lot of what is in the article, have a read through...but it's along the lines of

IIS receives Request -> Determine Mapping for Request -> Pass Request to Managed Code -> Look up route table .. etc etc


这篇关于ASP.NET MVC应用程序生命周期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆