You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing LINQBridge one of our project was throwing runtime errors. We debugged and found the problem in serializing/deserializing data.
The error was in the BaseHTTPClient
After replacing
`
protected static T ReadResponse(HttpResponseMessage response)
{
if (response.IsSuccessStatusCode)
{
var task = response.Content.ReadAsAsync();
return task.Result;
}
with this
`
protected static T ReadResponse(HttpResponseMessage response)
{
List m = new List();
m.Add(new JsonMediaTypeFormatter
{
SerializerSettings = new JsonSerializerSettings()
{
TypeNameHandling = TypeNameHandling.All
}
});
if (response.IsSuccessStatusCode)
{
var task = response.Content.ReadAsAsync<T>(m);
return task.Result;
}
response.EnsureSuccessStatusCodeWithContent();
return default(T);
}
`
The problem was solved
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue. The installation itself shouldn't generate issues, however I guess you bridged the entire solution, is that correct?
I would need more info to replicate this bug, could you tell me the definition of type T that is generating the runtime error? Also, what exception are you seeing?
After installing LINQBridge one of our project was throwing runtime errors. We debugged and found the problem in serializing/deserializing data.
The error was in the BaseHTTPClient
After replacing
`
protected static T ReadResponse(HttpResponseMessage response)
{
if (response.IsSuccessStatusCode)
{
var task = response.Content.ReadAsAsync();
return task.Result;
}
`
with this
`
protected static T ReadResponse(HttpResponseMessage response)
{
List m = new List();
m.Add(new JsonMediaTypeFormatter
{
SerializerSettings = new JsonSerializerSettings()
{
TypeNameHandling = TypeNameHandling.All
}
});
`
The problem was solved
The text was updated successfully, but these errors were encountered: