简体   繁体   English

ASP.NET MVC和Web窗体注册

[英]ASP.NET MVC and Web Forms registration

How does IIS know when to route a requests to the ASP.NET MVC framework and the not the Web Forms framework? IIS如何知道何时将请求路由到ASP.NET MVC框架而不是Web Forms框架?

Looking through the Web.config of an MVC project I can't see any modules or handlers that are registered, and nothing the Global.ascx seems to do it. 浏览MVC项目的Web.config时,我看不到已注册的任何模块或处理程序,Global.ascx似乎没有执行任何操作。 So I am at a bit of a loss as to how the system decides which should be used to route a request. 因此,我对系统如何决定应使用哪个路由请求感到困惑。

After looking at the MapRoute method the system registers a set of Routes which offload a matching request to an IRouteHandler. 查看MapRoute方法后,系统会注册一组Route,这些路由会将匹配的请求卸载到IRouteHandler。 The IRouteHandler then returns a IHttpHandler that actually handles the final request. 然后,IRouteHandler返回实际处理最终请求的IHttpHandler。

This is my understanding so far so it might not be 100% correct. 到目前为止,这是我的理解,因此可能不是100%正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM