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 6923681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:33:59+00:00 2026-05-27T10:33:59+00:00

I’m trying to pass a complex object via Windows Communication Foundation, but I get

  • 0

I’m trying to pass a complex object via Windows Communication Foundation, but I get Read errors. I’m able to binaryFormat the object to a file and reload and deserialize it. All the components/ referenced component Classes are marked with the Serializable attribute. As a work round I have serialized the object to a memory stream, passed the memory stream over WCF and then deSerialized the memory stream at the other end. Although I could live with this solution it doesn’t seem very neat. I can’t seem to work out what the criteria are for being able to read from the proxy. Relatively simple objects, even ones that include a reference to another class can be be passed and read without any attribute at all. Any advice welcomed.

Edit: Unrecognised error 109 (0x6d) System.IO.IOException the Read Operation Failed.

Edited As Requested here’s the class and the base class. Its pretty complicated that’s why I didn’t include code at the start, but it binary serializes fine.

[Serializable]
public class View : Descrip
{
    //MsgSentCoreDel msgHandler;
    public Charac playerCharac { get; internal set;}
    KeyList<UnitV> unitVs;        
    public override IReadList<Unit> units { get { return unitVs; } }
    public View(Scen scen, Charac playerCharacI /* , MsgSentCoreDel msgHandlerI */)
    {
        playerCharac = playerCharacI;
        //msgHandler = msgHandlerI;
        DateTime dateTimeI = scen.dateTime;
        polities = new PolityList(this, scen.polities);
        characs = new CharacList(this, scen.characs);            
        unitVs = new KeyList<UnitV>();
        scen.unitCs.ForEach(i => unitVs.Add(new UnitV(this, i)));
        if (scen.map is MapFlat)                           
            map = new MapFlat(this, scen.map as MapFlat);            
        else            
            throw new Exception("Unknown map type in View constructor");            
        map.Copy(scen.map);        
    }

    public void SendMsg(MsgCore msg)
    {
        msg.dateT = dateTime;
        //msgHandler(msg);
    }
}

And here’s the base class:

[Serializable]
public abstract class Descrip
{
    public DateTime dateTime { get; set; }        
    public MapStrat map { get; set; }       


    public CharacList characs { get; protected set; }
    public PolityList polities { get; protected set; }
    public abstract IReadList<Unit> units { get; }
    public GridElList<Hex> hexs { get { return map.hexs; } }
    public GridElList<HexSide> sides { get { return map.sides; } }
    public Polity noPolity { get { return polities.none; } }
    public double hexScale {get { return map.HexScale;}} 

    protected Descrip ()
    {                                   
    }

    public MapArea newMapArea()
    {
        return new MapArea(this, true);
    }
}
  • 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-27T10:33:59+00:00Added an answer on May 27, 2026 at 10:33 am

    I suggest that you take a look at the MSDN documentation for DataContracts in WCF since that provides some very helpful guidance.

    Update

    Based on the provided code and exception information, there are two areas of suspicion:

    1) Collections and Dictionaries, especially those that are generics-based, always give the WCF client a hard time since it will not differentiate between two of these types of objects with what it considers to be the same signature. This will usually result in a deserialization error on the client, though, so this may not be your problem.

    If it is your problem, I have outlined some of the steps to take on the client in my answer to this question.

    2) You could have, somewhere in your hierarchy, an class that is not serializable.

    If your WCF service is hosted in IIS, then the most invaluable tool that I have found for tracking down this kind of issue is the built-in WCF logger. To enable this logging, add the following to your web.config file in the main configuration section:

    After you have generated the error, double-click on the svclog file and the Microsoft Service Trace Viewer will be launched. The items in red on the left-hand side are where exceptions occur and after selecting one, you can drill into its detail on the right hand side and it usually tells you exactly which item it had a problem with. Once we found this tool, tracking down these issues went from hours to minutes.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.