locked
Microsoft Sync Framework: Sql CE and sql 2008 RRS feed

  • Question

  • Currently i am using Sync Framework 1.0 with sql2008 and sql CE with changetracking option enable and ntier approach with WCF trasport layer.

    For detail link bellow.

    http://www.codeproject.com/KB/smart/sync_services.aspx?msg=3288274

    I am getting issue while multiple clients are being connected for synchronisation.

    1-Message:    Value cannot be null.
    Parameter name: SyncContext
    Source:    Microsoft.Synchronization.Data
    StackTrace:       at Microsoft.Synchronization.SyncAgent.UploadChanges(SyncGroupMetadata groupMetadata)

    2-Exception thrown by Invokation ...

    3-Session is broken by server, client provider set in user mode.(sql2008 Event Log)

    4-Execude Reader connection open etc and many more...

     

    I want to update Sync Framework 2.0. Does this helps and what steps are required to adjust with same architecture.

    SQLC - WCF - SQL2008

     

    Can any body help?

    Thursday, April 15, 2010 7:55 PM

All replies

  • can you post the stack trace? the error may not necessarily be with Sync Fx itself but with the way the WCF service were coded.

    if you're using the offline providers, you'de still be coding the n-tier setup in V2 almost the same as V1.

    if you want to move to the collaboration providers, you have to bear in mind you can't use SQL Change tracking either.

     

    Thursday, April 15, 2010 11:13 PM
  • Unable to obtain a new server anchor. Make sure that you can establish a connection to the server database and that the SelectNewAnchorCommand property of the DbServerSyncProvider is specified correctly
    [4/14/2010 12:58:49 PM] Badar Muneer says: An error occurred while starting a transaction on the provider connection. See the inner exception for details.

    1- When first time db need to be initialize, following error occurred on client machine.
    Exception Details: Message: Exception has been thrown by the target of an invocation. Source: mscorlib StackTrace: 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.GetSchema(Collection`1 tableNames, SyncSession syncSession) at Microsoft.Synchronization.SyncAgent.InitClientSchema() at Microsoft.Synchronization.SyncAgent.Synchronize() at SPLocker.Client.Synchronization.Library.SyncService.SynchronizeAll() TargetSite: System.Object _InvokeMethodFast(System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeTypeHandle) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    2- Some time this error.
    Exception Details: Message: An error occurred while starting a transaction on the provider connection. See the inner exception for details. Source: mscorlib StackTrace: Server stack trace: at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter) at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at SPLocker.Client.Synchronization.Library.SPLockerServerSynchronizationServiceReference.ISplSynchronizationContracts.Ping(Int32 splId) at SPLocker.Client.Synchronization.Library.SPLockerServerSynchronizationServiceReference.SplSynchronizationContractsClient.Ping(Int32 splId) at SPLocker.Client.Synchronization.Library.SyncService.HeartBeatSynchronization() TargetSite: Void HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    1- When synchronize method is called from client XP machine.
    Message:	Exception has been thrown by the target of an invocation.
    Source:	mscorlib
    StackTrace:	  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.ApplyChanges(SyncGroupMetadata groupMetadata, DataSet dataSet, SyncSession syncSession)
      at Microsoft.Synchronization.SyncAgent.UploadChanges(SyncGroupMetadata groupMetadata)
      at Microsoft.Synchronization.SyncAgent.Synchronize()
      at SPLocker.Client.Synchronization.Library.SyncService.SynchronizeAll()
    TargetSite:	System.Object _InvokeMethodFast(System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeTypeHandle)
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    

     

    Log Time:4/14/2010 11:51:49 AM
    Exception Details:
    Message:	ExecuteNonQuery requires an open and available Connection. The connection's current state is open.
    Source:	mscorlib
    StackTrace:	
    Server stack trace: 
      at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
      at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
      at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
      at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
      at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
      at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    
    Exception rethrown at [0]: 
      at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
      at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
      at SPLocker.Client.Synchronization.Library.SPLockerServerSynchronizationServiceReference.ISplSynchronizationContracts.GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession)
      at SPLocker.Client.Synchronization.Library.SPLockerServerSynchronizationServiceReference.SplSynchronizationContractsClient.GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession)
    TargetSite:	Void HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)
    
    Following error i found on event log from sql server 2008.
    The server will drop the connection, because the client driver has sent multiple requests while the session is in single-user mode. This error occurs when a client sends a request to reset the connection while there are batches still running in the session, or when the client sends a request while the session is resetting a connection. Please contact the client driver vendor.           ..   
    

    Can you please guide me i am facing trouble and have not much time to shift to other architecture.

    I can provide you WCF code if required.

     

    Thanks

     

     

    Friday, April 16, 2010 5:28 AM
  • you might want to enable WCF tracing and Sync Tracing to gather more information.

    When you say you're having errors when mutiple clients sync, are you sharing the same WCF service instance for all the clients?

    Saturday, April 17, 2010 3:52 AM
  • each client exists on different machine and use the same service reference.

    when a XP client first time synchronise to initiate the database, it fails on initSchema method. I saw the inner exception and it says service may not available for http protocol or it is shutting down. I know that client enable to connect with the service on http protocal but request is not completed. I have hosted the service on IIS 7 and initially 916 kb db needs to download, Does wcf have application pool have problem of shutting/recycling.

     

    Regards

    Thanks

    Saturday, April 17, 2010 6:05 AM
  • Currently i am using Sync Framework 1.0 with sql2008 and sql CE with changetracking option enable and ntier approach with WCF trasport layer.

    For detail link bellow.

    http://www.codeproject.com/KB/smart/sync_services.aspx?msg=3288274

    I am getting issue while multiple clients are being connected for synchronisation.

    1-Message:    Value cannot be null.
    Parameter name: SyncContext
    Source:    Microsoft.Synchronization.Data
    StackTrace:       at Microsoft.Synchronization.SyncAgent.UploadChanges(SyncGroupMetadata groupMetadata)

    2-Exception thrown by Invokation ...

    3-Session is broken by server, client provider set in user mode.(sql2008 Event Log)

    4-Execude Reader connection open etc and many more...

     

    I want to update Sync Framework 2.0. Does this helps and what steps are required to adjust with same architecture.

    SQLC - WCF - SQL2008

     

    Can any body help?


    I'm having the same problem.

    Did you manage to solve it ?

    Thanks for your time.

    Sunday, January 9, 2011 8:22 PM