locked
Cant get Swashbuckle (swagger) to work RRS feed

  • Question

  • User245220787 posted

    I've built a small Web API and I ran these commands:

    PM> Install-Package Microsoft.AspNet.WebApi.WebHost
    PM> Install-Package WebActivatorEx
    PM> Install-Package Microsoft.AspNet.WebApi.Core
    PM> Install-Package Swashbuckle.Core
    PM> Install-Package Swashbuckle

    Installed worked, but when I run it...... I cannot navigate to /swagger to see it work...

    What might be wrong? It's like it's not running

    Thursday, May 30, 2019 1:12 AM

Answers

  • User283571144 posted

    Hi lasseedsvik,

    According to your description, I have created an empty web application project and install the package according to your command. It works well.

    Result as below:

    I suggest you could post more details information about how you build your web api project. 

    Accoridng to this github article, different application host environment need different swagger setting.

    Do you have some special settings in the SwaggerConfig.cs file?

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 30, 2019 5:44 AM

All replies

  • User283571144 posted

    Hi lasseedsvik,

    According to your description, I have created an empty web application project and install the package according to your command. It works well.

    Result as below:

    I suggest you could post more details information about how you build your web api project. 

    Accoridng to this github article, different application host environment need different swagger setting.

    Do you have some special settings in the SwaggerConfig.cs file?

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 30, 2019 5:44 AM
  • User245220787 posted

    I redid the project and now it works... not sure what was missing in the first one...

    Friday, May 31, 2019 2:58 PM