locked
Sync Framework and Azure Service RRS feed

  • Question

  • Hi,

    I'm trying to make a full azure application with offline capabilities. I ve made a web role on azure for the sync service, and i use the sql azure for the data.

    Everything is working on the azure emulator. But when i deploy to the real plateform, i have an WCF error :

    The server encountered an error processing the request. The exception message is 'Object reference not set to an instance of an object.'. See server logs for more details. The exception stack trace is:

    at Microsoft.Synchronization.Services.SyncService`1.CreateMessageFromUnhandledException(Exception exception) at Microsoft.Synchronization.Services.SyncService`1.ProcessRequestForMessage(Stream messageBody) at SyncInvokeProcessRequestForMessage(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.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

    If someone already done this.

    Thanks,

    David.

    Tuesday, February 1, 2011 10:42 PM

Answers

  • For the WP7 issue, make sure that you added the cross-domain policy file, if this is not added to the service Silverlight will prevent cross-domain calls from the phone.
    Maria del Mar Alvarez Rohena Microsoft Sync Framework
    Thursday, February 3, 2011 7:31 PM

All replies

  • Hi David

    Is your SQL Azure database is in the same data center as your Windows Azure Service?  Also, make sure that you updated the database connection string correctly in your web service to point to your SQL Azure DB, and that you configured your SQL Azure firewall to allow Windows Azure connections.

     


    Maria del Mar Alvarez Rohena Microsoft Sync Framework
    Wednesday, February 2, 2011 7:18 PM
  • Hi, thanks for the answer,

    I've found the issue, but not a good solution. It seem that for use Sync Framework 4.0 on azure you must "deploy" Sync framework 2.1 on your guest os. There is a lot of link on the web about it.

    http://msdn.microsoft.com/en-us/library/ff928660(v=sql.110).aspx

    It's work, except one thing, even by following the microsoft walktrouh, i can make the Synchonise21.dll registered as COM; So i must connect the instance in remote desktop and manually make a regsvr32 each time i publich my app on azure. If you have any idea about that.

    Another issue, with wp7 emulator, the context.LoadAsync never load anything from the isolate storage when i use the isolate storage proxy.

    Thanks a lot.

    David.

    Wednesday, February 2, 2011 10:46 PM
  • Hi David

    You should not need to manually register the Synchronize21.dll using regsvr32.  The instructions in http://msdn.microsoft.com/en-us/library/ff928660(SQL.110).aspx  are for xcopy deployment.  Make sure that you are copying the x64 version of synchronize21.dllm and that the ActivationContext.CreateActivationContext() method is being executed correctly.   If this method is the one responsible for registering the synchronize21.dll COM components.

    In addition, make sure your assemblies as placed inside a folder named with the same name that you provided for the assemblyIdentity in synchronization.assemblies.manifest and your webapp.manifest.

    As for the WP7 emulator issue can you open a separate forum thread for it?

     


    Maria del Mar Alvarez Rohena Microsoft Sync Framework
    Thursday, February 3, 2011 7:24 PM
  • For the WP7 issue, make sure that you added the cross-domain policy file, if this is not added to the service Silverlight will prevent cross-domain calls from the phone.
    Maria del Mar Alvarez Rohena Microsoft Sync Framework
    Thursday, February 3, 2011 7:31 PM