Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

872
Visualizações
.Net Core Web API Swagger No webpage was found for the web address: http://localhost/swagger

I'm working on .NET core web API and I wanted to integrate the project with Swagger.

I have followed all the steps in this article https://dev.to/amoenus/how-to-integrate-swagger-ui-in-a-net-core-web-api-application-amoenus-dev-13o1

Now the project is not running on IIS , So to navigate to swagger I typed http://localhost:8080/swagger.

Because I have this in StartUp

app.UseSwaggerUI(c =>
        {
            c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API");
            c.RoutePrefix = string.Empty;
        });

And honestly I assumed the port is 8080 because I don't know what is my port.

Can someone tell me if I can have swagger if i'm not running on IIS and how to know exactly my localhost port?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Settings are in launchSettings.json and it is under Properties folder in web api root. Below is sample from my settings.

"profiles": {
    "test-web-api": {
      "commandName": "Project",
      "dotnetRunMessages": "true",
      "launchBrowser": true,
      "launchUrl": "swagger",
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "local"
      }
    },
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "launchUrl": "swagger",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "local"
      },
      "use64Bit": true
    }
  }
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda