Method not found: 'Microsoft.Synchronization.Data.SyncException

已答覆 Method not found: 'Microsoft.Synchronization.Data.SyncException

  • 2012年6月5日 下午 01:27
     
     

    When I call syncAgent.synchrinize I get this error with this message:

    Method not found: 'Microsoft.Synchronization.Data.SyncException Microsoft.Synchronization.Data.SyncExpt.AnotherSyncInProgressError(System.String, System.String)'

    I am using SyncFramework 2.1 and have verified that the following dll's are loaded at runtime:

    Microsoft.Synchronization     2.1
    Microsoft.Synchronization.Data    3.1
    Microsoft.Synchronization.Data.Server  3.1
    Microsoft.Synchronization.Data.SqlServer 3.1
    Microsoft.Synchronization.Data.SqlServerCe 3.5

    I don't understand why this is happening as Microsoft.Synchronization.Data.SqlServerCe 3.5 is supposed to work with Microsoft.Synchronization  2.1.

    Does 2.1 only work with syncOrchestrator ?

所有回覆

  • 2012年6月5日 下午 01:40
    版主
     
     

    AnotherSyncInProgressError is actually inside Microsoft.Synchronization

    am not sure why it's saying Method not found, but based on the error its trying to raise, do you have an ongoing sync while trying to initiate another sync session?

  • 2012年6月5日 下午 01:50
     
     

    No there is not another sync running.  I startup the host process which has the ServerSyncProvider and then a client in seperate process.  The client creates a syncAgent and then tries syncAgent.Synchronize and I hit this error. 

  • 2012年6月5日 下午 02:06
    版主
     
     

    so you have an n-tier setup via WCF? or are you trying to do sync across processes?

  • 2012年6月5日 下午 02:25
     
     

    n-tier wtih WCF

    My old version used the localCache wizard. I like the idea of using the SqlSyncAdapterBuilder as it seems to offer me more control and my code is cleaner.  Within this solution I have a testServerHost project and testClient project and they successfully connect using WCF. 

  • 2012年6月5日 下午 02:54
    版主
     
     

    the error is actually on the client side sqlceclientsyncprovider's begintransaction while creating a mutex...

    does it occur even if you restart or logoff the client machine just to ensure there are no orphaned processes running? an exception that another sync is in progress is normally encountered when you try to call synchronize while another one is ongoing, especially in multi-threaded apps...

  • 2012年6月5日 下午 03:14
     
     

    I tried rebooting but got the same error :(

    In another thread (http://social.microsoft.com/Forums/en/syncdevdiscussions/thread/4fdab7cc-c343-476c-80b8-b84254c227ac) this guy got this error from mismatched versions.  This led me to believe that the error might not be directly related to anotherSync in progress

  • 2012年6月5日 下午 03:21
    版主
     
     已答覆
    try this, instead of referencing Microsoft.Synchronization.Data.SqlServerCe 3.5, try referencing Microsoft.Synchronization.Data.SqlServerCe 3.1 instead
    • 已標示為解答 CoolGuyStokes 2012年6月5日 下午 04:01
    •  
  • 2012年6月5日 下午 04:01
     
     

    That moved much further.  I need to work what I think is a WCF timeout now.

    Do you know why/how this fixed the problem?

  • 2012年6月5日 下午 04:34
    版主
     
     
    if you have your wcf settings in the config file, just adjust the values there. or you can adjust it in code as well, just locate where you instantiate the client side proxy...
  • 2012年6月5日 下午 04:51
     
     
    Sorry, I didn't mean my WCF issue, I meant changing to Microsoft.Synchronization.Data.SqlServerCe 3.1.  Do you know why this fixed my problem?
    • 已編輯 CoolGuyStokes 2012年6月5日 下午 05:16 clarify question
    •