I've done some socket work where I had to send a request because I wanted a response back, but I need to write something in C# that's just going to call an old web page which takes about 10 seconds to respond, and not wait for the response (the failures will flag up with DB calls).
Is there a simple way to do this?
Try this thread: Async HttpWebRequest with no wait from within a web application
(This kind of approach is sometimes known as "fire and forget")
You can use the Async methods on the System.Net.WebClient class:
var webClient = new System.Net.WebClient();
webClient.DownloadStringAsync("your_url")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With