title: Publishing web api with swagger on IIS
body: <p>I am trying figure out how to publish a .net core 3 API with Swagger (SwashBuckle) after following this example <a href="https://docs.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle?view=aspnetcore-3.1&amp;tabs=visual-studio" rel="nofollow noreferrer">documentation</a> . So it works locally and when I hit F5 IIS Express launches the site under <code>http://localhost:8033/index.html</code></p>
  <p>Here is the Configure code in startup.cs:</p>
  <pre><code>public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
          {
              if (env.IsDevelopment())
              {
                  app.UseDeveloperExceptionPage();
              }
  
              app.UseRouting();
  
              app.UseAuthorization();
  
              app.UseEndpoints(endpoints =&gt;
              {
                  endpoints.MapControllers();
              });
  
              app.UseStaticFiles(new StaticFileOptions
              {
                  FileProvider = new PhysicalFileProvider(env.ContentRootPath),
                  RequestPath = new PathString(&quot;&quot;)
              });
  
              app.UseSwagger();
              app.UseSwaggerUI(c =&gt;
              {
                  c.SwaggerEndpoint(&quot;/swagger/v1/swagger.json&quot;, &quot;v1&quot;);
                  c.DocumentTitle = &quot;TestAPI&quot;;
                  c.DocExpansion(DocExpansion.None);
                  c.RoutePrefix = string.Empty;                   
              });                
          }
  </code></pre>
  <p>Next I published the API to a local folder and copied the files to the IIS folder on the server. If I open the server API domain I get a <code>page can’t be found</code>. Which address should I use to open up the swagger UI on the server? Is something missing from the configuration?</p>