C# 带IIS7的ASP.net 3 Web表单中的URL路由

C# 带IIS7的ASP.net 3 Web表单中的URL路由,c#,asp.net,iis-7,url-routing,iis-7.5,C#,Asp.net,Iis 7,Url Routing,Iis 7.5,我正在使用Web窗体ASP.Net Framework 3.5 我已经建立了一个在IIS6上运行良好的网站。我已经为它添加了运行良好的路线。它要求我在Web.Config中做一些更改,并在下面的global.asax中添加一些代码 protected void Application_Start(object sender, EventArgs e) { RegisterRoutes(RouteTable.Routes); } public st

我正在使用Web窗体ASP.Net Framework 3.5 我已经建立了一个在IIS6上运行良好的网站。我已经为它添加了运行良好的路线。它要求我在Web.Config中做一些更改,并在下面的global.asax中添加一些代码

    protected void Application_Start(object sender, EventArgs e)
    {
        RegisterRoutes(RouteTable.Routes);
    }

    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.Add("Login", new Route("User/Login", new RoutingHandler("~/pages/Users/Login.aspx")));
        routes.Add("Products", new Route("Pages/Products/{Category}", new RoutingHandler("~/Products/Default.aspx")));
    }
当我访问/user/login或/products/mobile等时,它工作正常

但这在IIS7.5上不起作用。在这里,当我访问任何路由时,它只会给出404错误。如何解决这个问题?在IIS7.5中运行它需要做任何更改吗