What am I doing wrong here or what am I not doing? (I use this code in .NET 4.0 WCF Service)
private static ICacheManager GetCacheManager()
{
try
{
return CacheFactory.GetCacheManager();
}
catch (SynchronizationLockException ex)
{
EventLogHelper.WriteError(ex);
}
catch (ConfigurationException ex)
{
EventLogHelper.WriteError(ex);
}
return null;
}
When the debugger returns, this exception is returned:
Error System.Threading.SynchronizationLockException Message = The object synchronization method is called from an unsynchronized code block. Source = Microsoft.Practices.Unity Stack Traces: at Microsoft.Practices.Unity.SynchronizedLifetimeManager.TryExit () at e: \ Builds \ Unity \ UnityTemp \ Compile \ Unity \ Unity \ Src \ Lifetime \ SynchronizedLifetimeManager.cs: line 109 InnerException:
Is this a bug in the Enterprice library?