title: Swagger UI not generating in azure .net core but it is working in local
body: <p>Swagger UI is not creating in a .net core application when deployed in azure but it is working perfectly in local</p>
  
  <p>I have added this in</p>
  
  <p>ConfigureServices(IServiceCollection services) methode in startup.cs</p>
  
  <pre><code>services.AddSwaggerGen(c =&gt;
  {
  c.SwaggerDoc("v1", new Info
  {
  Version = "v1",
  Title = "API",
  Description = "API"
  });
  });
  </code></pre>
  
  <p>and</p>
  
  <pre><code>app.UseSwagger();
  app.UseSwaggerUI(c =&gt;
  {
    c.SwaggerEndpoint("/swagger/v1/swagger.json", "API");
    c.RoutePrefix = "swagger";
  });
  app.UseAuthentication();
  
  env.ConfigureNLog("nlog.config");
  loggerFactory.AddNLog();
  
  app.UseSignalR(routes =&gt;
  {
    routes.MapHub&lt;DashboardHub&gt;("/hubs/dashboard");
  });
  
  app.UseMvc(routes =&gt;
  {
     routes.MapRoute(
     name: "default",
     template: "{controller}/{action=Index}/{id?}");
  });
  
  app.UseSpa(spa =&gt;
  {
      spa.Options.SourcePath = "ClientApp";
  
      if (env.IsDevelopment())
      {
           spa.UseReactDevelopmentServer(npmScript: "start");
      }
  });
  </code></pre>
  
  <p>in Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)</p>