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: http://www.cshandler.com/2011/07/using-window-server-appfabric-for.html.
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:
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<!-- other assemblies -->
<add assembly="Microsoft.ApplicationServer.Caching.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>
</system.web>