У меня есть один WebMethod, который будет возвращать объект List, как показано ниже
[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 ;
}
Когда я пытаюсь вызвать тот же метод из клиента, я получаю сообщение об ошибке следующим образом
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException