我正在尝试按照 Microsoft 网站上的指南,将 Windows Azure AppFabric 缓存替换为 2012 年 6 月 SDK 版本中引入的新发布的基于角色的缓存。
但是,在我的 Web 角色中选中“启用缓存(预览)”时,模拟器将无法成功实例化网站(模拟器日志: http: //pastebin.com/dwbDvak2)。似乎它陷入了某种循环。禁用 Web 角色缓存使其再次工作。卸载所有以前的 Azure SDK 并重新安装 1.7 版本后,我得到了相同的结果。
Visual Studio 告诉我“角色实例的启动时间比预期的要长。你想继续等待吗?” [是][否]。按下是让它等待,并一遍又一遍地出现。
是否有人可能知道如何解决上述问题,或者可能已经尝试过新的 Web 角色缓存功能并使其在 azure 模拟器中运行?
谢谢你。
更新:
我创建了一个新的解决方案,只添加了一个简单的 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。