5

我正在尝试按照 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。

4

4 回答 4

2

I had the same issue. To do with an AppFabric Server dll conflict - check whether you have AppFabric Server installed and either deinstall the cache or remove the cache assemblies from the GAC. I removed and the emulated cache works fine.

I have some information which may be helpful on our blog:

http://blog.elastacloud.com/2012/06/09/using-the-windows-azure-cache-preview-with-sdk-1-7/

于 2012-06-12T07:30:35.243 回答
1

对我来说,问题是我在 UNC Share 上运行我的项目(实际上它在我的 macbook 上的 VM 中运行)。当我在工作角色上选中“启用缓存”框后启动调试器时,它就会挂起。来看看,它大约每 2 秒在 C:\Windows\System32\%LOCALAPPDATA%\CrashDumps 中创建一个 160MB 的转储文件。在调试其中一个之后,我可以看到第一个错误是当它尝试在我的工作角色的缓存内容上启动 cmd.exe 时,它​​说 CMD 不能在网络共享上运行,所以它默认为 windows/system32 或某物。

就在那时,我发现了这篇方便的 7 岁 MS KB 文章: http: //support.microsoft.com/kb/156276当我在注册表路径下添加DisableUNCCheck REG_DWORD并将值设置为时,一切都像冠军一样开始了。希望这对其他人有帮助。0 x 1 (Hex)HKEY_CURRENT_USER\Software\Microsoft\Command Processor

于 2013-09-23T20:04:09.373 回答
1

Missing method probably means that the assembly loaded doesn't have the method in there. Can you make sure that you've the proper assembly being added to your project ?

Ensure that you don't have Windows AppFabric Server installed in the machine as well, as it'll GAC the caching dll which will get picked up during runtime

于 2012-06-12T05:46:02.957 回答
0

你的意思是只要勾选CheckBox启用缓存,就会出现这个错误?这不应该发生......它在我的机器上运行良好。

您是在创建新项目还是升级现有项目?尝试创建一个新项目。

还要检查以下日志:

附加的文件:

C:\Users\anan\AppData\Local\Temp\WEREA8F.tmp.WERInternalMetadata.xml 

这些文件可能在此处可用:

C:\Users\anan\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_cacheinstaller.e_1fbc3b72afb6acf93335ca8611850d289906c25_2ddaf529 
于 2012-06-11T03:49:27.770 回答