I have a Web Application running in one machine and the services in another machine (i.e.both are in different App domains). I have a workflow service in my service layer which
I solved it by overiding the synchronization context
if (syncContext == null)
{
SynchronousSynchronizationContext sync = new SynchronousSynchronizationContext();
syncContext = sync;
}
class SynchronousSynchronizationContext : SynchronizationContext
{
public override void Post(SendOrPostCallback d, object state)
{
this.Send(d, state);
}
}