title: WCF service gives no response while returning list of objects json
body: <p>This is a weird one. so i have a WCF service returning JSON. It returns a list of objects. It works correctly if the list is empty, but the moment i add an object to the list i get "Could not get any response" error. I am using postman to test the service.</p>
  
  <p>Here is my code.</p>
  
  <pre><code>public List&lt;ProductDetails&gt; GetProductsByCategory3(Stream s)
  {    
      DataContractJsonSerializer json = new DataContractJsonSerializer(typeof(ProdPagenation));
      ProdPagenation result = (ProdPagenation)json.ReadObject(s);
      List&lt;ProductDetails&gt; pdl = new List&lt;ProductDetails&gt;();
      ProductDetails pd = new ProductDetails();//works well if this is not added to list.
      pdl.Add(pd);//As soon as a new object is added i get no response
      return pdl;
  }
  
  [OperationContract]
  [WebInvoke(Method = "POST",
      ResponseFormat = WebMessageFormat.Json,
      RequestFormat = WebMessageFormat.Json,
      UriTemplate = "/GetProdByCat3")]
  List&lt;ProductDetails&gt; GetProductsByCategory3(Stream s);
  
  
  
      [DataContract]
      public class ProductDetails
      {
  
      [DataMember]
         public int Id { get; set; }
      [DataMember]
         public string ITEM_ITEM_NAME { get; set; }
      [DataMember]
         public DateTime ITEM_ENTR_DATE { get; set; }
      [DataMember]
         public string ITEM_ITEM_STS { get; set; }
      [DataMember]
         public int ITEM_GRP_CODE { get; set; }
      [DataMember]
         public int ITEM_SBGRP_CODE { get; set; }
      [DataMember]
         public int ITEM_SBSBGRP_CODE { get; set; }
      [DataMember]
         public int Picid { get; set; }
      [DataMember]
         public string PicturePath { get; set; }
      }
  </code></pre>
  
  <p>I have no idea why its acting this way. </p>