[英]AppFabric DataCacheFactory() initialization hangs in VS2013, works fine in VS2010 and 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.
我试着用VS2013运行它,它挂起在一条线上,它试图初始化一个DataCacheFactory对象。 The same code works fine with VS2010 and VS2012.
相同的代码适用于VS2010和VS2012。
private static DataCacheFactory GetDataCacheFactory()
{
if (factory == null)
{
lock (lockObject)
{
if (factory == null)
{
factory = new DataCacheFactory(); //VS2013 hangs on this line
}
}
}
return factory;
}
No errors are generated. 不会生成错误。 The code just hangs on the line
factory = new DataCacheFactory()
. 代码只挂在line
factory = new DataCacheFactory()
。
The AppFabric DLLs are current versions. AppFabric DLL是最新版本。
I welcome any suggestions for identifying why the code hangs on this line. 我欢迎任何建议,以确定代码挂在这一行上的原因。
As you are developing your app on VS, this might be a .net application. 当您在VS上开发应用程序时,这可能是一个.net应用程序。 please check the targeted .net framework version from project properties when running on VS13.
在VS13上运行时,请检查项目属性中的目标.net框架版本。
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.
我尝试使用DebugDiag进行转储并对其进行分析。 The analysis indicated that the process was waiting for something to complete in a Compatibility module in some Microsoft code.
分析表明,该过程正在等待某些Microsoft代码中的兼容性模块中的某些内容完成。
I noticed that there were two Compatibility Databases installed with IIS 8. I uninstalled both items and tried running my app again. 我注意到IIS 8安装了两个兼容性数据库。我卸载了这两个项目并尝试再次运行我的应用程序。 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.
我有一个具有类似配置的同事,即使安装了兼容性数据库,他也没有问题挂在上面的应用程序上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.