i have developed a service in wcf say datatable method
i am not able to access in client app
public DataTable Grid(WcfThreetierData obj1)
{
con.Open();
cmd = new SqlCommand("PROC_WCF_GRID", con);
cmd.CommandType = CommandType.StoredProcedure;
da = new SqlDataAdapter(cmd);
da.Fill(dt);
con.Close();
return dt;
}
rest all the methods are able access
The error is
"An error occurred while receiving the HTTP response to http://gunnala-pc/wcfthreetier/wcfthreetier.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)."
please suggest

Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 21, 2013, 2:17 AM EDT
try below code
public DataTable Grid(WcfThreetierData obj1)
{
DataTable dt=new DataTable("Paging");// just pass a string here as your choice
con.Open();
cmd = new SqlCommand("PROC_WCF_GRID", con);
cmd.CommandType = CommandType.StoredProcedure;
da = new SqlDataAdapter(cmd);
da.Fill(dt);
con.Close();
return dt;
}
Hariom Prasad150 reputationPosted Sep 21, 2013, 3:45 AM EDT
Thanks for the post
but i have already declared datatable in the general declaration
Datatable dt=new datatable();
i can see the data in the return type of
public datatable Grid(WcfThreetierData obj1) ie return dt;
wen the method is passing from service to client, error is occured
can u tell me what is the error which i have posted
thanks
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 21, 2013, 4:09 AM EDT
try this one
DataTable dt=new DataTable("Paging");
instead of
DataTable dt=new DataTable();