Support forum for ASP.NET Zero (
By alexanderpilhar
#31588 I'm having troubles with swagger ui after publishing Web.Host-project to on-premise IIS. It's just a test-deployment and is therefor located in a subfolder (accessible via https://mydomain.local/project-name/).

swagger ui shows following error message:

Failed to load API definition.
Fetch error
Not Found /swagger/v1/swagger.json

I guess this is because the project is located in a subfolder!?

If so, please, tell me how to make this work!
By alexanderpilhar
#31604 Thank you for your reply!

Your information did help me solve the problem after all!

Although it was not the only bit that had to be edited to make it all work. There also is the file Web.Host\wwwroot\swagger\ui\index.html that has to be edited - it references two files using absolute paths:

Code: Select all    <script src="/project-name/swagger/ui/abp.js"></script>
    <script src="/project-name/swagger/ui/abp.swagger.js"></script>

Maybe, this information should/could be included to the ticket you linked!?

Anyway, thank you very much for your help!
By alexanderpilhar
#31618 Yes, swagger ui looks good so far!

But authorization doesn't work. At first, I thought it wasn't a big problem - the URI was lacking the 'project-name', so I edited Web.Host\wwwroot\swagger\ui\abp.swagger.js. But there is still something else going wrong as I now receive HTTP 500 when trying to authenticate.