Html assets on v6.7

We have a Servicestack API hosted in a virtual application within IIS. When attempting to view the Auto API HTML we have issues with the location of the css and js files. Assuming our virtual folder is called test and our API path is ‘/api’. Servicestack attempts to load the files from the following locations (note that the CSS is generated with the virtual folder name whereas the js files are not).

https://site.localhost/test/css/highlight.css
https://site.localhost/js/highlight.js

These files are actually accessible at the following locations:

https://site.localhost/test/api/css/highlight.css
https://site.localhost/test/api/js/highlight.js

How do we configure the application to point to the correct location for these resources?

Can you try with the latest v6.7.1 on MyGet as we fixed similar issues to this previously.

Upgraded to v6.7.1 and seeing some slightly different behaviour, but still not as expected. We’ve copied the URLs of the resources being loaded so you can see the differences.

https://test.localhost/test/css/highlight.css
https://test.localhost/test/css/ui.css
https://test.localhost/test/js/highlight.js
https://test.localhost/test/js/components/Code.mjs
https://test.localhost/test/js/components/CopyIcon.mjs
https://test.localhost/test/js/components/CopyLine.mjs

https://test.localhost/js/vue.mjs
https://test.localhost/js/servicestack-client.mjs
https://test.localhost/js/servicestack-vue.mjs

We’ve tried specifiying the ApiPath in the SharpPagesFeature to be ‘api’ to match our HandlerFactoryPath in the AppHost, but this has no effect on the URL locations.

ok great thx for the info, managed to repro the issues.

Can you try again with the latest v6.7.1 on MyGet, you’ll need to clear your NuGet packages cache to get the latest version.

This has worked - many thanks for the quick turnaround. G

1 Like