AppFabric DataCacheFactory()初始化在VS2013中挂起,在VS2010和VS2012中工作正常 [英] AppFabric DataCacheFactory() initialization hangs in VS2013, works fine in VS2010 and VS2012
问题描述
我有一个已经运行了一段时间的应用程序.我尝试使用VS2013运行它,它挂在试图初始化DataCacheFactory对象的行上.相同的代码可以在VS2010和VS2012上正常工作.
I have an application that has been working for a while. I tried running it with VS2013 and it hangs on a line where it tries to initialize a DataCacheFactory object. The same code works fine with VS2010 and VS2012.
private static DataCacheFactory GetDataCacheFactory()
{
if (factory == null)
{
lock (lockObject)
{
if (factory == null)
{
factory = new DataCacheFactory(); //VS2013 hangs on this line
}
}
}
return factory;
}
没有错误产生.该代码只是挂在行factory = new DataCacheFactory()
上.
No errors are generated. The code just hangs on the line factory = new DataCacheFactory()
.
AppFabric DLL是当前版本.
The AppFabric DLLs are current versions.
我欢迎您提供任何建议来确定代码为何挂在这行上.
I welcome any suggestions for identifying why the code hangs on this line.
推荐答案
我已经解决了此问题,但我不知道是什么原因引起的.我尝试使用DebugDiag进行转储并对其进行分析.分析表明,该过程正在等待某些Microsoft代码的兼容性"模块中的完成.
I have resolved this issue, but I don't know what was causing it. I tried using DebugDiag to take a dump and analyze it. The analysis indicated that the process was waiting for something to complete in a Compatibility module in some Microsoft code.
我注意到IIS 8安装了两个兼容性数据库.我卸载了这两个项目,然后尝试再次运行我的应用程序.这次,应用程序成功执行了挂起的行.
I noticed that there were two Compatibility Databases installed with IIS 8. I uninstalled both items and tried running my app again. This time the app successfully executed the line that was hanging.
虽然这可以解决此机器上的问题,但我仍然不知道是什么引起了问题.我有一个配置类似的同事,即使安装了兼容性数据库,他的应用程序也可以挂在上面,没有问题.
While this resolved the issue on this machine, I still don't know what is causing the problem. I have a colleague with a similar configuration and he has no problem with the app hanging on the line above, even with the Compatibility databases installed.
这篇关于AppFabric DataCacheFactory()初始化在VS2013中挂起,在VS2010和VS2012中工作正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!