我可以在web.config中存储ASP.NET MVC路由吗? [英] Can I store ASP.NET MVC routes in web.config?

查看:91
本文介绍了我可以在web.config中存储ASP.NET MVC路由吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了Global.asax类之外,我还在寻找一种在我的web.config文件中存储路由信息的方法。存储在配置文件中的路由的优先级要高于以编程方式添加的路由。

I'm looking for a method of storing routing information in my web.config file in addition to the Global.asax class. The routes stored in the configuration file would need to take higher precedence than those added programmatically.

我已经完成了搜索,但最能想到的是Codeplex( http://www.codeplex.com/RouteBuilder 上的RouteBuilder,但这不是与MVC的RTM版本一起使用。

I've done my searching, but the closest I can come up with is the RouteBuilder on Codeplex (http://www.codeplex.com/RouteBuilder), but this doesn't work with the RTM version of MVC. Does a solution out there exist compatible with the final 1.0?

推荐答案

看一下:
http ://weblogs.asp.net/fredriknormen/archive/2008/03/11/asp-net-mvc-framework-2-define-routes-in-web-config.aspx

这篇关于我可以在web.config中存储ASP.NET MVC路由吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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