How I can implement Background Processing in asp.net. Can anyone give a small and easy sample or provide me a useful link.
thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Background processing means handling some necessary operations on the background without disrupting asp.net website workings. In synchronous model of operation to receive response from the server, user has to wait for all operations to complete. If there are some operations that do not need users intervention (for example, upon posting to blog send e-mail to all subscribers) they can be processed in background, while user can further interact with a website.
In terms of threads it means that main thread (which processes user request) calls/creates another thread to do part of work in it’s stead.
There are 2 ways to use background processing: for operations that are handled periodically – needing application-wide background processing; per user request – needing request-level background processing.
Here’s a simple example of backgroundWorker to use for application-wide processing.
To do a request-level background processing you’d need to implement some queue for pending requests and iterate over them using the backgroundWorker presented earlier.