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 }
);
}
答案 0 :(得分:0)
Omg ......我解决了这个问题。它是该网站的Google Chrome缓存版本。