I am getting this error and I am unable to figure out why:
System.Xml.XmlException: You must write an attribute 'type'='object' after writing the attribute with local name '__type'.
Stack Trace:
[XmlException: You must write an attribute 'type'='object' after writing the attribute with local name '__type'.]
System.Web.Http.WebHost.HttpControllerHandler.EndProcessRequest(IAsyncResult result) +27904
System.Web.Http.WebHost.HttpControllerHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +10
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8971341
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
This is the controller which I made request against:
public class CategoryController : ApiController {
public IQueryable<Category> Get() {
var dbContext = new ListItCheckItContext();
return dbContext.Categories.AsQueryable();
}
}
tugberk_ugur...
Participant
1944 Points
1344 Posts
MVP
You must write an attribute 'type'='object' after writing the attribute with local name '__type'.
Feb 23, 2012 08:18 PM|LINK
I am getting this error and I am unable to figure out why:
This is the controller which I made request against:
public class CategoryController : ApiController { public IQueryable<Category> Get() { var dbContext = new ListItCheckItContext(); return dbContext.Categories.AsQueryable(); } }tweets as @tourismgeek