Thursday, December 8, 2011

Communication between Cache Hosts in Windows Server AppFabric

Today I am going to talk about, how the communication/coordination takes place in between the cache host(Nodes) of Windows Server AppFabric cache cluster

In short it is achieved by using TCP/IP protocol, and as we all know If it is tcp/ip then we have to set the exception rules in our Firewall…

In order to function fully, it is going to make use of 4 different ports each with its own purpose, By default ports starts from 22233 to 22236.(so to all these we need to set the exception in firewall)…

Now we will look at what these ports will listen on…

      1)  22233 – By this port it actually communicates between the cache clients – Hence it is a cache port
      2)  22234 – By this port it ensures the availability of each other in the cluster – hence it is a cluster port
      3)  22235 – By this port it ensures that the failed nodes/host are unavailable  - Hence it is called as Arbitration port
      4)  22236 – By this port it moves the data across the hosts – hence it is called as Replication port..

If your organization doesn’t like these default ports for any reason , then you can set your own ports by using the following Windows Powershell command….

I hope this helps!.


Wednesday, December 7, 2011

Storing Session State in Windows Server AppFabric Cache


Today I am going to post about how to make use of Windows Server AppFabric Cache as Session Store for the Asp.Net Web Application.

This can be achieved by following simple steps

    1)  Add the reference of following Assembly from the following location
a.  Microsoft.ApplicationServer.Caching.Core.dll
b.   Microsoft.ApplicationServer.Caching.Client.dll
The above 2 assemblies can be located at the following locations –


    2)  Add the following entry at the ConfigSections of the Web.Config

<section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection,
            Microsoft.ApplicationServer.Caching.Core, Version=,
            Culture=neutral, PublicKeyToken=31bf3856ad364e35"

    3)  Inside the configuration tag, add the following entry

        <host name="a4ml01382" cachePort="22233"/>
      <securityProperties mode="None" protectionLevel="None" />
      <transportProperties connectionBufferSize="131072" maxBufferPoolSize="268435456"
                         maxBufferSize="8388608" maxOutputDelay="2"  channelInitializationTimeout="60000" receiveTimeout="600000"/>


    4)  Inside the System.Web tag, add the following entry

 <sessionState mode ="Custom" compressionEnabled="true"customProvider="AppFabricCacheSessionStoreProvider" cookieless="false">
          cacheName="AspNetCacheName" />

    5)   You are all set to go from Client Asp.Net Application for making use of AppFabric cache   as Session store.. Now you need to do the following 2 steps to ensure that it works

a)  Ensure that the AppFabric Cache service is running
b)  Ensure that you have created the cache with the name – AspNetCacheName – because this is the place where in the session data is stored( We have explicitly named this ‘AspNetCacheName ‘ in step 4 )

I hope this helps!.


Tips - Windows Server AppFabric - Security Options


In this post i will be talking about the different options available while setting up the security for AppFabric cache.

Command to use setup the security..

Set-CacheClusterSecurity -SecurityMode None -ProtectionLevel None

Possible values for parameters

 SecurityMode -
     None, Transport
        A setting of Transport enables security, whereas a setting a None disables security.
ProtectionLevel  -

   Specifies the type of security applied to cache cluster data

I Hope this helps!.


Tips - Windows Server AppFabric - Grant/Revoke

Hi All,

In this post i will talk about some of the commands which you will need to use while allowing/dis-allowing the permissions for Windows Server AppFabric cache

       1)  If you need to grant any access to a particular account 

Grant-CacheAllowedClientAccount -Account "DOMAINNAME\username"

2) If you want to revoke the access to a particular account

Revoke-CacheAllowedClientAccount -Account "DOMAINNAME\username"

3) At any point in time, if you want to get the list of all accounts which are having the access to the cache, you can use - 


In next post i will talk about the different options available while settings the security to AppFabric cache

I Hope this helps!.


Tips about Windows Server AppFabric Security

A couple of days back i was trying to setup the Windows Server AppFabric. I had plenty of learning’s with this exercise and hence i thought of to share with you all.....Believe me this is an amazing powerful product from Microsoft.

Here goes the first tip...

Set-CacheClusterSecurity -SecurityMode None -ProtectionLevel None

This mode will become really handy, when you have a web application (A client to the Windows Server AppFabric) where in all the developers are trying to access the AppFabric with individual credentials.

Note: When you go live, Please ensure that you will enable the security and grant the access to the right credential/Account...

Will talk about the credentials settings in the forthcoming blogs..

I hope this helps!.