ASP.NET MVC Routing to start at html page

前端 未结 4 1789
自闭症患者
自闭症患者 2020-12-20 12:01

I am using IIS 6. I think my problem is that I don\'t know how to route to a non controller using the routes.MapRoute.

I have a url such as example.com and I want i

4条回答
  •  被撕碎了的回忆
    2020-12-20 12:44

    Configure the asp.net routing to ignore root ("/") requests and let IIS's "Default Document" ISAPI filter serve the static index.htm file

    Add the following to the RegisterRoutes method.

    routes.IgnoreRoute("");
    

提交回复
热议问题