locked
Demo III - Web Service - Conflict Handling? RRS feed

  • Question

  • I'm trying to wrap my head around how I can handle conflict detection and management of the Server changes from the Client, under a 'Web Service' scenario.

    The demo IV shows us how to handle the Conflict detection and it relies on the  ApplyChangesFailed event being triggered..  I may be missing something obvious, but how, under an N-tier scenario, can I retrieve the information regarding any Server failures? 

    Cheers and thanks for any help.

    Glen


    • Moved by Max Wang_1983 Friday, April 22, 2011 10:23 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Friday, May 18, 2007 5:04 AM

Answers

  • Hi Glen,

     

    Any conflict that is detected on the server will be returned back to the client as part of the SyncStatistics object. For 2-tier setup, the client and server providers are in the same app thus you could write code to handle client and server conflicts. For n-tier, the client app does not receive events for server conflicts and thus it is the server code that is responsible for dealing with conflicts. The info about conflicts detected on the server is transferred to the client though for post processing.

     

    Thanks

    Monday, May 21, 2007 5:31 PM

All replies

  • Hi Glen,

     

    Any conflict that is detected on the server will be returned back to the client as part of the SyncStatistics object. For 2-tier setup, the client and server providers are in the same app thus you could write code to handle client and server conflicts. For n-tier, the client app does not receive events for server conflicts and thus it is the server code that is responsible for dealing with conflicts. The info about conflicts detected on the server is transferred to the client though for post processing.

     

    Thanks

    Monday, May 21, 2007 5:31 PM
  • Rafik hi,
    I really appreciate the demos but when I tried the web service demo and followed the procedures u said and got the below mentioned error in Progressform.cs in the line "

    switch(args.SyncStage)

    ".

    'Microsoft.Synchronization.Data.SyncProgressEventArgs' does not contain a definition for 'SyncStage' and no extension method 'SyncStage' accepting a first argument of type 'Microsoft.Synchronization.Data.SyncProgressEventArgs' could be found (are you missing a using directive or an assembly reference?)

    Any idea what could be the reason for this. I'm using orcas while building the app. 

    Also, can you please post a sample which uses 'webservice & conflict resolution'.
    Thanks and Regards
    Arnab choudhuri
    Tuesday, May 22, 2007 9:36 AM
  •  

    Hi Arnab,

     

    The property name used to be "Stage" in the intial CTP. In beta 1 bits, the name was changed to "SyncStage"

    I think you are hitting this error because you still using CTP runtime while the demo was updated to work with the latest beta. Install beta 1 bits and give it another try.

     

    Thanks

    Tuesday, May 22, 2007 3:09 PM
  • Hi Rafik,

    Thanks for the reply, I found that later while looking up another post in a forum and just tried Stage and it worked. I had first installed CTP and then later Orcas but due to some reason it did not install beta 1 bits by itself. I then tried installing the beta1 bits separately but still it takes the ctp bits while compiling. Probably will have to uninstall the old bits.

     

    Thanks again for the demos.

    Regards

    arnab

    Friday, May 25, 2007 11:03 AM
  • In above post it is said that ‘The info about conflicts detected on the server is transferred to the client though for post processing’. Does it mean that we can only get the information about the conflicts which are occurred at server and it is not possible to handle the conflict at client in N - tier?

     

    Please give me the suggestion.

     

    Thanks

    Swati

    Thursday, July 19, 2007 1:02 PM