Microsoft Synchronization with SQL Server 2005, SQLCe and WCF Web Service RRS feed

  • Question

  • Hi,

    My synchronization is working smooth for all the small tables, even when I delete entire database it creates new and sync all the data from server database but...

    there are three tables which contain more than 100 thousands of records and when I try to sync any of these table I the the following error:

    Synchronization has been started at [6/4/2010 11:48:12 AM]
    == WARNING ==
    Exception has been thrown by the target of an invocation.
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Microsoft.Synchronization.Data.ServerSyncProviderProxy.GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession)
       at Microsoft.Synchronization.SyncAgent.DownloadChanges(SyncGroupMetadata groupMetadata)
       at Microsoft.Synchronization.SyncAgent.Synchronize()
       at MetaOption.Sulzer.App.ucConnectionInformation.SyncMyData() in E:\Sulzer\trunk\Client\Client\ucConnectionInformation.cs:line 130
       at MetaOption.Sulzer.App.ucConnectionInformation.bwDoWork(Object sender, DoWorkEventArgs e) in E:\Sulzer\trunk\Client\Client\ucConnectionInformation.cs:line 57

    == Inner Exception ==
    An error occurred while receiving the HTTP response to http://localhost:8731/Design_Time_Addresses/SulzerServiceLibrary/SulzerCacheSyncService/. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.


    Could you please suggest me what may be cause or what I am missing so this is not working for large tables.

    2. Even if I am not deleting the entire database but do the changes for all records of a table which have around 378358 records by using the query [ all records ]

    Update ItemSurcharge
    SET PricingDate = DateAdd(day, -1, PricingDate)

    and try to sync now get the same error.

    Waiting for you quick reply


    Ali Adravi

    Friday, June 4, 2010 6:40 AM


All replies

  • assuming you're not doing batching, have you checked if the amount of changes being synched has possibly exceeded the WCF message size? (maxReceivedMessageSize, readerQuotas, etc)

    you may want to increase those values first and test

    Friday, June 4, 2010 9:39 AM
  • First of all thanks for you reply.


    I already increased the maxReceivedMessageSize to its max value;

    Yes, Now I am trying Batching as well but now system hangs after applying the first two table changes.


    Ali Adravi

    Monday, June 7, 2010 12:04 PM
  • For binding section, please also set the sendTimeout  and receiveTimeout and see whether that helps.

    WsHttp binding is subject to limitation of message size to in one call. If your changes are really big, batching has to be enabled, you can start with a few hundred Kbytes or 1MB for batching size.

    If you still see failure with WCF calls, you will need to enable wcf tracing to check what could be the reason. (see wcf tracing at )

    Monday, June 7, 2010 5:50 PM