Friday, August 17, 2012

Configuring AppFabric caching

For a project we are planning to scale out to a web farm solution. Therefore we started by configuring the AppFabric cache using the information found here:

However no success, when we tried to run the site we ended up with the following yellow screen of death:


After further investigating the issue, we noticed a little bit more useful error message

Could not load type "Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider”

We had added the correct reference so why couldn’t  the application find that class? In the end we found out that some lines were missing inside the assemblies section of our web.config:

<compilation debug="true" targetFramework="4.0">
<!-- other assemblies -->
<add assembly="Microsoft.ApplicationServer.Caching.Client, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="Microsoft.ApplicationServer.Caching.Core, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

No comments: