共用方式為


How to: Configure Synchronization for a Device

Synchronization Services for ADO.NET 1.0 was originally released with Microsoft Visual Studio 2008. This version of Sync Framework enabled synchronization between a server database and a SQL Server Compact database on the desktop. Sync Framework now enables you to synchronize between a server database and a SQL Server Compact database on a device.

Configuring synchronization for a device is similar to configuring N-tier synchronization for desktop synchronization. The architecture is shown in the following illustration.

多層式架構同步處理拓撲

In an N-tier architecture for devices, synchronization components are used as follows:

  • The server synchronization provider resides on the server or another tier. The provider is contained in Microsoft.Synchronization.Data.Server.dll. Use the DLL that is included with SQL Server Compact or Visual Studio 2008, either the initial release or SP1.

  • The client synchronization provider and the synchronization agent both reside on the device. The agent is contained in Microsoft.Synchronization.Data.dll and the provider is contained in Microsoft.Synchronization.Data.SqlServerCe.dll. Use the device versions of the DLLs.

  • Communication between the server synchronization provider and the synchronization agent is handled by the ServerSyncProviderProxy object and a service. Sync Framework does not specify the kind of service that you must use. However, applications typically use a Web service or a Windows Communication Foundation (WCF) service.

For information about system requirements, see Hardware and Software Requirements for Sync Framework.

Sample Application

For a complete sample that demonstrates device synchronization, download the samples from the Microsoft download center. The document "Device Sample Readme" that is included in the self-extracting compressed (.zip) file contains more detailed information about device synchronization, and also instructions about how to run the sample.

請參閱

概念

How to: Configure N-Tier Synchronization

Programming Common Client and Server Synchronization Tasks