Url路由asp.net 4 webforms - 不工作
问题描述:
我在我的开发机器上首次设置测试路由。Url路由asp.net 4 webforms - 不工作
我遇到的问题是我在尝试测试时遇到404错误。
例如http://domain.local/about
我使用这篇文章Scott Guthrie
的Win 7 64位
的Visual Studio 2010/asp.net web表单4.
IIS7.5使用集成管理的管道应用程序池中的网站。
我有我的Global.asax
protected void Application_Start(object sender, EventArgs e)
{
RegisterRoutes(RouteTable.Routes);
}
private void RegisterRoutes(RouteCollection routes)
{
routes.Clear();
routes.MapPageRoute("about route", "about", "~/about.aspx");
}
的代码不会被打到下面的路线。
我也曾尝试使用ASPNET_REGIIS.EXE -i
任何建议重新注册ASP?
答
我没有看到您的代码有任何问题。确保您重新启动ASP.NET开发服务器。
+0
这个问题似乎与集成管理管道应用程序池有关。如果我选择asp.net 4 classic,并将通配符的处理程序映射添加到asp dll,它将起作用。 – 2011-02-03 05:57:23
我可以得到这个工作使用经典模式设置,ala,添加处理程序映射的*到asp dll。目前我无法使用集成模式工作。 – 2011-02-03 21:42:13