Client Caching error: ErrorCode<ERRCA0017>:SubStatus<ES0006>


  • Hi,

    I'm getting the following error when trying to use a client cache:

    ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified Cache servers are unavailable, which could be caused by busy network or servers. Ensure that security permission has been granted for this client account on the cluster and that the AppFabric Caching Service is allowed through the firewall on all cache hosts

    Note that I have set the firewall rules to enable caching, configured the cache using powershell commands use-cachecluster and can access the cache via powershell.

    The machine is Windows 7 with the AppFabric beta 2 refresh version installed.

    The client code is:



    List<DataCacheServerEndpoint> servers = new List<DataCacheServerEndpoint>(1);



    new DataCacheServerEndpoint("localhost", 22233));



    DataCacheFactoryConfiguration configuration = new DataCacheFactoryConfiguration();

    configuration.Servers = servers;

    configuration.LocalCacheProperties =


    new DataCacheLocalCacheProperties();

    configuration.SecurityProperties =


    new DataCacheSecurity(DataCacheSecurityMode.None, DataCacheProtectionLevel.None);




    myCacheFactory =


    new DataCacheFactory(configuration); // ERROR HAPPENS HERE

    Would appreciate your assistance.


    Thursday, May 06, 2010 1:28 AM

All replies

  • Hi,

    You are seeing this error because of the security property mismatch between client and server.

    In your client code you disabled the security (Mode=None and PotectionLevel=None) whereas the cache server uses mode=Transport and PotectionLevel=EncryptAndSign (default in Beta2Fresh bits).

    Do either of the following:

    1) In the client code use the default security i.e. configuration.SecurityProperties =new DataCacheSecurity();

    2) Disable the security at server to match with your existing client code. Use Powershell cmdlet Set-CacheClusterSecurity -SecurityMode None -ProtectionLevel None 




    Thursday, May 06, 2010 5:56 AM
  • Shankar,

     I'm also getting that error and i have done things which u've mentioned.. But i m still getting the error.. Can u please guide me more??

    I've downladed sample code and trying to run that but getting error..



    Friday, May 14, 2010 12:15 PM

  • 1) The host name for the end-point mentioned in the sample code is "LocalHost", that means you are running this sample on the cluster host, if it is true then you need to run the sample in elevated mode  (i.e. run as administrator).
    2) If the sample is not being excuted on the cluster host then replace 'Localhost' with the cluster host name in the sample code.


    Friday, May 14, 2010 12:35 PM
  • I'm also getting this error.  

    I'm trying to get AppFabric cache up and running on my local development environment. I haveWindows Server AppFabric Beta 2 Refresh installed, and the cache cluster and host configured and started running on Windows 7 64-bit. I'm running my MVC2 website in a local IIS website under a v4.0 app pool in integrated mode.

    HostName : CachePort      Service Name            Service Status Version Info
    --------------------      ------------            -------------- ------------
    -3TQHQL1:22233          AppFabricCachingService UP             1 [1,1][1,1]

    I have my web.config configured with the following:

    <section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" allowLocation="true" allowDefinition="Everywhere"/>

    <host name="SN-3TQHQL1" cachePort="22233" />

    I'm getting an error when I attempt to initialize the DataCacheFactory:

        protected CacheService()
    = new DataCacheFactory(); <-- Error here
    = _cacheFactory.GetDefaultCache();

    I'm getting the ASP.NET yellow error screen with the following:

    An existing connection was forcibly closed by the remote host

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

    Source Error:

    Line 21:         protected CacheService()
    Line 22:         {
    Line 23:             _cacheFactory = new DataCacheFactory();
    Line 24:             _defaultCache = _cacheFactory.GetDefaultCache();
    Line 25:         }

    Friday, May 14, 2010 2:27 PM
  • Wallace,
    The root cause of the problem you are facing might not be same as what is mentioned above.In your case you are using the cache client from the IIS web application. What is identity of the App pool? If it is "Network Service" then you need to grant this account (machine$) for cluster access using the Powershell admin comdlet: Grant-CacheAllowedClientAccount domain\<machine>$ (here the <machine> is the host name where IIS is runnig)

    The account under which the Cache client application is running must be granted the cluster access using Grant-CacheAllowedClientAccount.

    if "ErrorCode<ERRCA0017>:SubStatus<ES0006>" exception is seen then check the follwing
    1) Check if the right cache host name is given in the App/web config or in the client application
    2) Check if the cache client and server are using the matching security properties (mode and protectionLevel)
    3) Check if the cleint account is granted the cluster access
    4) Finally check if the firewall is enabled on the cluster host for DistributedCachingServce.exe (this will be enabled by the AppFabric config wizard if it is opted-in while installing)


    • Proposed as answer by SemiMax Tuesday, June 01, 2010 5:44 AM
    Tuesday, May 18, 2010 10:20 AM
  • yup i tried all.. but it wasn't worked for me.. I tried to re downloading appfabric exe and noticed the name of the version which i had had was "WindowsServerAppFabricSetup_x86_6.1.exe" and its size was 3.8 MB.. However, the new version which i have downloaded has the name WindowsServerAppFabricSetup_x86_6.1_new.exe and its size was 41.3 MB..

    After installing the new version ... My application started working..

    Those who aren't yet succeeded to resolved this error should try to download this new exe..

    • Proposed as answer by SemiMax Tuesday, June 01, 2010 5:56 AM
    Tuesday, June 01, 2010 5:55 AM
  • Hi,


    I ran into this error as well. I just added session caching to one of our applications using these settings in web.config:

      <!-- cache host(s) -->
    <sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider">
        <!-- specify the named cache for session data -->
         type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider, Microsoft.ApplicationServer.Caching.Client, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"


    The installation is done in a workgroup context, using the xml configuration option.

    The database is on the same machine as the application that should be using it.

    The application is using the AppServiceAppPool that appfabric created on install. This uses NetworkService as it's identity so I added networkservice to the grant list (Grant-CacheAllowedClientAccount networkservice).

    The security settings should be the default ones, and I have turned off the firewall just to make sure that it's not interfering.


    Is there anything I'm missing?

    Thanks for the help in advance.

    Friday, July 16, 2010 9:58 AM
  • When using networkservice, you should grant access to the machine account for the web server. So if you have machine WebServer1 on Domain1, you would use the command:

    Grant-CacheAllowedClientAccount Domain1\WebServer1$

    If that's not what you did, try that and see if it works. Thanks!

    Jason Roth

    Friday, July 16, 2010 10:12 AM
  • See, that's my problem, my computer is a development machine, it's not on a domain, and there's nothing out there about granting access to the cluster in this case.

    As someone pointed out, if you're not on a domain the installation is anything but trivial.



    Since this is only a testing machine I decided to turn off security completely and this seems to have solved the problem.

    Friday, July 16, 2010 10:25 AM
  • When you're in a workgroup environment, I believe you have to disable security. Security is available for Windows Authentication in a domain environment. BTW, for anyone else reading the thread, you can disable security with the following Windows PowerShell command:

    Set-CacheClusterSecurity -ProtectionLevel None -SecurityMode None

    And then you can re-enable security if needed with this command:

    Set-CacheClusterSecurity -ProtectionLevel EncryptAndSign -SecurityMode Transport



    Monday, July 19, 2010 12:25 PM
  • For anyone reading this post in the future with the error above, there is a new Windows Server AppFabric Deployment and Management Guide that contains a troubleshooting section. This problem and possible solutions are included in this topic:

    Server Unavailability Troubleshooting (Windows Server AppFabric Caching)



    Tuesday, August 10, 2010 6:03 PM
  • If you're using a website/webapplication/webservice you should allow the iis user:

    Grant-CacheAllowedClientAccount IIS_IUSRS

    • Proposed as answer by Ashwin Seshadri Thursday, February 07, 2013 12:47 AM
    Friday, October 22, 2010 10:56 AM
  • I had a similar issue and it drove me mad. I finally figured out that when I had accepted the default install options that the CachePort was set to 22215 rather than 22233. Hence when I changed this in my XML Configuration file and stoped and started the cluster everything worked.

    I am not sure why it installed to this port but I just took it for granted that that’s how it was set up and looked at everything else but the port. Hope this helps somebody and saves them hours of testing and looking for needles in haystacks.



    Monday, January 10, 2011 6:32 PM
  • I think you meant to say: Depending which user your application pool is using you must grant that user, or am I wrong?
    Tomas Jansson
    Wednesday, January 19, 2011 11:41 AM
  • Yes. You take the identity/user that the application pool is running under, and grant that user access to the cache cluster. That way the web applications running in that application pool can use the cache cluster.

    Jason Roth

    Friday, January 21, 2011 9:20 PM
  • run -> services.msc

    see that Appfabric Caching service is running or not, if not  RC and start  running it.

    this is also one of the cause which show the above described error.

    this worked for me

    Monday, January 09, 2012 9:21 AM

  •  FIX: This error is generally seen when you try to use Cache client from an IIS web application.

    A simple solution will be to grant access for cluster access using Grant-CacheAllowedClientAccount  to everyone but this is not a proper solution as it may create other security issues .

    The better way is to grant access for cache cluster to a user with admin role.

    Then change your web application – application pool identity account to the same user who has been granted access for using Appfabric cache cluster .

    Troubleshooting Appfabric – Common configuration errors and fixes 

    Found on blogs.quovantis.com

    • Edited by ASP MONK Monday, October 28, 2013 5:04 PM
    Monday, October 28, 2013 5:00 PM