我已经为Microsoft Sync Framework的数据库同步实现了WCF服务,因为数据库不在同一个网络上。
但是,当我在SyncOrchestrator上调用Sychronize()方法时,我收到错误ArgumentNull异常:参数名称:ServerConnection。
我不确定在SyncOrchestrator设置中我错过了哪个参数。我也无法在互联网上找到很好的帮助。你能告诉我什么可能是错的
代码如下:
SyncOperationStatistics status = null;
//Creating proxy and Local sqlsync Provider to create scope on remote based on Locle table description
SqlSyncProvider localProvider = new SqlSyncProvider(scopeName, new System.Data.SqlClient.SqlConnection(localConnString), null, "sync");
PSHInternetSyncOrchestrator syncOrchestrator = new PSHInternetSyncOrchestrator(localProvider, remoteProvider, syncTable);
//Setting up batch size
localProvider.MemoryDataCacheSize = 4096;
status = syncOrchestrator.Synchronize();