I am doing some background thread task in sitefinity. previously i was getting exception at the line.
Config.Get<DataConfig>().ConnectionStrings. To overcome it i have sent dummy ashx request to my site and able to get connection string and connect ot db.
Now when trying to access DynamicContent via code
DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
Type itemType = TypeResolutionService.ResolveType(key);
DynamicContent item = dynamicModuleManager.GetDataItem(itemType, id);
I am getting above mentioned error.
Any idea how to overcome this The referenced OpenAccessContext or 'IObjectScope' is already closed (UnsynchronizedPMProxy). error?