Good Day,
I have a problem with WCF Service Code, I am able to send or rather return a bool, string, int etc from a wcf service to asp.net page
for login in purposes, but for some reason i get this error message when returning a data set, here is my code for the service:
public System.Data.DataSet ReturnCustomers()
{
DataEntity.NorthwindDataSet dsNorthwind = new DataEntity.NorthwindDataSet();
DataAccess.NorthwindDataSetTableAdapters.CustomersTableAdapter taCust = new DataAccess.NorthwindDataSetTableAdapters.CustomersTableAdapter();
dsNorthwind.EnforceConstraints = false;
taCust.FillByCustomers(dsNorthwind.Customers);
return dsNorthwind;
}
Now here is my code to accept the data set on the presentation layer:
protected void Button1_Click(object sender, EventArgs e)
{
ServiceReference1.Service1Client custService = new ServiceReference1.Service1Client();
System.Data.DataSet dsCust;
dsCust = custService.ReturnCustomers();
GridView1.DataSource = dsCust;
GridView1.DataBind();
}
The error i get when clicking button 1 is as follows:
An error occurred while receiving the HTTP response to http://localhost:8732/Design_Time_Addresses/ServiceNorthwind/Service1/. 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.
I have researched and all i could come up with was that the dataset is too large but i have seen people able to return even larger datasets with pretty much the same code...
any idea as to what i am doing wrong??
Thanks in advance...
Warren van Tonder - Junior Microsoft Certified Professional Developer