ASP.NET MVC应用程序生命周期

编程入门 行业动态 更新时间:2024-10-27 18:18:21
本文介绍了ASP.NET MVC应用程序生命周期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是asp MVC架构的新手 i想知道应用程序流程。 我已经通过这个链接 msdn.microsoft/en-us/library/dd381612.aspx [ ^ ] 在此基础上,用户请求页面--- 在Global.asax文件中,Route对象被添加到RouteTable对象。 我想知道从请求到iis的流程。 我的疑问是当用户请求一页Asp时.Net MVC IIS如何知道它是对MVC应用程序的请求而不是正常的Asp.Net应用程序。 请指导我

I am new to asp MVC architecture i want to know the application flow. I have already gone through this link msdn.microsoft/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[^]

点击这里 [ ^ ] stackoverflow/questions/460145/what-is-the-page-lifecycle-of-an-asp-net- mvc-page-comparison-to-asp-net-webform [ ^ ]

看看这篇文章还有 blogs.msdn/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 blogs.msdn/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应用程序生命周期

本文发布于:2023-11-17 04:20:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1608808.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   生命周期   ASP   NET   MVC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!