Hello,
I have a single WebMethod which will return List object as shown below
[WebMethod]
public List<ContactMaster> GetContacts()
{
//ContactMaster contact = new ContactMaster();
List<ContactMaster> contacts=new List<ContactMaster>();
IQueryable<ContactMaster> contact = from c in db.ContactMasters
select c;
foreach (ContactMaster c in contact)
{
contacts.Add(c);
}
return contacts ;
}
When I try to invoke the same method from client I am getting an error as follows
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException