Windows 10 IIS redirecting external IP to index html

时间:2015-07-31 20:50:20

标签: asp.net asp.net-mvc iis windows-10

I created default ASP.NET MVC 4 project in VS 2015 Community and tried to setup IIS to work with it. I just added this project to Sites List and bound it to port 80 (forwarding enabled). It's ok if I try to load localhost. But when I try to load my external IP, it suddenly redirects me to /index.html (that is 404 not found). Nevertheless if I go to my external IP with /Home, it redirects me to /Home/Index view as needed. It is also ok if I create an index.html page in the root of my project. But I just want to setup default project to work with IIS on my external IP. Could somebody help, please?

It is completely default project. Route config:

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

        routes.MapRoute(
            name: "Default",
            url: "{controller}/{action}/{id}",
            defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
        );
    }

1 个答案:

答案 0 :(得分:0)

Omg ......我解决了这个问题。它是该网站的Google Chrome缓存版本。