给定的密钥不在字典中。 SyncFx 2.1 [英] The given key was not present in the dictionary. SyncFx 2.1
问题描述
我收到字典中没有给定的密钥。同步时有时会出现异常。
I'm getting The given key was not present in the dictionary. exception sometimes while syncing.
我正在使用VS.net 2010,SQL 2008作为Server db&客户端数据库的SqlCe 3.5 Sp1。
I'm using VS.net 2010 , SQL 2008 as Server db & SqlCe 3.5 Sp1 for the client db.
我查看了web&通常他们将这个问题与Visual Studio没有正确安装相关联。
I have looked through web & generally they relate this problem with Visual studio not properly installed.
我不确定天气是什么原因在这里但是根据堆栈跟踪它看起来与Microsoft.Synchronization.Data有关。 .SqlServer - ApplyBulkChanges方法。
I'm not sure weather that's the reason here but according to stack trace it looks like something to do with Microsoft.Synchronization.Data.SqlServer - ApplyBulkChanges method.
堆栈跟踪如下:
at System.Collections.Generic.Dictionary`2.get_Item(TKey key )
在Microsoft.Synchronization.Data.SqlServer.SqlChangeHandler.ApplyBulkChanges(DataTable dataTable)
在Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChangesInternal(DbSyncScopeMetadata scopeMetadata,IDbTransaction事务,FailedDeleteDelegate_type failedDeleteDelegate,DataSet dataSet,ChangeApplicationType applyType)
在Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata,IDbTransaction applyTransaction,DataSet dataSet,DbSyncSession DbSyncSession,Boolean commitTransaction,FailedDeleteDelegate_type failedDeleteDelegate,
String batchFileName,ChangeApplicationAction& action)
 在Microsoft.Synchronization.Data.RelationalSyncProvider.SingleTransactionApplyChangesAdapter.Apply(DataSet dataSet,Boolean commitTransaction,FailedDeleteDelegate_type failedDeleteDelegate,String batchFileName,ChangeApplicationAction& action)
在Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata,DataSet dataSet,DbSyncSession dbSyncSession,Boolean commitTransaction)
在Microsoft.Synchronization.Data.RelationalSyncProvider.ProcessChangeBatch(ConflictResolutionPolicy resolutionPolicy,ChangeBatch sourceChanges,Object changeDataRetriever,SyncCallbacks syncCallbacks,SyncSessionStatistics sessionStatistics)
在Rya.WebSyncContract.RelationalWebSyncService.ApplyChanges(ConflictResolutionPolicy resolutionPolicy,ChangeBatch sourceChanges,Object changeData)中的C:\ Users \ jimmys \Documents\Visual Studio 2010 \Projects \Ryarc.WebSyncContract\RelationalWebSyncService.cs:line
111
在SyncInvokeApplyChanges(对象,对象[],对象[])
在System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(对象实例,对象[]输入,对象[]和输出)
在System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
在System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.Synchronization.Data.SqlServer.SqlChangeHandler.ApplyBulkChanges(DataTable dataTable)
at Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChangesInternal(DbSyncScopeMetadata scopeMetadata, IDbTransaction transaction, FailedDeleteDelegate_type failedDeleteDelegate, DataSet dataSet, ChangeApplicationType applyType)
at Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata, IDbTransaction applyTransaction, DataSet dataSet, DbSyncSession DbSyncSession, Boolean commitTransaction, FailedDeleteDelegate_type failedDeleteDelegate,
String batchFileName, ChangeApplicationAction& action)
at Microsoft.Synchronization.Data.RelationalSyncProvider.SingleTransactionApplyChangesAdapter.Apply(DataSet dataSet, Boolean commitTransaction, FailedDeleteDelegate_type failedDeleteDelegate, String batchFileName, ChangeApplicationAction& action)
at Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata, DataSet dataSet, DbSyncSession dbSyncSession, Boolean commitTransaction)
at Microsoft.Synchronization.Data.RelationalSyncProvider.ProcessChangeBatch(ConflictResolutionPolicy resolutionPolicy, ChangeBatch sourceChanges, Object changeDataRetriever, SyncCallbacks syncCallbacks, SyncSessionStatistics sessionStatistics)
at Ryarc.WebSyncContract.RelationalWebSyncService.ApplyChanges(ConflictResolutionPolicy resolutionPolicy, ChangeBatch sourceChanges, Object changeData) in C:\Users\jimmys\Documents\Visual Studio 2010\Projects\Ryarc.WebSyncContract\RelationalWebSyncService.cs:line
111
at SyncInvokeApplyChanges(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
任何帮助都是apreciated。
Any help would be apreciated.
-Vishal
推荐答案
您是否尝试过启用Sync Fx跟踪它会提供有关最新情况的更多信息吗?
have you tried enabling Sync Fx tracing just in case it gives out more information on the whats going on?
这篇关于给定的密钥不在字典中。 SyncFx 2.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!