Monday, July 14, 2014

Trying the ASP.NET session state provider for Redis

After the news about the support for Redis on Windows Azure, Microsoft also announced a preview release of an ASP.NET session state provider for Redis.

I am using the ServiceStack.Redis client for a long time, but I wanted to give it a shot and switched to the Microsoft.Web.RedisSessionStateProvider. However when I tried to use it, ASP.NET returned a yellow screen of death and showed the following error message:

“Could not load file or assembly ‘StackExchange.Redis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46’ or one of its dependencies. The system cannot find the file specified.”

clip_image002

The RedisSessionStateProvider is using the StackExchange.Redis client behind the scenes. As I installed it through NuGet, a newer version of the assembly was installed than expected. I fixed it by removing both NuGet Packages and first installing an older version of the StackExchange.Redis client.

No comments: