AppFabric DataCacheFactory() initialization hangs in VS2013, works fine in VS2010 and VS2012

跟風遠走 提交于 2019-12-07 03:39:59

问题


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;
    }

No errors are generated. The code just hangs on the line factory = new DataCacheFactory().

The AppFabric DLLs are current versions.

I welcome any suggestions for identifying why the code hangs on this line.


回答1:


As you are developing your app on VS, this might be a .net application. please check the targeted .net framework version from project properties when running on VS13.




回答2:


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.

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.



来源:https://stackoverflow.com/questions/19688302/appfabric-datacachefactory-initialization-hangs-in-vs2013-works-fine-in-vs201

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!