开发者

mvc url routing. How it works

last time when i debug our application who is written in mvc

i make a break-point on routing in globals.ascx.cs

i see that when my breakpoint goes to right routing. the page show in the browser but my breakpoint check all other routing who is written down in the globals.ascx.

af开发者_高级运维ter it when i refresh the browser routing is work but breakpoint is not debug.

means how url-routing is work in asp.net MVC

Are i am right to say "When you request the server all url routing is loaded in the cache and if you request again then he load from cache."


The routes you register in your global.asax.cs file are only initialized when the application starts up. This part of execution has nothing to do with an incoming request other than the fact that an incoming request will cause an unstarted application to be started.

Subsequent requests will hit the already running application (assuming it hasn't been recycled or stopped) so it won't need to reinitialize the routes.

If you want to determine what routes are being used to serve a request, this is not the place for a breakpoint (I'm not sure what it, sorry).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜