Questions tagged [httptaskasynchandler]

HttpTaskAsyncHandler is a .NET class that provides various methods which can be used from an HTTP task handler to process asynchronous tasks.

HttpTaskAsyncHandler is a .NET class that provides various methods which can be used from an HTTP task handler to process asynchronous tasks. It is an easier way to handle asynchronous tasks without the need to implement BeginProcessRequest and EndProcessRequest.

6 questions
5
votes
3 answers

How to work with HttpTaskAsyncHandler

public class FooHandler : HttpTaskAsyncHandler { public override async Task ProcessRequestAsync(HttpContext context) { return await new AdRequest().ProcessRequest(); // getting error here. "Return type of async type is…
DarthVader
  • 52,984
  • 76
  • 209
  • 300
3
votes
1 answer

console.writeline within Task does not work

I am learning task aysny based programing and cannot get to make this code work. The console prints the message only once and then disappears. if I remove the read line and run the program(not debug mode) the console just appears with message…
kimi86
  • 210
  • 4
  • 12
2
votes
1 answer

MVC 5 / .NET 4.5 - Long running process

I have a website on Rackspace which does calculation, the calculation can take anywhere from 30 seconds to several minutes. Originally I implemented this with SignalR but had to yank it due to excessive CC usage. Hosted Rackspace sites are really…
John Hughes
  • 367
  • 1
  • 3
  • 20
2
votes
1 answer

HttpTaskAsyncHandler and HTTP context

I am just starting to learn how Task works, and get one interesting case. I have HttpTaskAsyncHandler but I can't get acccess to HttpContext if my code inside ProcessRequestAsync calls to some Task public class MyAsyncHandler :…
Arbejdsglæde
  • 13,670
  • 26
  • 78
  • 144
1
vote
1 answer

Why am I getting Bad Request trying to POST a GraphQL query from a C# handler?

I'd like to use a web service or a handler to send a mutation to a GraphQL API. I've got GraphQL code working in Postman and a console app. But whenever I try similar code in a service or handler, all I can get is a 400 Bad Request. Currently trying…
1
vote
1 answer

HttpTaskAsyncHandler - seems to block but I know something is wrong

In the code below there is a HttpTaskAsyncHandler that calls doit that first delays 5 seconds and writes a string out to browser. If I have two browser tabs open and call this page on both. The first responds in 5 seconds and the second in…
gkelly
  • 268
  • 1
  • 9