AppFabric Session State Provider 1.1 (Microsoft.Web.DistributedCache.dll
) requires .net 4 and adds many new features. You can see how to configure it here but there is no way to use it as a state provider for a .net 2.0 web site.
Hopefully, AppFabric Session State Provider 1.0 (Microsoft.ApplicationServer.Caching.Client.dll
) is compatible with AppFabric 1.1. You just have to be carefull on the web.config because the configuration section is not the same.
Here is a very basic web.config :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<!--configSections must be the FIRST element -->
<configSections>
<!-- required to read the <dataCacheClient> element -->
<section name="dataCacheClient"
type="Microsoft.ApplicationServer.Caching.DataCacheClientSection,
Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
allowLocation="true"
allowDefinition="Everywhere"/>
</configSections>
<!-- cache client -->
<dataCacheClient>
<!-- cache host(s) -->
<hosts>
<host
name="YOURSERVERHERE"
cachePort="22233"/>
</hosts>
</dataCacheClient>
<system.web>
<sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider">
<providers>
<!-- specify the named cache for session data -->
<add
name="AppFabricCacheSessionStoreProvider"
type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider"
cacheName="NamedCache1"
sharedId="SharedApp"/>
</providers>
</sessionState>
</system.web>
</configuration>