In .net core Swagger UI fails with error 500 : undefined http://localhost:53613/resources

I’ve just started setting up a .net core project (first timer) and when I install the Admin and Swagger UIs I am having issues - something seems to interfere with the registration of the endpoints and/or serving the contents?

E.g. I can navigate to the http://localhost:53613/swagger-ui/ url and see the usual green bar with u/p form at the top, but below that I see the error from the title: undefined /resources endpoint? I see in the serviceststack source code that this endpoint should be registered by the plugin - except its obviously not?

(Possibly related?) when I go to the http://localhost:53613/ss_admin/autoquery/ url, i’m confronted with a blank page and in the Chromne developer console, i see that i am getting a 404 with http://localhost:53613/autoquery/metadata not found?

Sorry if i am missing something obvious, as I’m a .net core n00b.

Please provide the .NET Core and AppHost registration which is failing.

Hey Mythz… this might be a package issue. I tried the same code on my home (rather than work) computer, and noticed that the nuget packages that were referenced were at times .NET Framework libs, instead of the .Core equivalents (I didnt even realise that would build/compile, let alone semi-work), which I believe happens when Resharper tries to use existing libs already on my machine (the HintPaths in the .csproj file were all trying to refer to my local \User\dale.nuget folder on my machine).

When i removed those refs and readded them (explicitly, using command line package install), both Swagger and the Admin / Autoquery UI work perfectly!

I use Resharper’s auto-add reference functionality a lot, but to be honest it seems to cause me quite a number of issues just like this one, and I haven’t figured out how to make it just skip the hintpath because it seems to break more often than not.


1 Like

FYI in ServiceStack v5 .NET Core projects have been merged into main packages, so the ServiceStack v5 packages on MyGet is the latest version.