The N-Tier demo has finally arrived. This demo shows you how to take the server side code, basically the ServerSyncProvider along with all SyncAdapters that we build in the last demo, and expose it as a web service. On the client side, you generate a web service proxy and build a thin wrapper around it to be able to plug it into the sync agent.

Unlike pervious demos, this one needs some security settings to enable the service to access SQL Server. Also the default web service proxy generated by VS won’t comile due to type definition collisions. The steps below show you how to fix all these issues to run the demo smoothly. So please follow them carefully and let me know if you ran into any troubles.

How to install OfflineAppDemo application?

  • Fire SQL server and load demo.sql file
  • Execute the script untill the "test sample" marker
  • load server_procs.sql file and execute it to install server procs
  • Install SyncWebService (see steps below)
  • Load VS solution (OfflineAppDemo-WebService Project)
  • You are ready to go

How to install SyncWebService?

  • Copy SyncWebService directory to c:\interpub\wwwroot
  • From IIS management console, setup the SyncWebService virtual directory as web application and set Application Pool to ASP.NET 2.0   
  • Give network service account read\write access to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
  • Add web reference to the project and give it a name SyncWebServiceProxy
  • Edit the Reference.cs manually and add namespace Microsoft.Synchronization.Data. Also remove code for types that are already defined in Microsoft.Synchronization.Data.dll as the sample reference.cs file shows
  • Add new login to SQL Server for Network Service and give it dbowner access to the pub database

Download Now
: Visit Sync Services Forum

Update: Just to let you know, I left Microsoft to start a new company, Raveable Hotel Reviews. See examples: Romantic Hotels in Myrtle Beach, Best Hotels in Seattle,Top 10 Hotels in Miami, Kid friendly hotels in San Diego, Hotels with a kitchen or kitchenette and 5 Star Hotels in Las Vegas. Your feedback is welcome, raveable blog.