locked
Error While retreiving data from wcf service in datatable. RRS feed

  • Question

  • User-1409360894 posted

    I have created a WCF Service which is returning a DataTable. It is successfully build and hosted in IIS7 and also working fine when i am returning a string only.

    but it gives me error (below) when i am returning a DataTable.

    "The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error."

    This is how i am calling my WCF Service.

    Service1Client client1 = new Service1Client();
                dt = client1.GetNewData(16);
                GridView1.DataSource = dt;
                GridView1.DataBind();

    Please help me its urgent.

    Thanks in advance.

    Thursday, January 20, 2011 7:22 AM

All replies

  • User-833064204 posted

    Did you change the WCF Service method's return type? If so, did you update your Service Reference or reference the newly-created DLL?


    Thursday, January 20, 2011 3:25 PM
  • User-583789358 posted

    Make sure you set the 'TableName' property on the DataTable.

    Monday, March 4, 2013 6:07 AM