KingOfHypocrites
KingOfHypocrites

Reputation: 9537

Windows Azure Cache randomly returns Unable to Authenticate Error

Windows azure cache (preview) is randomly returning this error when trying to access the cache: An exception of type 'Microsoft.ApplicationServer.Caching.DataCacheException' occurred in Microsoft.ApplicationServer.Caching.Client.dll but was not handled in user code

Additional information: Unable to complete authorization request for connecting to the caching endpoint. Please try again after sometime. If the issue persists, contact Microsoft support.

I don't believe it is my code as it only happens every 5-25 requests. The requests are virtually the same. The Microsoft forums claim this is a "transient" error, but I find it anything but. I have been experiencing this error continually over the past several hours and it is rendering my application unusable. I even tried setting up a retry mechanism, but once it fails, the retries fail again too.

I also tried resetting my authorization key which another person suggested online, but this did nothing for me.

I created a console app to rule out my project code interfering:

 private static DataCache _dataCache = GetDataCache();
        /// <summary>
        /// Gets the data cache.
        /// </summary>
        /// <returns></returns>
        private static DataCache GetDataCache()
        {
            DataCache result = null;
            try
            {
                DataCacheFactory cacheFactory = new DataCacheFactory();
                result = cacheFactory.GetDefaultCache();
            }
            catch (Exception ex)
            {
                var m = ex.Message;
            }

            return result;
        }

        static void Main(string[] args)
        {
            for (int i = 0; i < 500; i++)
            {
                _dataCache.Put("testing", i);
                Console.WriteLine(i);
                Thread.Sleep(10);
            }
        }

I'm wondering if Windows 8.1 is related? I can't seem to reproduce this error on my Windows 7 machine. Not sure how that could be related, but maybe some bug with the azure emulator?

Any help would be greatly appreciated.

Upvotes: 1

Views: 226

Answers (0)

Related Questions