I’ve been scrathing my nerves trying to get around an Azure Cache relates situation that I came across in one of my recent projects.

There are multiple caching scenarios and options available for Azure, but I’m going to talk about this in a different post. For now, just keep in mind that I decided to go with a dedicated co-located role for caching, which basically means a different VM that serves all the caching request. I’ve also configured the caching clients (all the pieces of code that request cache) to use the caching cluster configured on that Azure Caching Role.

In order to configure that particulat scenario, you have several options available for importing the references (.dlls) and configuring your configuration files (mostly web.config sections), but the most common and simple usage scenario is to go with the NuGet Package Manager and install the Windows Azure Caching package.

As of 31st of July, the latest version of WAC package is Moreover, if you search around your favourite search engine a little, you’ll come across an article mentioning the WAC package and that you should configure the NuGet package Manager to show pre-release versions of the package as well. This article was posted somewhere in late-June. IMHO, once I saw was already a stable release, I was amazed and pleased by the hard work of the Azure team at Microsoft.

After installing the package, I got this strange exception in my code:

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.). Additional Information : The client was trying to communicate  with the server: net.tcp://MvcWebRole1:24233.

The inner exception stated:

No such host is known

Unfortunatelly, both exceptions are extremely generic, considering the cache cluster name is configured corrently and running smoothly (you can always use the Azure emulator to confirm). However, the code just decided not to run.

After a little more research, I found out that MS also announced the new SDK, namely Windows Azure SDK 2.1. However, this time they didn’t do all the usual marketing campains for some reason that I’m not really aware of. I also found out that the latest release of the WAC package only works with that specific SDK (apparently reading the NuGet package description is required :-) ), so here I am, running this line of script in the Package Manager console and making everything work:

Install-Package Microsoft.WindowsAzure.Caching -Version

I hope this post finds you in good peace and helps you solve similar problems in a shorter period of time!


P.S.: sometimes (random cases), the script for installing the WAC package (v., after uninstalling WAC fails. Don’t worry though, since the web.config file is correctly modified by the WAC installer and all the references exist and are correctly included in the project.

Leave a Reply

Post Navigation