What does the HTTP Error 403.14 mean?

Asked

Viewed 6,385 times

6

Well, I have a Web Api, which is configured as follows:

WebApiConfig.Cs

public static class WebApiConfig
{
    public static void Register(HttpConfiguration config)
    {
        // Web API routes
        config.MapHttpAttributeRoutes();

        config.Routes.MapHttpRoute(
            name: "DefaultApi",
            routeTemplate: "api/{controller}/{id}",
            defaults: new { id = RouteParameter.Optional }
        );
    }
}

and my GlobalAsax

public class WebApiApplication : System.Web.HttpApplication
{
    protected void Application_Start()
    {
        GlobalConfiguration.Configure(WebApiConfig.Register);
    }
}

However, for some reason you are not finding the files. And generates the following problem:

HTTP Error 403.14 - Forbidden The web server is configured not to list the contents of this directory.

Most likely causes:

A standard document is not configured for the requested URL, and the search in the >directory is not enabled on the server.

Why does that happen?

How can I solve this problem?

  • 1

    What version of IIS are you using? Take a look at this help from MS

  • @Marcelodeandrade IIS 10.0 Express. I had already tried this, with no positive results

  • 1

    The route you are accessing is not serving your api, it is simply trying to access a directory and the document view/list is not enabled. What is the url you are trying to access?

2 answers

1

According to the help from MS:

Why does that happen?

This problem occurs because the site does not have the Search feature on Directory enabled, and the default document is not configured

How can I solve this problem?

Open a command prompt and then go to IIS Express folder on your computer. For example, go to the following folder at a prompt command:

C:\Program Files\IIS Express`  

Type the following command and press Enter:

appcmd set config /section:directoryBrowse /enabled:true
  • Thank you so much for your attention =), but that didn’t solve the problem. Some other way?

-3

  • People have a slight negative finger. They haven’t even tested this solution. 1. The answer doesn’t depend on more information from @Renan-carlos. 2. I had the same problem and Marcelo’s solution didn’t work for me either. 3. If you are reading and have more than one project in the same Solution (.sln), try this because it worked for me.

  • 2

    @Luizfelipe answer even answers, but the problem of the answer is another, the problem is that this error is wide, it can be for different reasons in Webapi, may even be the reason of what the author said, but if for example it is an attempt to change the port or even the address then you can get the same error, the answer is practically a kick and may have worked for the superduper, but if it was another fault source it would not solve, then only pq solves in one scenario does not mean it solves at all.

  • 2

    My previous comment was automatically generated by the revision. Just to mention that I nay negativei the answer. I just think that as this answer is basically a link would be more appropriate to put as a comment.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.