vendredi 31 juillet 2015

Windows 10 IIS redirecting external IP to index html

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 }
        );
    }

Aucun commentaire:

Enregistrer un commentaire