Failed to load Swagger API definition for a Newly Published .NET Core 6.0 API

Bill Eisenman 21 Reputation points

I just pushed a .NET Core 6.0 WebAPI to Azure AppService. When I access the location I receive
the following error issued when accessing the default URL at below:

Message: Failed to load API definition.

Fetch error
Not Found

My API works perfectly using localhost and within my code, the swagger.json should be located at Further, if I access the URL directly
I can view the contents of the swagger.json as expected.

Why is this and how can I fix it? Please Advise.

Bill Eisenman
FastTrak@Luxsparks .com

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,028 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Arbaz Qureshi 11 Reputation points

    When you have the same name of API Endpoints in the same controller then it will give this error.

    2 people found this answer helpful.
    0 comments No comments

  2. Chanchal Rawat 1 Reputation point

    Dear @Bill Eisenman

    i am able to see the swagger page for your webApp


    looks it is working now