Linked Questions
16 questions linked to/from failed to serialize the response in Web API
0 votes
0 answers
937 views
'ObjectContent`1' type failed to serialize the response body for content type 'text/xml; charset=utf-8' [duplicate]
the old question solved to json side I get normal response from API when I request content type 'text/json and the problem when I request content type 'text/xml; I get this message An error ...
637 votes
27 answers
555k views
JSON.NET Error Self referencing loop detected for type
I tried to serialize POCO class that was automatically generated from Entity Data Model .edmx and when I used JsonConvert.SerializeObject I got the following error: Error Self referencing loop ...
118 votes
27 answers
248k views
Failed to serialize the response in Web API with Json
I am working with ASP.NET MVC 5 Web Api. I want consult all my users. I wrote api/users and I receive this: "The 'ObjectContent`1' type failed to serialize the response body for content type '...
68 votes
5 answers
51k views
Should I enable or disable dynamic proxies with entity framework 4.1 and MVC3?
Could someone offer up some advice or point out some blogs/articles that could help with making this decision? The proxies seem very foreign to me and I'm hesitant to use them. I like the ability to ...
11 votes
3 answers
10k views
WebApi with EF Code First generates error when having parent child relation
I am breaking my head over this issue. I did find something on the internet about it, but not a clear answer. My problem: I have to classes in Model section of an MVC3 web app: ParentClass and ...
8 votes
4 answers
4k views
Getting XML from stored procedure
I am getting an output of XML from a stored procedure. What I am trying to do is get that XML and pass it out via ASP.NET: public XmlDocument GetPunchListXml(string communityDesc) { try { ...
3 votes
2 answers
11k views
Retrieving Data from LINQ to SQL in JSON format?
I have a problem with Serialization of Data from database to JSON format. I'm using WebAPI 2 and Entity Framework 6. I've created with EF a Model. The database and the tables with content are even ...
2 votes
2 answers
2k views
How do I return a ViewModel from a Web API controller method AS JSON?
My Controller method is called successfully and the view model loads data, but throws an error upon returning. public AccountManagerViewModel Get(string id) { AccountManagerViewModel account = ...
1 vote
0 answers
2k views
The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json'
I am using asp.net MVC with WebApi. Everything is working fine on localhost but on appharbor deployed website i am getting exception The 'ObjectContent 1 type failed to serialize the response body for ...
0 votes
3 answers
609 views
ASP.NET Web API failed to serialize the response content
I'm making a UWP application, using Entity Framework, with WebApi about Students and Courses. I have amany-to-many relationship between my Students and Courses. I tried to route an action that ...
0 votes
0 answers
364 views
Fullcalendar not showing events from database
Following this tutorial and my question, now I can't get the events from my database. The model: public class Event { public virtual int id { get; set; } public virtual string title { get; ...
1 vote
1 answer
320 views
How do make an object (with custom data types) serializable in VB.net such that it can be converted to JSON?
I have an object that has custom data types in it. When I try to pass that object through my REST API, I get an error that says: The 'ObjectContent'1' type failed to serialize the response body for ...
1 vote
1 answer
270 views
Exception Fetching db data in WEBAPI controller in asp.net
I am trying to return some data to client page using webAPI. Please see below the exception am currently seeing while trying to access the api/controller from a browser StackTrace System.Runtime....
0 votes
0 answers
200 views
Failed to serialize the response in iis with Json
when I try to get data from my API on IIS this error is shown The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'." this error is ...
0 votes
0 answers
78 views
Return IQueryable<SomeEntity> failed
Currently I am using aspnetboilerplate to enhance a project which include both mvc and web api, after port web api code to abp, I found the controller cannot return entity successfully, the code like ...