I'm having a little trouble implementing Swagger on an existing .NET 4.8 WebApi.
Using VS2019 I have used Nuget Package Manager to install Swashbuckle 5.6.0, it has added SwaggerConfig.cs into the App_Start folder. I have left this file stock-standard.
Online examples seem to imply that it should now run. I am running it locally in debug. I start the service, which by default goes to http://localhost:53374/about2.aspx
. Once there I alter the URL to http://localhost:53374/swagger/
.
That when I get the following error:
HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.
Things tried:
- deleting the
.vs
folder - checking for a Swagger folder under the root, result: nothing
- tried altering the URL to:
http://localhost:53374/swagger/ui/index
, no luck
I haven't enabled directory browsing as I don't think that is what this needs, as I tested a simple core API project with Swagger and it worked without this.
What else could I try? Any ideas are most welcome.
Could it be that Swagger needs some type of authorization?