locked
How to perform ADO.NET Synchronization via WCF hosted on IIS ? RRS feed

  • Question

  • Hello,

    I have a DB on my server. The only way to communicate with it from outside is via a WCF service (a WCF service library hosted on IIS)

    I have a small windows application(client) needs to sync with DB (a SQL 2008) on the server and as the DB is not directly exposed to the client, the client needs to communicate with WCF service to perform the Sync. As usual the client is the one who initiates the sync process.

    I am trying to sync SQL Compact Edition 3.5 with SQL Server 2008 via WCF service hosted on IIS.
    Am using Sync Framework 2.0 CTP2.

    To perform the Sync, I have 3 projects in my solution ->

    Sync.WCf [the WCF Service library]
    Has -> ITestService, TestService (implementing ITestService) and TestServerSync inheriting DbServerSyncProvider

    Sync.Web [the website hosted on IIS exposing TestService from above service library]
    Has -> Service.svc, Web.config

    Sync.Client [the client(a small windows app)]
    Has -> TestClientSync (inheriting SqlCeClientSyncProvider) and a TestSyncAgent (inheriting SyncAgent) which performs the Sync.

    Sync.Web, Sync.WCF, Sync.Client are the only things that I have in my solution (.sln).

    I followed this article and came up with my above approach
    http://msdn.microsoft.com/en-us/library/bb902831(SQL.105).aspx

    Can anybody please tell how can I refer to TestServerSync (inheriting DbServerSyncProvider) in my TestSyncAgent (to call Synchronize()) perform the Sync ?
    [I need to know what I should set for the TestSyncAgent's RemoteProvider value]

    I also found this article but is of very little help as my scenario here deals with SQLCE 3.5
    http://social.msdn.microsoft.com/forums/en-US/uklaunch2007ado.net/thread/35d4deb8-a861-4fe3-a395-d175e14c353f/

    I got stumped at this point and am totally lost. Please help.
    And any help is greatly appreaciated.
    Thanks in advance.
    • Edited by prudhvi Thursday, July 9, 2009 12:20 PM
    • Moved by Max Wang_1983 Thursday, April 21, 2011 1:15 AM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Thursday, July 9, 2009 11:56 AM

Answers

  • Don't worry guys. I figured how to do that and figured it was straight and simple.
    I am now able to sync my local SQL Compact Edition DB with a SQL 2008 DB via WCF hosted o IIS.
    Tuesday, July 14, 2009 6:58 AM

All replies

  • Don't worry guys. I figured how to do that and figured it was straight and simple.
    I am now able to sync my local SQL Compact Edition DB with a SQL 2008 DB via WCF hosted o IIS.
    Tuesday, July 14, 2009 6:58 AM
  • Hi prudhvi

    I am also trying to achieve the same kind of functionality.
    Can you please show me some code example to do it...

    Thanks
    Archan
    Wednesday, July 29, 2009 8:14 AM