Linked Questions

6 votes
1 answer
8k views

When I invoke below function in a console app, it just works. But when I add the same to a MVC controller, execution never reaches JsonConvert line. Any idea, what I am missing. Calling code ...
ragche's user avatar
  • 443
0 votes
1 answer
10k views

I had this code working in .Net Core. We realized Core wasn't the best fit for us right now, so I have been refactoring in .Net 4.5.2 and when I call HttpResponseMessage response = await client....
Steve Eggering's user avatar
2 votes
2 answers
2k views

I am trying to understand the async/await mechanism with MVC. Now I do not consider a use case where I would go out of the "normal flow" (using either full sync or full async end-to-end). I just want ...
Erick's user avatar
  • 6,119
118 votes
4 answers
89k views

I have a call I am making from inside a xaml-based, C# metro application on the Win8 CP; this call simply hits a web service and returns JSON data. HttpMessageHandler handler = new HttpClientHandler()...
keithwarren7's user avatar
  • 14.3k
51 votes
2 answers
31k views

I'm trying to test the follwing http request method public async Task<HttpContent> Get(string url) { using (HttpClient client = new HttpClient()) // breakpoint using (...
sgarcia.dev's user avatar
  • 6,220
21 votes
2 answers
11k views

I'm trying to set up email confirmation for an ASP.NET MVC5 website, based on the example AccountController from the VS2013 project template. I've implemented the IIdentityMessageService using ...
regexen's user avatar
  • 313
14 votes
1 answer
7k views

I have a search action that has two paths, a synchronous path, that just returns a simple view, and a asynchronous path, that does the search asynchronously and then returns a view. Both are GET ...
Dan Friedman's user avatar
  • 5,258
9 votes
2 answers
9k views

I'm using Visual Studio 2012 RC with .Net 4.5 and ASP MVC 4 RC. It hangs whenever I use async at all. The controller action method uses async but is not itself an async controller method. There are ...
13 votes
2 answers
2k views

There are a number of questions on SO about how to avoid deadlocks in async code (for example, HttpClient methods) being called from sync code, like this. I'm aware of the various ways to avoid these ...
DumpsterDoofus's user avatar
4 votes
2 answers
7k views

I am trying to use HttpClient synchronously but when I make many concurrent requests it stops working. I wrote two tests, one for asynchronous usage and one for synchronous usage. TestMethod always ...
Thresh's user avatar
  • 953
2 votes
2 answers
7k views

I have the following Action method that uses Scanner class which uses some webservice to get some data. When I use breakpoint inside GetSuggestions method, I can see the result. However, this data is ...
emre nevayeshirazi's user avatar
0 votes
1 answer
5k views

I have this c# MVC code and it works fine with the GetAsync and GetPost methods, but when using GetStringAsync, it freezes up at the line: version = await client.GetStringAsync("/API/Version"); ...
max's user avatar
  • 10.6k
3 votes
2 answers
4k views

I'm using HttpClient and ProgressMessageHandler from the MS ASP.NET Web API Client Libraries. I've happily tinkered with this in a console application without issue, but now in a WinForm app, a "Post"...
Snixtor's user avatar
  • 4,347
1 vote
2 answers
7k views

I'm working on my first app for Windows 8 but I have a problem, when I'm launch my app, I've got the error "Response status code does not indicate success: 401 (Authorization Required) So yes, I ...
Guillaume Fortunier's user avatar
2 votes
1 answer
10k views

I have a vb console application that acts a a relay to a desktop application - posting data to an online service. Because posts are relatively large and frequent, my intention is to 'fire and forget'....
Alex Webster's user avatar

15 30 50 per page