title: DataContract runtime error - Type 'myType' cannot be serialized. What i'm doing wrong?
body: <p>Trying to pass "complex" class type that contains primitive types with interfaces and lists of interfaces/classes.</p>
  
  <p>I guess the problematic member is:</p>
  
  <pre><code>public List&lt;IMyInterface&gt; IntrfList
  </code></pre>
  
  <p>Runtime Error:</p>
  
  <blockquote>
    <p>An error occurred while receiving the HTTP response to http:/localhost/xxxxxx/xxxxxService.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.</p>
  </blockquote>
  
  <p>The descriptive error from MS Service Trace Viewer (SvcTraceViewer):</p>
  
  <blockquote>
    <p>Type 'myType' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.  If the type is a collection, consider marking it with the CollectionDataContractAttribute.  See the Microsoft .NET Framework documentation for other supported types.</p>
  </blockquote>
  
  <p>I did as the explanation suggests but didn't help.</p>
  
  <p>The "shared" class:</p>
  
  <pre><code>[System.Runtime.Serialization.DataContract]
      public class ServerState
      {
          private Queue&lt;IJob&gt; _mWaitingQueue;
          public Queue&lt;IJob&gt; mWaitingQueue
          {
              get
              {
                  lock (_LockObjWaiting)
                  {
                      return _mWaitingQueue;
                  }
              }
              private set
              {
                  _mWaitingQueue = value;
              }
          }
          private object _LockObjWaiting = new object();
  
          private List&lt;IJob&gt; _mInPrograssList = new List&lt;IJob&gt;();
  
          [DataMember]
          public List&lt;IJob&gt; mInPrograssList
          {
              get
              {
                      return _mInPrograssList;
              }
              private set
              {
                  _mInPrograssList = value;
              }
          }
  }
  </code></pre>
  
  <p>IJob is an interface.
  The structure of IJob is like this:</p>
  
  <pre><code>IJob (Interface)
    - JobBase (Abstract class)
      - JobA (Driven from JobBase)
      - JobB (Driven from JobBase)
  </code></pre>