I need to handle long requests inside IIS, processing the request itself is very easy, but it takes a lot of time mainly due to I / O. Basically I need to request another server, which sometimes requests a third server. Therefore, I want to process as many requests as I can at the same time. To do this, I need to process requests asynchronously, how to do it correctly?
Using the Socket class, I could easily write something like:
In the above example, the thread is freed up as soon as I call the "Start ..." method and the response is sent to another thread, so you can easily achieve a very high concurrency value. How do you do the same in an HTTP handler inside IIS?
source share