Wayne Brantley
Wayne Brantley

Reputation: 694

mini-profiler javascript and css includes are not returned

Included code in global.asax to start and stop profiling.

When I view a page there are failed requests to load ssr-jquip, ssr-includes (javascript and css).

This worked before - last time I looked at it was a couple of versions of service stack ago.

What do I need to do or have to get these files to be delivered by servicestack.net?

Request Failures

Upvotes: 2

Views: 286

Answers (2)

labilbe
labilbe

Reputation: 3584

You can handle this problem using the following syntax too:

Profiler.Settings.RouteBasePath = "~/newpath";

Upvotes: 0

Wayne Brantley
Wayne Brantley

Reputation: 694

Turns out that if you change your ServiceStackHandlerFactoryPath and use a path that starts with a forward slash, the script references generated by mini profiler are incorrect.

So, for example, if you do this:
var endpointHostConfig = new EndpointHostConfig { ServiceStackHandlerFactoryPath = "/newpath", }; then you reference localhost:2343/newpath/someApiCall
Then mini profiler will emit references to newpath/ssr-includes.css which is not correct.

Changing your code to this: var endpointHostConfig = new EndpointHostConfig { ServiceStackHandlerFactoryPath = "newpath", };

Solves it.

Upvotes: 2

Related Questions