title: Swagger run locally but not on IIS, not resolving base path
body: <p>I am setting up Swagger for documenting my API.</p>
  
  <p>I have set up the <code>SwaggerEndpoint</code> with a relative path the the specification json, like you see below:</p>
  
  <p><a href="https://i.stack.imgur.com/eqMOU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eqMOU.png" alt="startup configuration"></a></p>
  
  <p>When I debug locally, everything resolves fine. But my site just runs as <code>http://localhost:44348/index.html</code>. </p>
  
  <p>When I deploy to IIS, which is on a virtual path, it blows apart:</p>
  
  <p><a href="https://i.stack.imgur.com/yhbEb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yhbEb.png" alt="not resolving swagger.json"></a></p>
  
  <ol>
  <li>Note that the URL in the browser has <code>/imaging4castapi_UAT/</code> as part of the path</li>
  <li>Note that the actual request for the swagger.json is missing that base part of the path.</li>
  </ol>
  
  <p>Here's what I've tried:</p>
  
  <ol>
  <li>I tried removing the <code>RoutePrefix</code> override. But that doesn't resolve.</li>
  <li>I tried using an application path like <code>"~/swagger/..."</code> but that's translated by the server on view elements like Razor pages and css and doesn't work here in <code>Startup</code>.</li>
  </ol>
  
  <p>I'm struggling to understand if this is a client setup issue or something related to how my site is hosted on IIS.</p>
  
  <p>Thoughts?</p>