5.8 JsonServiceClient - BaseGetAllKeys Null Reference on Client.Get / Client.Post #56
Replies: 1 comment 1 reply
-
Looks like the Exception is happening from within the public virtual void AddHeader(WebRequest webReq, NameValueCollection headers)
{
if (headers == null)
return;
foreach (var name in headers.AllKeys)
{
webReq.Headers[name] = headers[name];
}
} So I'd be looking at making sure the If the client isn't stateful, you can inject a client factory instead, e.g. injecting a factory function like If your API can be made to be async you can try switching to use a JsonHttpClient instead. If you're trying to call an internal ServiceStack Service (i.e. within the same AppHost) you should change to use the Service Gateway instead. That's about the only thing I can recommend without a stand-alone repro (using the latest version) that we can run locally to repro the issue. |
Beta Was this translation helpful? Give feedback.
-
Hi there,
We have been struggling with a intermittent issue recently, and was wondering if anyone here is able to shed some light on this situation please. We find our JsonServiceClient begins to throw exceptions and the StackTrace provided below into our error logging shows the following error.
Our ServiceStack implementation is hosted alongside a MVC implementation, and works perfectly. However when this exception occurs - our API services go down, and don't restore themselves until after manual intervention and a restart of IIS / server.
All of our JsonServiceClient requests - all throw the above errors when attempting to send any sort of request.
We are using ServiceStack 5.8 and use a BaseService Implementation for all our API Services that inherits from ServiceStack.Service class - and we inject our JsonServiceClient on this base class which all our API Services start to use.
What we also then find, when this issue presents itself, is that our other 'Non-API Specific ServiceStack JsonClientService requests still works allright as users are still able to login into our site, and navigate around which all utilizes ServiceStack JsonServiceClient - but on a different 'area' / set of controllers in MVC.
and a example of
Note: We are at the point now where we need this resolved, and if we need direct support by purchasing the Business Perpetual License from ServiceStack - we also don't mind doing at this point, if we can find a stable resolution and move on from this annoying issue.
Any information / advice would be greatly appreciated.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions