Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6811777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:22:06+00:00 2026-05-26T20:22:06+00:00

We have been developing a hub/spoke synchronization model using Microsoft Sync Framework and WCF,

  • 0

We have been developing a hub/spoke synchronization model using Microsoft Sync Framework and WCF, and since we are developing both the client and the server, we would like to put the WCF service contract interface into a shared assembly so that we can define it just once and share it between the client and server. For the most part this works, but the GetSchema method of Sync Framework passes a Collection object of table names which gets serialized and read on the client as string[]. However, since the client proxy has been written to use the server interface it is expecting to receive a Collection object and I am getting a type mismatch.

I would just change the contract to explicitly pass only string[], and manually cast it when calling the sync provider methods, but this leads to an “ambiguous match found” error.

How can I use the same interface on both the client and server and handle the Collection -> string[] serialization correctly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:22:06+00:00Added an answer on May 26, 2026 at 8:22 pm

    I solved this by using the ToArray() LINQ extension call on the Collection<string> that is passed in to the proxy:

    public override SyncSchema GetSchema(System.Collections.ObjectModel.Collection<string> tableNames, SyncSession syncSession)
    {
        return this.ServiceProxy.GetSchema(tableNames.ToArray(), syncSession);
    }
    

    The contract on the server specified an IEnumerable<string> instead of a Collection<string>.

    public SyncSchema GetSchema(IEnumerable<string> tableNames, SyncSession syncSession)
    {
        // Convert IEnumerable<string> to Collection<string>
        Collection<string> tables = new Collection<string>(tableNames.ToList());
        return this.syncProvider.GetSchema(tables, syncSession);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been developing in asp.net since its existence (also classic asp before that)
I have been developing with objective C and the Cocoa framework for quite some
I have been developing a managed extensibility framework application for the last several months
I have been developing applications using VB.net for the past 5 years. As I
I have been developing a web application for about six months with no framework
I have been developing my own PHP MVC framework. Now I have seen different
I have been developing a DVD player using vlc version 1.1.1 libraries and have
I have been developing a WCF project that will expose web services (HTTP-based) that
I have been developing a game using Flex, and used the Timer class to
I have been developing applications that have a three-tier architecture and mostly using MVC

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.