2
votes

I have implemented Sync framework in WCF service.

Code:

[ServiceBehavior(InstanceContextMode=InstanceContextMode.PerSession)] in my service contract class

Having error The call to BeginSession() in RelationalSyncProvider is not valid. A session is already in progress sorry for late

on

SyncOperationStatistics stats = orchestrator.Synchronize();

Please guide me to resolve this issue.

Thank you.

1

1 Answers

0
votes

Replicated this issue server side by having multiple clients connect concurrently. Exception was server side at SqlSyncProvider.BeginSession(). In Sync 2.1.

I solved this by making sure the SqlSyncProvider for the server was per client instead of static across all client connections.

Since I was replicating this via unit tests I also had this issue when client proxy reference was static, switched that to instance as well.