Bind To WCF Service Tutorial

1 reply. Last post: May 18, 2012 6:01 AM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Frank PMember

While attempting to build and execute the Bind to WCF Service tutorial here, I receive the "Unable to communicate with server" error.

It seems the tutorial was copied from the Bind to Web Service tutorial. This section causes an error because the decorators are not correct for a WCF service.

[System.Web.Script.Services.ScriptService] )[WebMethod]
public List<customer> GetCustomers()
{ 
    NorthwindDataContext context = new NorthwindDataContext();
    context.DeferredLoadingEnabled = false;
    context.ObjectTrackingEnabled = false; 
    return context.Customers.ToList();
}

Where should the code exist for a WCF service call? How should the return value be set?

Do you have a working example of loading the webgrid from a webservice?

All times are GMT -5. The time now is 10:26 PM.
Previous Next