I am using Microsoft Sync framework and this issue has no clear solution in Google.
I am trying to create a client provider for SQLServer Client as below
`public class SampleClientSyncProvider : SqlSyncProvider`
But I am running in to invalid cast exception when setting the ‘localprovider’ below
Exception:
System.InvalidCastException was unhandled
Message=Microsoft.Synchronization.Data.ClientSyncProvider
Source=Microsoft.Synchronization.Data
Code called:
public class SampleSyncAgent : SyncAgent
{
public SampleSyncAgent()
{
this.LocalProvider = new SampleClientSyncProvider();
Please help if you can ..
The SyncAgent works out of the box only with SqlCeClientSyncProvider/DbServerSyncProvider.
SqlSyncProvider works with SyncOrchestrator.
check in the docs on the difference between offline providers and collaboration providers.
I suggest you use the SqlSyncProvider/SyncOrchestrator instead.