locked
Synchronization - @sync_client_id_binary RRS feed

  • Question

  • My application uses CE and synchronization.  It synchs via a WCF middle tier.  The middle tier is on a development box hosted in IIS7 using Vista.  In this environment there are no problems at all running the synchronization.

     

    Copying up to production is another story.  The same code, built on a dev machine which works, does not synchronize when copied up to a Server 08 box.  It throws the same dumbfounding error over and over.

     

    'Unable to set session parameters in DbServerSyncProvider. Cannot obtain the value for command parameter '@sync_client_id_binary'.'

     

    I am at a loss.  This parameter is handled by synch services.  I never once had to write code to set it.  The same database is hit from the dev machines and the prod machine.  Therefore I know all of the backing stored procedures are coded correctly.  Please, if anyone has any ideas let me know.  I am out of ideas.  The full stack trace follows.

     

    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 Microsoft.Synchronization.Data.ISyncService.GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession)
       at Microsoft.Synchronization.Data.SyncServiceClient.GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession) in C:\Projects\References\Microsoft.Synchronization.Data\Reference.vb:line 82

     

     

    • Moved by Max Wang_1983 Thursday, April 21, 2011 11:24 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, October 15, 2008 6:32 PM

Answers

  • This error typically happens when parameter is not found or when the value is NULL.

    Couple of suggestions that might help debug the issue:

    1. Enable sync tracing at verbose level and check if the parameter is getting assigned prooperly
    2. Trace network data to determine if it the value is being serialized / deserialized properly..
    3. Debug service where GetChanges() is being called to make sure the parameter is being read properly

    Let me know if that helps..

    Thanks,
    Gayathri TK

    Wednesday, September 16, 2009 9:57 PM

All replies

  • Have you double checked your permissions?

     

    Vince

    Thursday, October 16, 2008 6:40 AM
  • I have this EXACT SAME problem right now.  Not sure what permissions to check or how.  Have huge deadline and this is one of the few things standing in my way.

     

    Do you guys have a solution or some more detailed instructions re: permissions?

     

    Wednesday, October 29, 2008 8:30 PM
  • I have exactly the same problem. You have been able to solve it?

    Regards

    Sergio
    Thursday, September 10, 2009 9:03 PM
  • You should enable tracing at verbosity level 4 to determine what happens right around the time the error is thrown.  Also, what is the inner exception?  It may be attempting to get the client id from the registry and failing due to permissions issues.

    Regards,


    Sean Kelley
    Senior Program Manager
    Microsoft
    Sunday, September 13, 2009 10:12 PM
    Moderator
  • Inner Exception:

    {ExceptionDetail, probablemente creado por IncludeExceptionDetailInFaults=true, cuyo valor es:
    Microsoft.Synchronization.Data.SessionVariableException: Unable to set session parameters in DbServerSyncProvider. Cannot obtain the value for command parameter '@sync_client_id_binary'.
       at Microsoft.Synchronization.Data.Server.DbServerSyncProvider.SetSessionParameters(IDbCommand cmd, SyncGroupMetadata groupMetadata, SyncTableMetadata tableMetadata, SyncSession syncSession, DataColumnCollection columns, SyncStage stage)
       at Microsoft.Synchronization.Data.Server.DbServerSyncProvider.EnumerateChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession, IDbTransaction transaction, EnumerateChangeType changeType)
       at Microsoft.Synchronization.Data.Server.DbServerSyncProvider.GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession)
       at WcfServiceLibrary1.LocalDataCache1SyncService.GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession) in C:\pruebas\PruebaWcfWeb\WcfServiceLibrary1\LocalDataCache1.SyncContract.cs:line 52
       at SyncInvokeGetChanges(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)}

    Monday, September 14, 2009 1:44 PM
  • It looks like a problem relating to WCF configuration. Try:
    1. Enable anonymous access on *.svc.
    2. Check if the service call reaches the server side.
    3. Set IncludeExceptionDetailInFaults=true to get more error details
    4. Create a simple WCF service to test. the permissions and configuration.
    • Edited by Bob H.L. _ Tuesday, September 15, 2009 11:29 PM fix typo
    Tuesday, September 15, 2009 12:42 AM
  • Great reccomendations bob.  Also, you may want to look at the following walkthrough when creating a basic web service:

    http://msdn.microsoft.com/en-us/library/bb882690.aspx

    Regards,

    Sean Kelley
    Senior Program Manager
    Microsoft
    Tuesday, September 15, 2009 2:40 PM
    Moderator
  • Thanks Sean and Bob, but I still have the same problem.

    On my machine everything works fine but on production enviroment trhow:

    'Unable to set session parameters in DbServerSyncProvider. Cannot obtain the value for command parameter '@sync_client_id_binary'.'

    A simple WCF service works ok in both places

    Sorry for my english :(

    Regards

    Sergio
    Tuesday, September 15, 2009 3:16 PM
  • This error typically happens when parameter is not found or when the value is NULL.

    Couple of suggestions that might help debug the issue:

    1. Enable sync tracing at verbose level and check if the parameter is getting assigned prooperly
    2. Trace network data to determine if it the value is being serialized / deserialized properly..
    3. Debug service where GetChanges() is being called to make sure the parameter is being read properly

    Let me know if that helps..

    Thanks,
    Gayathri TK

    Wednesday, September 16, 2009 9:57 PM