BackgroundWorker thread in ASP.NET

后端 未结 7 1943
日久生厌
日久生厌 2020-11-27 17:50

Is it possible to use BackGroundWorker thread in ASP.NET 2.0 for the following scenario, so that the user at the browser\'s end does not have to wait for long time?

7条回答
  •  [愿得一人]
    2020-11-27 18:10

    You shouldn't do any threading from ASP.NET pages. Any thread that is long running is in danger of being killed when the worker process recycles. You can't predict when this will happen. Any long-running processes need to be handled by a windows service. You can kick off these processes by dropping a message in MSMQ, for example.

提交回复
热议问题