0

Not sure if StackOverflow is the right place to be asking this, though I am curious to know. Will IIS ever actually stop a request mid-way through? If I submit a form which takes awhile to run, and the user presses back and the request shows as CANCELED in the browser. How will IIS treat this? I did a Thread.Sleep() in my action in ASP.net MVC, then pressed back on the browser and the request was shown as CANCELED, though when the thread.sleep ended it continued processing the request.

Is this simply because I was using a Thread.Sleep and it caused some kind of issues with IIS threadpool, or does IIS never terminate any threads? Is it reliable to assume that once a form is submitted it will always run on the server regardless of what the client does with the request afterwards?

Community
  • 1
  • 1
David Esteves
  • 1,614
  • 2
  • 15
  • 22
  • If you've SessionState disabled the second postback will overrule the first one. https://msdn.microsoft.com/en-us/library/ms178581(v=vs.140).aspx – BvdVen Jul 02 '15 at 13:44
  • It sounds like you're trying to perform too much work for a web request. Use a Windows Service or scheduling framework to execute long-running tasks, not IIS. – CodeCaster Jul 02 '15 at 13:44
  • It may terminate, if you e.g. force a recycle or something. But by itself it most likely won't. – Sami Kuhmonen Jul 02 '15 at 13:45

0 Answers0