AppFabric QuickStart

  1. Install AppFabric from, use all defaults, only install Cache Service
  2. Go to Cache Power Shell and enter new cache
     New-Cache -cacheName Catalog
  3. Start AppFabric service in services.msc
  4. Run command Start-CacheCluster
  5. Add references to cache dlls (found in WINDIR)
  6. .Simple code:
public string GetData(int value)
    DataCacheServerEndpoint[] cacheCluster = new DataCacheServerEndpoint[1];
    cacheCluster[0] = new DataCacheServerEndpoint("localhost", 22233);
    DataCacheFactory factory = new DataCacheFactory(new DataCacheFactoryConfiguration
        Servers = cacheCluster,
        MaxConnectionsToServer = 1,
    DataCache cache = factory.GetCache("Catalog");

    cache.Put("Product100", 20);

    object x = cache.Get("Product100");

    Trace.Write("Got the Put x: " + x);

    catch (DataCacheException ex)
        if (ex.ErrorCode != DataCacheErrorCode.RegionAlreadyExists)

    return string.Format("You entered: {0}", value);


Known Issues:

One or more specified cache servers are unavailable, which could be caused by busy network or servers. Please ensure security permission has been granted for this client account on cluster and ensure that cache service is allowed through firewall on all cache hosts.

Make sure that AppFabric Caching Service is started. Also check firewall

The request failed because the server is in throttled state.

Intermittent issue, can be tracked by enabling the Application and Services logs/Application Server-System Services/Operational (right-click Enable)

Sample warning message found:

Service available memory low – Cache private bytes percent {1} Cache working set percent {1} Cache data size percent {0} Available memory percent {5} CLR Generation2 count {22} Released memory percent {0}.


More details:


About vijayvepa

I'm a software consultant for Software Specialists Inc. currently working at Philips Respironics, Pittsburgh

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: