title: c# System.InvalidOperationException: The type foo was not expected
body: <p>This question is tied in with this other <a href="https://stackoverflow.com/questions/814627/silverlight-webservice-the-remote-server-returned-an-error-notfound">question</a> that I asked
  I have this webservice that returns a class that within itself has a list of classes. When I try to call the method the following exception is being thrown: </p>
  
  <blockquote>
    <p>System.InvalidOperationException: The
    type
    YambushiDataClass.SCharacterProjectile
    was not expected.</p>
  </blockquote>
  
  <p>This is the class that it said it did not <code>expect</code> :</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Xml.Serialization;
  
  namespace YambushiDataClass
  {
  
      public class SCharacterProjectile : SProjectile
      {
          public int? characterProjectileId { get; set; }
          public string projectileName { get; set; }
          public int? characterId { get; set; }
  
      }
  }
  </code></pre>