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

  • SEARCH
  • Home
  • 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 4329044
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:46:14+00:00 2026-05-21T09:46:14+00:00

I have an application that uses WCF. It runs great on Mono 2.8.2 on

  • 0

I have an application that uses WCF. It runs great on Mono 2.8.2 on Ubuntu and .NET 3.0 on Windows.

It decorates the WCF service contract with the ‘ServiceKnownType’ attribute, which points to a method returning the derived types needed to use the server:

[ServiceKnownType("GetKnownTypes", typeof(KnownTypeProvider)]

I am porting my app to MonoTouch. I am using the latest 4.0, based on Mono 2.10.1. This no longer works: my WCF call fails because the DataContractSerializer on the client doesn’t recognise the return type.

I set a breakpoint in my ‘GetKnownTypes’ method and see that it is never called. I assume that this part of System.ServiceModel is not present / not working in MonoTouch?

I try to work around this by decorating the base return type with the ‘KnownType’ attribute instead.

[KnownType("GetKnownTypes")]

Again, it doesn’t work and my ‘GetKnownTypes’ method is never called. Looking at the source for DataContractSerializer, it seems if you use a method name rather than specifying the type, it just gets ignored?!

I will try again by specifying the type instead of using a method (looking at the source of DataContractSerializer, it looks like this will work), however this is tricky for me in MonoTouch because I will need to use typeof rather than Type.GetType(“fully.qualified.typename”).

Is there another solution? Workaround?

I did see this: How do you configure WCF known types programmatically?, however it seems MonoTouch is missing some of the required interfaces…

Thanks in advance

  • 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-21T09:46:14+00:00Added an answer on May 21, 2026 at 9:46 am

    It looks firmly like either a bug in MonoTouch or a regression in Mono (I don’t have an environment to test in Mono 2.10 on the desktop right now)

    Worked around the issue by restructuring my projects and using

    [KnownType(typeof(MyDerivedType))]
    

    On the base type. This works just fine on MonoTouch 4.0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC 3 application that uses a WCF service within the
Greetings, We have an application written in .net 3.5 that uses wcf and also
I have a silverlight application that uses wcf service. This application is shown from
I am trying to develop a .NET 3.5 service application that uses: WCF for
I have a web application that uses ajax enabled wcf service Service.scv .... I
I have a WCF web service that uses ASP.NET session state. WCF sets a
We have a simple WCF (on .NET 4.0) Service which uses Windows authentication and
I have client application that uses WCF service to insert some data to backend
I have a .net 3.5 application running on windows mobile professional that uses sql
I have a small application that uses WCF to communicate with a webserver. This

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.