After upgrading to ServiceStack 4.0.38 when I call SessionFeature.GetSessionKey() I receive the error:
AppHost does not support accessing the current Request via a Singleton
Have you any idea how to solve the problem? Thanks
After upgrading to ServiceStack 4.0.38 when I call SessionFeature.GetSessionKey() I receive the error:
AppHost does not support accessing the current Request via a Singleton
Have you any idea how to solve the problem? Thanks
ServiceStack allows optional IRequest
parameters for some API's where it's able to infer the Request when the Host allows singleton access to the current Request. Currently this works in ASP.NET hosts which provides access to the current request via HttpContext.Current
.
For HttpListener Self-Hosts you should always supply the Current IRequest
, e.g:
var sessionKey = SessionFeature.GetSessionKey(base.Request);
GetSessionId(IRequest req)
changed: github.com/ServiceStack/ServiceStack/blob/v4.0.23/src/… vs github.com/ServiceStack/ServiceStack/blob/master/src/…
Jul 8, 2016 at 19:30