ArgumentException on Synchronize - Walkthrough Creating an Occasionally Connected Smart Device Application RRS feed

  • Question

  • Hello,


    I'm getting a ArgumentException on calling the Synchronize methode of the SyncAgent.

    I followed all instructions from the walkthrough several times

    I visited numerous forums and tried the following hints:

    • I specified the [XmlSerializerFormat()] attribute in the interface of the contract.
    • I configured the WCF binding to use basicHttpBinding
    • I used the machine name to access the WCF service from the smart device. I also tried the ip address. The WCF service can be called in the browser of the client without problems.
    • I tried to use the netcfsvcutil.exe utility but ended up with the same exception
    • I specified the includeExceptionDetailInFaults="true" in de WCF configuration.

    In the OnInitialize eventhandler of the SyncAgent I setup an proxy to the service:


    public partial class SampleLocalDataCacheSyncAgent


    partial void OnInitialized()


    ServerSyncProviderProxy proxy = new ServerSyncProviderProxy(new SampleSyncServiceRef.SampleLocalDataCacheSyncService());

    RemoteProvider = proxy;




    The exception occurs when I execute the following code ment to Synchronize my data:

    Code Snippet

    // Call SyncAgent.Synchronize() to initiate the synchronization process.

    // Synchronization only updates the local database, not your project's data source.

    SampleLocalDataCacheSyncAgent syncAgent = new SampleLocalDataCacheSyncAgent();

    Microsoft.Synchronization.Data.SyncStatistics syncStats = syncAgent.Synchronize();



    My development environment:

    • Vista SP1
    • Visual Studio 2008 SP1
    • MS Compact Framework 3.5
    • Device Emulator 3.0
    • Sql Server Compact 3.5 SP1
    • Sync Framework Runtime v1.0 (x86)
    • Sync Framework SDK v1.0
    • Sync Framework Services 1.0 (x86)
    • Sync Services for ADO.NET v2.0 (x86)
    • Synchronization Services for ADO.NET V1 SP1 (Devices)

    Smart Device:

    • Windows Mobile 6 Professional
    • DHCP supplied IP address
    • Sync Services for ADO.NET 1.0
    • SQLServerCompact 3.5
    • Microsoft .NET CF 3.5

    Could anyone please help?

    I spend days on this problem already.


    Regards, Jeroen

    • Moved by Hengzhe Li Friday, April 22, 2011 2:25 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Thursday, October 2, 2008 10:12 AM


All replies

  • Hello Jeroen,

    I am getting the same exception when trying to synchronize my data. Have you solved your problem already? When you do i'd like to see what you deed to solve the problem, it would be of great help.
    Thursday, October 30, 2008 9:06 AM
  • remove all the classes and enumerations in the file reference.cs except the classSampleLocalDataCacheSyncService().
    Tuesday, January 6, 2009 10:54 AM
  • Remove all extra classes and emunaration from reference.cs file except only your web service class
    Tuesday, January 6, 2009 10:56 AM
  • Hi folks,


    is this issue resolved ? are you using sync services for Ado.net V2 on the IIS server ? is the ArgumentException thrown at the client side or from the server side ? could you copy the entire stack here ?


    This would help us nail down the cause.





    Tuesday, January 6, 2009 8:18 PM
  • Hey Rick,

    I'm sorry i stopped with my experimental project after a lot of frustration.

    Regards, Jeroen
    Sunday, April 12, 2009 9:13 PM
  • Hello AbhishekHingu,

    I tried that but that didn't help me.


    Jeroen van der Schoot
    Sunday, April 12, 2009 9:14 PM
  • Tuesday, July 28, 2009 5:34 AM