Windows Azure AppFabric Cache error

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

When working with Windows Azure AppFabric Cache you might get following error:

ErrorCode<ERRCA0021>:SubStatus<ES0001>:Server collection cannot be empty.

Usually when I have no idea what the problem could be, I just assume that the error message is not very human friendly. The problem here is that you have probably just copied the configuration provided in management portal. Honestly you didn’t do anything wrong. The configuration there is provided to be copied.
The error shown above should be translated like “Hey dude, I like you very much, but you unfortunately use  officially provided configuration which is invalid :).

I’m sorry about that, the configuration is not really invalid. The problem is that comments in the provided configuration for SSL endpoint  is not clear enough.
Here is the original config:

  <dataCacheClient name="SslEndpoint">
      
<hosts>
        <host name="dootnetpro.cache.windows.net" cachePort="22243"/>
      </hosts>

 

      <securityProperties mode="Message" sslEnabled="true">
    
       <messageSecurity authorizationInfo="==">
        </messageSecurity>
      </securityProperties>
  </dataCacheClient>

and this is how it should be:

  <dataCacheClient name="default">
      
<hosts>
        <host name="dootnetpro.cache.windows.net" cachePort="22243"/>
      </hosts>

 

      <securityProperties mode="Message" sslEnabled="true">
    
       <messageSecurity authorizationInfo="==">
        </messageSecurity>
      </securityProperties>
  </dataCacheClient>

Uuppss :)


Posted May 12 2011, 11:16 PM by Damir Dobric
Filed under: ,

Comments

nooruddin wrote re: Windows Azure AppFabric Cache error
on 06-08-2011 10:06

i am trying to use azure appfabric cache. when copying dataCacheClient stuffs into web.config file I used the sslEndPoint option instead of default. I was getting the error shown above.

I made changes to it as per your instructions. Now I am getting the following error. This error also comes when I use the dataCacheClient tag without ssl.

Error :

Server Error in '/' Application.

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. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.)

nooruddin (nooruddin.khorasi@gmail.com) wrote re: Windows Azure AppFabric Cache error
on 06-08-2011 10:16

I am trying to use AppFabric cache to store session data.

While copying the dataCacheClients from Management Portal, I get two dataCacheClient nodes within it. One is default and other one is Ssl Enabled. I used Ssl Enabled as it is.

I also made changes to that as per your blog

developers.de/.../windows-azure-appfabric-cache-error.aspx

Now I am getting the following error :

Server Error in '/' Application.

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. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.)

My web.config file is as follows currently.

<?xml version="1.0"?>

<!--

 For more information on how to configure your ASP.NET application, please visit

 go.microsoft.com/fwlink

 -->

<configuration>

 <configSections>

   <!-- Append below entry to configSections. Do not overwrite the full section. -->

   <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core"

            allowLocation="true" allowDefinition="Everywhere"/>

 </configSections>

 <!-- Cache exposes two endpoints: one simple and other ssl endpoint. Choose the appropriate endpoint depending on your security needs. -->

 <dataCacheClients>

  <dataCacheClient name="default">

     <hosts>

       <host name="SFQBAzureCache.cache.windows.net" cachePort="22243" />

     </hosts>

     <securityProperties mode="None" sslEnabled="true">

       <messageSecurity

         authorizationInfo="YWNzOmh0dHBzOi8vc2ZxYmF6dXJlY2FjaGUtY2FjaGUuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldC9XUkFQdjAuOS8mb3duZXImT1hWVlNxV01xMk51NFRBYVl1aXZkTGVLQWozRkd3L2djK2NwczVRMjdvaz0maHR0cDovL1NGUUJBenVyZUNhY2hlLmNhY2hlLndpbmRvd3MubmV0">

       </messageSecurity>

     </securityProperties>

   </dataCacheClient>

 </dataCacheClients>

 <system.diagnostics>

   <trace>

     <listeners>

       <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

         name="AzureDiagnostics">

         <filter type="" />

       </add>

     </listeners>

   </trace>

 </system.diagnostics>

 <connectionStrings>

   <add name="ApplicationServices"

       

Xun wrote re: Windows Azure AppFabric Cache error
on 10-13-2011 20:53

unfortunately, this does not work

Priti wrote re: Windows Azure AppFabric Cache error
on 12-27-2011 20:54

With multiple dataCacheClient sections, you need to specify the dataCacheClient Name while creating the DataCacheClientConfiguration object.

Example : for using the SSLEndpoint, use this while creating a DataCache object.

DataCacheFactoryConfiguration conf = new DataCacheFactoryConfiguration("SslEndpoint");

DataCacheFactory dcf = new DataCacheFactory(conf);

DataCache dc = dcf.GetDefaultCache();

If you do not specify the client name it will try to look for the default - which you might have removed from your app's config

Anil wrote re: Windows Azure AppFabric Cache error
on 01-09-2013 20:09
developers.de is a .Net Community Blog powered by daenet GmbH.