When I'm debugging the app, it will start correctly looking for /Home/Index, however, when I publish to the server, I get
HTTP Error 403.14 - Forbidden
I'm not entirely sure what I have to do so I'm reaching out for a bit of help.
My Global.asax.cs has RouteConfig.RegisterRoutes like this:
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
}
And my RouteConfig looks like this:
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
I've even added to my web.config:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
I don't know what I'm possibly missing.