Newbie question: what application types or VS2013 project types are required to use HttpClient?
I created a console app that makes a PostAsJsonAsync() call with no problems and returns the expected data.
The same code, in a VS2013 ASP.NET 4.5 web application project with Web API core folders and files included compiles and runs, but at the PostAsJsonAsync call (below), the
var response = await client.PostAsJsonAsync("Screen", request);
app becomes non-responsive. It does not freeze, but I cannot debug anything after this line. It's out in LaLa land.
Before I continue trying to debug, are there special requirements to using HttpClient?
I am referencing System.Net.Http and .HttpHeaders, and have installed the http client code from NuGet.
Looking online, the sample apps I see are either MVC or Console. Do I need to go with MVC or Console?
None
0 Points
11 Posts
Using HttpClient in ASP.NET?
Apr 27, 2015 10:35 AM|tjg5_99|LINK
Newbie question: what application types or VS2013 project types are required to use HttpClient?
I created a console app that makes a PostAsJsonAsync() call with no problems and returns the expected data.
The same code, in a VS2013 ASP.NET 4.5 web application project with Web API core folders and files included compiles and runs, but at the PostAsJsonAsync call (below), the
app becomes non-responsive. It does not freeze, but I cannot debug anything after this line. It's out in LaLa land.
Before I continue trying to debug, are there special requirements to using HttpClient?
I am referencing System.Net.Http and .HttpHeaders, and have installed the http client code from NuGet.
Looking online, the sample apps I see are either MVC or Console. Do I need to go with MVC or Console?