问题
I have an existing mvc4 web project which I wanted to deploy to a cloud service and to start using the azure data caching.
I have added the windows azure caching nuget packages to two projects in the solution, the web project and a class library project both of which will need these.
I then add a web role for the web project, and I have updated the datacache identifier reference in the web.config
to point to the web role which is enabled for co located caching.
I can run this locally on the emulator without any problems while I don't have any datacache code. But the moment I put in code to access the datacache is when I have problems. Just this code caused the web project to hang:
var cache = new DataCache("default");
There are not errors that I am aware of, either in the vs output or errors generated from the web application, it just hangs.
What is the best way to start diagnosing where this problem lies?
UPDATE
I have 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 that help track down what is happening?
One other piece of info that may help is that if I create a brand new solution, add a web role and enable co located caching I can get it to work fine -- it just appears something specific to this solution.
回答1:
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 to change the Long time setting to "HH:mm:ss" and it'll works.
回答2:
Can you dump your cscfgs here starring out storage keys, also check the events and stack traces in application server channel (Admin) , it would have a better stack trace.
来源:https://stackoverflow.com/questions/15281333/azure-datacache-problems-with-windows-azure-emulator-but-no-error-generated-app