I am executing the action result LongRunningProcess using webclient code, anyway to stop the process execution externally rather than stopping it in iis?
public IHttpActionResult LongRunningProcess()
{
for (int i = 0; i < 5000000; i++)
{
Thread.Sleep(1000);
}
return Json("Completed");
}
using (WebClient wc = new WebClient())
{
string myParameters = "";
wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
string HtmlResult =await wc.UploadStringTaskAsync("http://...../LongRunningProcess", myParameters);
}