title: Swagger 'swagger.json' loads, but 404 error on swagger UI '{localhost}/swagger' in AspNet project
body: <p>Working on setting up swagger for a web application hosted with IIS using AspNetCore. The .json page loads and seems to be touching all the API just fine, however when navigating to {localhost}/swagger to view the UI page I receive a 404 error. I have the following code in Startup.cs:</p>
  
  <pre><code>//Configure Services
  
  
       services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
  
              services.AddSwaggerGen(c =&gt;
              {
                  c.SwaggerDoc("v1", new Info { Title = "API ", Version = "v1" });
                  c.ResolveConflictingActions(apiDescriptions =&gt; apiDescriptions.First());
              });
  
              }
  
  
  //Configure
              app.UseSwagger();
              app.UseStaticFiles();
  
              app.UseDeveloperExceptionPage();
  
              // Enable middleware to serve generated Swagger as a JSON endpoint.
  
              // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.),
              // specifying the Swagger JSON endpoint.
              app.UseSwaggerUI(c =&gt;
              {
                  c.SwaggerEndpoint("./swagger/v1/swagger.json", "My API V1");
                  //c.RoutePrefix = string.Empty;
              });
  
              app.UseMvc();
          }
  
  </code></pre>
  
  <p>Does anyone see any potential issues with this? Or have any suggestions in terms of troubleshooting? Have been working on this for a while now, hopefully a fresh set of eyes can see something I'm not. </p>