Answered by:
Peer-to-Peer ArgumentOutOfRangeException

Question
-
I'm working and modifing the peer-to-peer sample of http://msdn.microsoft.com/pt-br/library/cc807286.aspx and after somesuccessfull syncronizations, this start fail with this exception. I don't know where is this stringId parameter. It's an black box.
Apparently if I reset the peers, this work again, and after some sync stop again.
I only modified the schema of database to dbo and add one more peer to sample.
Anyone can help me please??? Tks
Message:Specified argument was out of the range of valid values. Parameter name: stringId
Stack Trace
at Microsoft.Synchronization.SyncId.GetStringBytes(String stringId)
at Microsoft.Synchronization.SyncId..ctor(String id)
at Microsoft.Synchronization.Data.SyncRowMetadata.InitRowId(DbSyncAdapter adapter, DbSyncStage stage)
at Microsoft.Synchronization.Data.SyncRowMetadata.InitMetadata(DbSyncAdapter adapter, DbSyncStage stage)
at Microsoft.Synchronization.Data.SyncRowMetadata..ctor(DataRow row, DbSyncAdapter adapter, DbSyncStage stage, Boolean isLocal)
at Microsoft.Synchronization.Data.DbSyncProvider.ReadLocalRowMetadata(DataRow row, DbSyncAdapter adapter)
at Microsoft.Synchronization.Data.DbSyncProvider.EnumerateChangesInternal(DbSyncScopeMetadata scopeMetadata)
at Microsoft.Synchronization.Data.DbSyncProvider.GetChanges(DbSyncScopeMetadata scopeMetadata, DbSyncSession DbSyncSession)
at Microsoft.Synchronization.Data.DbSyncProvider.GetChangeBatch(UInt32 batchSize, SyncKnowledge destinationKnowledge, Object& changeDataRetriever)
at Microsoft.Synchronization.KnowledgeProviderProxy.GetChangeBatch(UInt32 dwBatchSize, ISyncKnowledge pSyncKnowledge, ISyncChangeBatch& ppChangeBatch, Object& ppUnkDataRetriever)
at Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics)
at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, Int32& changesApplied, Int32& changesFailed)
at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncProvider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied, Int32& changesFailed)
at Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize()
at Microsoft.Synchronization.SyncOrchestrator.Synchronize()
at Microsoft.Samples.Synchronization.SyncOperations.RunTests4And2() in C:\Users\Ricardo\Desktop\RA_SyncF-SIGI\RA_SyncF-SIGI-Business\SyncOperations.cs:line 223- Moved by Hengzhe Li Friday, April 22, 2011 5:04 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
Saturday, March 28, 2009 7:10 PM
Answers
-
Hi Ricardo,
From the stack, it seems that the stringId is null or empty. Did you set the DbSyncAdapter.RowIdColumnes with the primary keys for each of your tables? Since you mentioned that you add one more peer provider into the sample, please ensure that you did set the DbSyncAdapter correctly for the new provider instance as well.
Thanks,
Dong
This posting is provided AS IS with no warranties, and confers no rights.- Marked as answer by Dong CaoMicrosoft employee, Moderator Thursday, April 2, 2009 12:28 AM
Wednesday, April 1, 2009 2:34 AMModerator
All replies
-
Now, after some more tests, I think this occur after a delete, but not discovered why yet.
Anyone can help me. Please!!!
Tks- Marked as answer by Dong CaoMicrosoft employee, Moderator Thursday, April 2, 2009 12:28 AM
- Unmarked as answer by Dong CaoMicrosoft employee, Moderator Thursday, April 2, 2009 12:28 AM
Sunday, March 29, 2009 12:41 PM -
Hi Ricardo,
From the stack, it seems that the stringId is null or empty. Did you set the DbSyncAdapter.RowIdColumnes with the primary keys for each of your tables? Since you mentioned that you add one more peer provider into the sample, please ensure that you did set the DbSyncAdapter correctly for the new provider instance as well.
Thanks,
Dong
This posting is provided AS IS with no warranties, and confers no rights.- Marked as answer by Dong CaoMicrosoft employee, Moderator Thursday, April 2, 2009 12:28 AM
Wednesday, April 1, 2009 2:34 AMModerator