Unable to load WCF Webservice
"An error occurred while loading types for the web service method GetData."
The same service works fine in my Silverlight application. Here is my service code.
namespace SLApp.Web
{
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class LoadTestDemoService
{
// Add more operations here and mark them with [OperationContract]
[OperationContract]
[WebGet]
public string GetData(int value)
{
return string.Format("You entered: {0}", value);
}
[OperationContract]
[WebGet]
public List<CaseItem> GetCases()
{
List<CaseItem> caseitems = new List<CaseItem>();
caseitems.Add(new CaseItem() { CaseId = 1, CaseName = "Case Name 1" });
caseitems.Add(new CaseItem() { CaseId = 2, CaseName = "Case Name 2" });
caseitems.Add(new CaseItem() { CaseId = 3, CaseName = "Case Name 3" });
caseitems.Add(new CaseItem() { CaseId = 4, CaseName = "Case Name 4" });
caseitems.Add(new CaseItem() { CaseId = 5, CaseName = "Case Name 5" });
return caseitems;
}
}
public class CaseItem
{
public int CaseId { get; set; }
public string CaseName { get; set; }
}
}
Help will be appriciated.
Thanks!
Anwar