0

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.

1 Answer 1

0

Thank you for the edit, it looks much better. I also just found my answer. I did not have asp.net 4.8 installed on my IIS webserver, I only had .NEt Extensibility 4.8

Sign up to request clarification or add additional context in comments.

2 Comments

This is supposed to be part of a comment not an answer, please remove this, and add this in comments section
No, that was the issue, that was the answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.