Author: gibble | Posted on: 2/5/2009 10:29:39 AM | Views : 634

The Error
A circular reference was detected while serializing an object of type 'System.Xml.Linq.XElement'.

The WebMethod

[WebMethod()]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static XElement GetSellingWeekData(string filter)
{
using (Maintenance.Service maintenance = new Maintenance.Service())
{
string xml = maintenance.themethod(filter).OuterXml;
return XElement.Parse(xml);
}
} The xml (values removed)

<SellingWeeks xmlns="">
<SellingWeek Customer="" Division="" DivisionDescription="" SellingSeason="" SellingSeasonDescripti ...

Go to the complete details ...