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

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

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