簡體   English   中英

網址路由ASP.NET 4 Web表單-不起作用

[英]Url Routing asp.net 4 webforms - not working

我是在我的開發機器上第一次設置測試路線。

我遇到的問題是嘗試測試時出現404錯誤。
例如http://domain.local/about

我正在使用Scott Guthrie的這篇文章

贏7 64位
Visual Studio 2010 / asp.net網絡表單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開發服務器。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM