Welcome to MSDN Blogs Sign in | Join | Help

Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

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 of this screen cast, I take the cached lookup tables and split up the client and server sync components using WCF to glue them together.

 

Published Friday, March 23, 2007 3:48 AM by Steve.Lasker

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Orcas enables easy offline client apps

Saturday, March 24, 2007 11:13 PM by Brad Abrams

I just saw that steve does a couple of very cool screen casts showing off how easy it will be for WinForms

# Ejemplos de WCF para .NET Compact Framework

Tuesday, March 27, 2007 6:02 AM by Byteabyte

Siguiendo la línea que os comentaba en el post anterior donde se mostraba un ejemplo que nos contaron

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Wednesday, April 11, 2007 8:39 AM by Michael

You mentioned that the bits you were using were after the February CTP, are they included in the March CTP?

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Wednesday, April 11, 2007 11:30 PM by Steve.Lasker

The designer features I was showing will be available in Beta 1.  

Steve

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Saturday, May 05, 2007 5:02 PM by Michael Herman (Parallelspace)

Steve,

It would be great to see a "part 3" that showed how these sync services can be used with an Infopath 2007 form ...to support automatic updating of InfoPath download list controls (via InfoPath secondary data sources).

Michael.

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Wednesday, May 09, 2007 8:42 AM by Marius

Hi Steve,

Do Sync Services run on Tablet XP?

Thanks,

Marius

# WCF via Carrier Pigeons

Friday, May 11, 2007 2:26 AM by Nick's .NET Travels

Earlier this year the .NET Compact Framework team announced that there was going to be an implementation

# Astoria = Data Nirvana? (Almost, but not quite...)

Friday, May 11, 2007 8:42 AM by Sean the Nonbeliever

So one of the things that was introduced at MiX07 was this thing called Astoria. What I gather is that it provides a REST interface to a data model that you express via the entity framework and a client API to interact with the services so you don't

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Sunday, May 13, 2007 1:10 PM by Steve.Lasker

Hi Marius,

Yes, Sync Services runs on all desktop operating systems.  As noted, it will run on devices as well, but will be a bit delayed from the desktop release.  Definition of a bit is still in the works.

Steve

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Sunday, May 13, 2007 1:32 PM by Steve.Lasker

Hi Michael,

I hadn't thought of Infopath, it's a great idea.  We are building some demos that will show how to use SQLce and Sync Services with Word and Excel docs.  Using VSTO you can open any ADO.NET datasource, so imagine having a purchase order word document setup for your sales folks.  As they travel in the field they can still build orders for their customers with Word.  The word task bar could have UI to select from the cached product catalog locally.  To update the product catalog, assuming you're online, simply press an update button in the task bar.  

I'm not really that well versed in the Infopath APIs, so I can't promise a sample myself, but I'd be happy to link to one if you'd like to create it.

Steve

# re: Going N Tier w/WCF, Update to Sample Orcas Beta 1

Friday, June 22, 2007 12:00 PM by Kerry

Steve,

Any update for the Ntier sample to match Orcas Beta 1. Have followed your screencast but the code generated by VB looks quite different?

Thanks,

Kerry

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Friday, June 22, 2007 5:07 PM by Steve.Lasker

The goals for B1 were download cachingwere missing enough pieces with WCF and some bugs between the designer and runtime that made it unrealistic to show.  Beta 2 however, is solid for these scenarios.  Rather than confuse developers on what code works with which build, I've been holding off 'till B2 is available.  We should have the B2 version of Sync Services and SQLce available soon as well.  

Steve

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Sunday, July 08, 2007 12:37 PM by zac morris

Great demo and great tools.  

The demo builds in 20 minutes what took me two months 5 years ago with VB6, Access, home brewed XML RPC over HTTP, PHP and MySQL.

I notice that the 'Advanced' button on the WCF connection wizard that is in the demo did not make it into B1.  The 'use shared types' checkbox is exactly what I was wishing was there.  The 'thou shall not share types' philosophy is nice and all but if you own both ends of the wire it's a real PITA.  I would really love to see it in B2!

The sync designer keeps crashing on me but I'll assume that will be fixed in B2.

It would be great if the sync designer supported more of the underlying functionality (uploads).

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Saturday, September 08, 2007 6:54 PM by Bob

I'm following along with your great video, but I can't seem to test the WcfSyncService AND add it as a reference. If you debug the WcfSyncService you are unable to add a reference while it's debugging. If you stop debugging, you are able to add a reference, but the service is no longer running! Any ideas

Thanks again!

Bob

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Wednesday, September 12, 2007 11:41 PM by Steve.Lasker

Sorry Bob,

I might have breezed over this step too quickly in the screencast. In Beta 2, the WCF service doesn't really self host properly. The way I get it to work is to set the WCF Service project as the startup project. I then hit CTRL+F5 to start without debugging. This frees Visual Studio from actually running the WCF Service. With the WCF Service running, decoupled from VS, I then set my client app as the startup project, and add the WCF reference to the now running WCF Service. I can then hit F5 and debug my app, that communicates with the self hosted WCF Service.

The WCF team is planning on getting this fully functional in RTM.

Hope this helps,

Steve

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Sunday, January 06, 2008 9:12 PM by Chris Calhoun

With the release of vs2008 there doesn't seem to be an implementation of OrganicOnion?..

How can I use Syn Services with wcf services???

Thanks

Chris

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Wednesday, January 09, 2008 10:21 AM by Steve.Lasker

Hi Chris,

As the name would imply, it really didn't meet ship quality names :).  The type we shipped was named:

Microsoft.Synchronization.Data.ServerSyncProviderProxy

I've published a sample here that includes all the RTM code.

Steve

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Sunday, April 06, 2008 12:28 AM by chris

I've followed the example and have it working.  The challenge I have is now deploying it to work on our iis server.  Any tips on how to deploy this solution so it will work on iis and not jus the dev box?

Thanks!

chris

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Friday, April 11, 2008 12:39 AM by Steve.Lasker

Hi Chris,

When you say, how to deploy on an IIS server, are you asking how to move from the self hosted WCF project to an IIS project?

There are a few challenges here.  Web projects aren’t really projects in a typical VS way.  Meaning in 2005 there was an effort to create a projectless project.  This means there are several VS infrastructure Services missing.  However, that’s ok, as it just means you have to use some best practices to make this work.

If you create a Class Library project, use the Sync Designer to target the Server Config items at this Class Library, then what you can do is simply add the class library dll to your web project.  You can do WCF Web projects, or even do the old tried and true Web Service project and simply wrap the calls with “Web Methods”.

Make sense?

Steve

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Thursday, May 22, 2008 8:48 PM by Tae

Hello Steve,

Following on Chris' issue with IIS, can you point me to a sample or more detailed "How-To" regarding deployment to IIS? What I am looking for is taking the WCF portion in the demo and instead of having it on the localhost, move it to a "production" web server. I emailed Liam because he produced a similar video, but he responded by saying he doesn't know enough of WCF to go beyond the local environment.

This is the only part that I am stuck on because I am use to the "old" .asmx webservice style but not Sync AND WCF.

Thanks,

Tae

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Friday, October 03, 2008 3:49 AM by Tom Williams

Hi Steve

As per the request from Tae, can we please have a 'How To' on how to deploy this in IIS.

I really dont know where to start with this now?

Thanks

Tom

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Monday, December 01, 2008 3:54 AM by Allan Pedersen

We have a working project, but when updating too many rows (changes) from the local database to the server via WCF, we get an error 400 Bad Request. At the System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.Http.RequestChanngelHttpChannelRequest.WaitForReply(TimeSpan timeout).

Do you have any idea how to increase the Timeout.

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Tuesday, December 09, 2008 10:56 AM by Steve.Lasker

Hi Allan,

If this works for small payloads, but fails on larger payloads, then this likely lies in the WCF configuration information.  Unfortunately, I’m not a WCF expert in WCF, but if you can turn on debugging info, you should be able to figure out which parameter is causing you the pain.  

Steve

# re: Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

Tuesday, February 24, 2009 3:12 AM by lakshmi

Hi ,

Can you Please Explain  what is the difference  between

Synchronization Services for ADO.NET using WCF

AND

Synchronization Services for ADO.NET using WEB SERVICES

Thanks

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker