[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 833
  • Last Modified:

Sync Services over WCF

I started creating a Synchronization program using the sync framework.

Currently I am at this point:
1. I created a client project with the sync services which works without a problem. It has my *.sync file, the local Compact edition database and a clientprogram.vb
I used this as a guide: http://www.codeproject.com/KB/database/AdoSyncServicesArticalPKg.aspx

2. I created a WCF Service Library which links to the Client Project and this one now creates a service on the localhost to the remote server. This also works fine. It has the app.config and *.sync file
Guide: http://www.codeproject.com/KB/smart/sync_services.aspx

3. Now I created a WCF Service website and I was able to install it on the IIS Remote server. The service is running correctly (I find it as a service reference)
Guide: http://channel9.msdn.com/shows/Endpoint/Endpoint-Screencasts-Hosting-WCF-Services-in-IIS/

The question is :How do i connect to the IIS hosted service and not the localhost service created in step 2. I'm sure it's simple and I'm not seeing it... please help.
  • 2
  • 2
2 Solutions
Meir RivkinFull stack Software EngineerCommented:
open the iis manager and locate your service website.
right click on the web application->Advanced Settings, look for the Virtual directory.
check the screenshot i've posted.

so if the server ip is and the vdir is /MyWebSiteServices, so the web srevice can be accessed by connecting to:
mekke10Author Commented:
Ok, I found that part but where do I put it in the VS project.
I have 3 projects running.

On the client:
- the Sync framework project
- the WCF project that used a service to connect to the DB through: http://localhost:8080/project

On the server:
- the WCF service

Do I put that path as a service reference? Or does it go into the app.config file?
Meir RivkinFull stack Software EngineerCommented:
on the client, the project that consumes the wcf service (on the server) should use the wcf service virtual directory path when adding web reference.
so instead of using http:\\localhost\YOURWEBSERVICE
u shoud use the server ip/name:
mekke10Author Commented:
Thanks for the help. Both replies saved my hide.

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now