Swagger not working on Azure Web app running as OWIN
<p>I have a ASP.NET Web API implemented as OWIN middleware. I hosted it on azure and now I have a problem using swagger. It is perfectly working on localhost but when I try it on azure I get this:</p>

<p><a href="https://i.stack.imgur.com/E80n8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E80n8.png" alt="enter image description here"></a></p>

<p>The way I did my configuration for swagger on the API was to completely remove SwaggerConfig.cs file and add all the configuration into my Startup.cs class as shown here: <a href="https://stackoverflow.com/questions/35547983/how-to-generate-documentation-using-swashbuckle-for-webapi-2-with-owin">How to generate documentation using swashbuckle for WebApi 2 with Owin</a> . If it is going to help, I am trying to implement oAuth2 between my API, identity server and client application.</p>

<p>Can you help me find out what is the reason for not getting swagger functionality on Azure?</p>

<p>EDIT: I also tried the solution from <a href="https://stackoverflow.com/questions/33914842/swagger-ui-returns-500-after-deployment">here</a> but without success. I went to my API->Properties->Buld tab->Changed to 'Release' configuration->In the output path added the same what was in the 'Debug' configuration and nothing.</p>

<p>My bin folder on Azure:</p>

<p><a href="https://i.stack.imgur.com/5xEEC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5xEEC.png" alt="Here you can see that the xml resource file is there"></a></p>