Problems with Azure DataCache with Windows Azure emulator, but an error was generated. The application just freezes

I have an existing mvc4 web project that I wanted to deploy to the cloud service and start using Azure data caching.

I added Windows Azure cached packages to two solution projects: a web project and a class library project that both will need.

Then I add the web role for the web project and updated the link for the data cache identifier in web.config so that it points to the web role that is enabled for co-hosting caching.

I can run this locally on the emulator without any problems, as long as I don't have the cache code. But the moment I insert the code to access the data cache is when I have problems. It was this code that caused the web project to freeze:

 var cache = new DataCache("default"); 

There are no errors that I know of, neither in the vs output nor in the errors generated by the web application, it just hangs.

What is the best way to start diagnosing this problem?

UPDATE

I just noticed the following errors generated in the application event log:

 Application: CacheServiceEmulator.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: Microsoft.ApplicationServer.Caching.DataCacheException Stack: at Microsoft.ApplicationServer.Caching.AzureCommon.AzureUtility.ProcessException(System.Exception) at Microsoft.ApplicationServer.Caching.CacheServiceEmulator.CacheServiceEmulator.Main(System.String[]) Faulting application name: CacheServiceEmulator.exe, version: 1.0.4797.0, time stamp: 0x506f41ec Faulting module name: KERNELBASE.dll, version: 6.2.9200.16451, time stamp: 0x50988aa6 Exception code: 0xe0434352 Fault offset: 0x000000000003811c Faulting process ID: 0x13cc Faulting application start time: 0x01ce1b74c41f996d Faulting application path: D:\Users\Tony\My Documents\Visual Studio 2012\Projects\Seqential\Didbook_ws\Didbook.net\Didbook.net v1.0\didbook.net Web.Azure\csx\Debug\roles\didbook.net Web\plugins\Caching\CacheServiceEmulator.exe Faulting module path: C:\WINDOWS\system32\KERNELBASE.dll Report ID: 03114030-8768-11e2-beaf-68942335e1fe Faulting package full name: Faulting package-relative application ID: Fault bucket -936878625, type 5 Event Name: CLR20r3 Response: Not available Cab Id: 0 Problem signature: P1: cacheserviceemulator.exe P2: 1.0.4797.0 P3: 506f41ec P4: Microsoft.ApplicationServer.Caching.AzureServerCommon P5: 1.0.4797.0 P6: 506f41df P7: 3d P8: 18 P9: SWOUM0PNYW4I1S3EYHEY4VNB5OWO0LJ1 P10: Attached files: C:\Users\Tony\AppData\Local\Temp\WER90C9.tmp.WERInternalMetadata.xml These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_cacheserviceemul_667e21a2e47da59aad2c601844d8dcfd3d291a_28d494fe Analysis symbol: Rechecking for solution: 0 Report ID: 03114030-8768-11e2-beaf-68942335e1fe Report Status: 0 Hashed bucket: 700c7356d6308372410cf1d2baaf5d77 

Does this help keep track of what is happening?

Another piece of information that can help is that if I create a new solution, add a web role and enable shared caching, I can make it work fine - it just seems to be something specific to this solution.

+1
source share
2 answers

The Azure Caching emulator starts logman.exe, passing the cnf parameter as 30:00, but logman may reject it if the format is not compatible with your regional settings.

All you have to do is change the Long Time setting to "HH: mm: ss" and it will work.

+1
source

Can you dump your cscfgs in the main storage keys, as well as check the event and stack traces in the application server (Admin) channel, it will have the best stack trace.

0
source

All Articles