简体   繁体   English

如何使用IIS6删除ASP.net C#MVC3应用程序中的URL重写?

[英]How to remove url rewriting in ASP.net C# MVC3 application with IIS6?

I have developed ASP.net(C#) application with MVC3 but I'm force to run it in IIS6 server which is not support url rewriting.And I don't have default.aspx file too.I don't think I can change IIS server configurations too.following shows my Global.asax. 我已经使用MVC3开发了ASP.net(C#)应用程序,但是我被迫在不支持url重写的IIS6服务器中运行它,而且我也没有default.aspx文件,我认为我无法更改IIS服务器配置也如下。下面显示了我的Global.asax。

public class MvcApplication : System.Web.HttpApplication
{
    public static void RegisterGlobalFilters(GlobalFilterCollection filters)
    {
        filters.Add(new HandleErrorAttribute());
    }

    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            "Default", // Route name
            "{controller}/{action}/{id}", // URL with parameters
            new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
        );

    }

    protected void Application_Start()
    {
        AreaRegistration.RegisterAllAreas();

        RegisterGlobalFilters(GlobalFilters.Filters);
        RegisterRoutes(RouteTable.Routes);
    }
}

any idea how to solve this? 任何想法如何解决这个问题?

@LittleOne : Dude 1st things first . @LittleOne:Dude第一件事。 Dont get deflected from the issue, the issue is how to deploy MVC 3 on IIS 6. Use this to deploy it. 不要偏离这个问题,问题是如何在IIS 6上部署MVC3。使用进行部署。 It has worked for us . 它对我们有用。 Best of Luck. 祝你好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM