如何Web路由工作? [英] How does Web Routing Work?

查看:106
本文介绍了如何Web路由工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要System.Web.Routing的内部运作有很好的理解。
通常我们定义RoutesTable。但它是如何做路由呢?

I need a good understanding of the inner workings of System.Web.Routing. Usually we define the RoutesTable. But how does it do the routing?

我要问它的原因是,我想通过路由subapps。我想看看一干就是传递当前请求到其他的AppDomain工作MVC应用程序的方式。
只是要清楚这是我想象
我有一个MVC应用程序,只具有准系统的Global.asax和其他应用程序加载域某些DLL是MVC应用程序..和交际是通过通过_appDomain.CreateInstanceAndUnwrap(...)创建一个透明的代理完成。

The reason I'm asking it is that I want to pass the routing to subapps. What I want to see working is a way of passing the current request to mvc apps that work in other AppDomains. Just to make it clear this is what I'm imagining I have a MVC APP that only has the barebone Global.asax and that loads in other app domains some dlls that are mvc apps.. and the comunication is done through a transparent proxy created through _appDomain.CreateInstanceAndUnwrap(...).

希望这是非常明显的。

编辑:从我可以告诉codebehind Default.aspx的被调用的第一页reguest和启动,做我们显示所请求的网页上的全部巫术的MvcHttpHandler 。所以它可能只是传递HTTP上下文的问题。
如果您有关于此事的任何想法请发表你的看法。

from what I can tell the codebehind Default.aspx is invoked on the first page reguest and that starts the MvcHttpHandler that does all the voodoo of displaying the pages we are requesting. So it might just be a matter of passing the http context. If you have any ideas on matter please post your thoughts.

推荐答案

路易斯·阿布雷乌具有良好的一系列关于MVC路由帖子:

Luis Abreu has a good series of posts about MVC routing:

  • The MVC routing assembly – part I
  • The MVC routing assembly – part II
  • The MVC routing assembly – part III
  • The MVC routing assembly – part IV
  • The MVC routing assembly – part V
  • The MVC routing assembly – part VI
  • Using routing with ASP.NET web forms apps

这篇关于如何Web路由工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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