IRequest.GetSession() Generating Exception in 5.0.3

Hi, I’m using a ServiceStack Library that serves as a Rate Limiter (via Global Request Filter). In a recent build of 5.0.3, I’m getting an Exception when when that library calls IRequest.GetSession() (The IRequest is a ServiceStack.Host.AspNet.Request).

{“Method not found: ‘ServiceStack.Text.JsConfigScope ServiceStack.Text.JsConfig.With(System.Nullable1<Boolean>, System.Nullable1, System.Nullable1<Boolean>, System.Nullable1<ServiceStack.Text.ParseAsType>, System.Nullable1<ServiceStack.Text.ParseAsType>, System.Nullable1, System.Nullable1<Boolean>, System.Nullable1, System.Nullable1<Boolean>, System.Nullable1, System.Nullable1<Boolean>, System.Nullable1, System.Nullable1<Boolean>, System.Nullable1<ServiceStack.Text.DateHandler>, System.Nullable1<ServiceStack.Text.TimeSpanHandler>, System.Nullable1<ServiceStack.Text.PropertyConvention>, System.Nullable1<Boolean>, System.Nullable1, System.String, System.Func2<System.Type,System.String>, System.Func2<System.String,System.Type>, System.Nullable1<Boolean>, System.Nullable1, System.Nullable1<Boolean>, System.Nullable1, System.Nullable1<Boolean>, System.Nullable1, System.Nullable1<Boolean>, System.Nullable1, ServiceStack.EmptyCtorFactoryDelegate, System.String[], System.Nullable`1)’.”}

Stack Trace looks like (edited paths):

"   at ServiceStack.Redis.RedisClient.Exec[T](Func`2 action)\r\n   
	at ServiceStack.Redis.RedisClient.Get[T](String key)\r\n   
	at ServiceStack.Redis.RedisClientManagerCacheClient.Get[T](String key)\r\n   
	at ServiceStack.ServiceExtensions.GetSession(IRequest httpReq, Boolean reload)\r\n   
	at ServiceStack.RateLimit.Redis.LimitKeyGenerator.GetConsumerId(IRequest request) in \\src\\ServiceStack.RateLimit.Redis\\LimitKeyGenerator.cs:line 58\r\n   
	at ServiceStack.RateLimit.Redis.LimitKeyGenerator.GetConfigKeysForRequest(IRequest request) in src\\ServiceStack.RateLimit.Redis\\LimitKeyGenerator.cs:line 27\r\n   
	at ServiceStack.RateLimit.Redis.LimitProviderBase.GetRequestLimits(IRequest request) in src\\ServiceStack.RateLimit.Redis\\LimitProviderBase.cs:line 85\r\n   
	at ServiceStack.RateLimit.Redis.LimitProviderBase.GetLimits(IRequest request) in  \\src\\ServiceStack.RateLimit.Redis\\LimitProviderBase.cs:line 47\r\n   
	at ServiceStack.RateLimit.Redis.RateLimitFeature.ProcessRequest(IRequest request, IResponse response, Object obj) in \\ServiceStack.RateLimit.Redis\\RateLimitFeature.cs:line 72\r\n   
	at ServiceStack.ServiceStackHost.<ApplyRequestFiltersSingleAsync>d__315.MoveNext()"

Any Ideas? The build I had that was working was from 1/31, so the change happened since then. I’m positive I’ve flushed all my nuget caches, so I don’t believe it’s a version mixup.

ok looks like this PR added an extra optional param to JsConfig.With() which unfortunately is a binary incompatible change so I’ve just rebuilt all dependent projects which has now been published to MyGet.

So if you clear your NuGet cache again it should now work:

$ nuget locals all -clear
1 Like