我正在尝试按照Microsoft网站上的指南,用新发布的基于角色的缓存替换Windows Azure AppFabric缓存,该缓存是2012年6月SDK版本中引入的。
但是,当在我的Web角色中选中“启用缓存(预览)”时,模拟器将无法成功实例化网站(模拟器日志:http://pastebin.com/dwbDvak2)。似乎它陷入了某种循环。禁用Web角色缓存会使它再次工作。卸载所有以前的Azure SDK并重新安装1.7版本后,我得到了相同的结果。
Visual Studio告诉我“角色实例的启动时间比预期的要长。您要继续等待吗?” [是] [否]。按是使它保持等待状态,并一遍又一遍地显示。
是否有人知道如何解决上述问题,或者尝试过新的Web角色缓存功能并使其在Azure模拟器中运行?
Screen shot of the azure local debugging environment deployment dialog
谢谢你。
更新:
我创建了一个新的解决方案,并添加了一个简单的MVC网站,添加了Web角色并启用了缓存,并且发生了同样的事情。因此,我查看了事件查看器,发现了3个与该问题有关的条目:
Fault bucket 3034750239, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0
Problem signature:
P1: cacheinstaller.exe
P2: 1.0.4655.0
P3: 4fb0f3f9
P4: CacheInstaller
P5: 1.0.4655.0
P6: 4fb0f3f9
P7: 11
P8: 47
P9: System.TypeLoadException
P10:
Attached files:
C:\Users\anan\AppData\Local\Temp\WEREA8F.tmp.WERInternalMetadata.xml
These files may be available here:
C:\Users\anan\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_cacheinstaller.e_1fbc3b72afb6acf93335ca8611850d289906c25_2ddaf529
Analysis symbol:
Rechecking for solution: 0
Report Id: 3138ba06-b344-11e1-a8d6-402cf41c1e07
Report Status: 0
Application: CacheInstaller.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.MissingMethodException
Stack:
at Microsoft.ApplicationServer.Caching.AzureCommon.Package.InitializeExternalStoreIfRequired()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
然后:
Application: CacheInstaller.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.MissingMethodException
Stack:
at Microsoft.ApplicationServer.Caching.AzureCommon.Package.InitializeExternalStoreIfRequired()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
和:
Faulting application name: CacheInstaller.exe, version: 1.0.4655.0, time stamp: 0x4fb0f3f9
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e21213c
Exception code: 0xe0434352
Fault offset: 0x000000000000cacd
Faulting process id: 0x17b4
Faulting application start time: 0x01cd4750f5db0096
Faulting application path: c:\users\anan\documents\visual studio 11\Projects\AzureCacheTest\AzureCacheTest\csx\Debug\roles\WebRole\plugins\Caching\CacheInstaller.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: 33a53608-b344-11e1-a8d6-402cf41c1e07
仅供引用:这是Windows 7 x64企业版,使用Visual Studio 2012 RC。
最佳答案
我遇到过同样的问题。要解决AppFabric Server dll冲突-请检查是否已安装AppFabric Server,然后卸载缓存或从GAC中删除缓存程序集。我删除了,模拟的缓存工作正常。
我的博客上有一些信息可能对您有所帮助:
http://blog.elastacloud.com/2012/06/09/using-the-windows-azure-cache-preview-with-sdk-1-7/
关于.net - Windows Azure Web角色缓存(预览) "hangs"使模拟器陷入部署循环,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10972124/