I was setting up a new MVC 5 site on a Windows Server 2016 Datacenter machine when I ran into this error:
HTTP Error 403.14 – Forbidden – The Web server is configured to not list the contents of this directory.
I didn’t actually want the web server to list the contents, so that was not the problems.
This fancy Internet thing had lots of suggestions, the best ones at Stack Overflow. However, those didn’t solve my problem. What did solve my problem was to correct a dumb mistake. Here was my IIS configuration:
You’ll notice the ever-populate “ScottSite” is looking like a sad, plain folder. And that was my problem – I hadn’t turned it into an application. Right-clicking on my non-application and selecting “Convert to application” fixed my problem. Magic.