experiencing precisely this error.
nothing can be found but this page.
@-- -- could you please help and share any results or a follow up link to github?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
I am using code below at the end to query an OData v4 service. The data is returned fine however when I try to iterate through it using;
foreach (var client1 in clients)
I get an 'System.Xml.XmlException: 'Data at the root level is invalid. Line 1, position 1.'' error.
How can I fix the issue? Why is it checking for xml when the data is retuned as json?
I am using Micorsoft OData Connected Service to generate classes and plumbing for OData client.
Thanks
Regards
var serviceRoot = "http://localhost:65202/api/odata/";
var context = new Container(new Uri(serviceRoot));
context.BuildingRequest += Context_BuildingRequest;
var clients = context.Clients.Where(c => c.ID >= 0 & c.ID <= 100)
.OrderByDescending(p => p.ID)
.Select(c => new { c.Company, c.ID });
foreach (var client1 in clients)
{
Console.WriteLine("{0} {1}", client1.Company, client1.ID);
}
experiencing precisely this error.
nothing can be found but this page.
@-- -- could you please help and share any results or a follow up link to github?