What is the error HTTP Error 403.14?

3

Well, I have an Api Web, 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 it raises 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 default document is not configured for the requested URL, and the search in the > directory is not enabled on the server.

Why does this happen?

How can I solve this problem?

    
asked by anonymous 12.12.2017 / 13:31

1 answer

0

As the MS help :

  

Why does this 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 the 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
    
12.12.2017 / 13:47