Visual Studio Orcas - Sync Designer, going N Tier with WCF

Play Visual Studio Orcas - Sync Designer, going N Tier with WCF
Sign in to queue


In part 1, I used the Visual Studio Orcas Sync Designer to configure and synchronize 3 lookup tables to be cached locally in SQL Server Compact Edition using the Sync Services for ADO.NET CTP.

In part 2, I take the cached lookup tables and split up the client and server sync components using WCF to glue them together.
For more info about our Occasionally Connected Services scenarios, and Sync Services for ADO.NET, you can use the following links:
My blog
Sync Services CTP:
Sync Services Forum



Download this episode

The Discussion

  • User profile image
    Thanks for this video, it really helps.

    couple of things have changed since it was written though,  I found this website also very usefull

    The 2 things that I have had to follow from the above website rather than your video are.

    1.  When you paste the breadcrumb into the App.config file you must also remove the <identity> section,  if you leave this in place the WCF returns the following error.

    System.InvalidOperationException: When multiple endpoints on a service share the same ListenUri, those endpoints must all have the same Identity in their EndpointAddress. The endpoints at ListenUri 'http://localhost:8731/Design_Time_Addresses/WcfSyncService/Service1/' do not meet this criteria.
       at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost)
       at System.ServiceModel.ServiceHostBase.InitializeRuntime()
       at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open()
       at Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo info)

    2.  Once you have added the service reference to the WCF you then amend the partial code of the sync providor.  (northwindeCache.vb)  and add an OnInitialized Sub.  The code that is now required is as follows.

    Imports Microsoft.Synchronization.Data

    Partial Public Class NorthwindeCacheSyncAgent

    Private Sub OnInitialized()

    Me.RemoteProvider = New ServerSyncProviderProxy(New ServiceReference1.NorthwindeCacheSyncContractClient())

    End Sub

    End Class

    Hope this helps someone, thanks again to Steve Lasker & Wei-Meng Lee from the DevX website.


Add Your 2 Cents