views:

120

answers:

2

Hi folks,

i'm not sure I've used the correct terms in the title but this is my question.

If i have a stock standard ASP.NET webpage (webforms or mvc) and i wish to do some longish processing, I create a new process and fire that off.

Eg. save an uploaded file to a local folder then do some image manipulation on it Eg. save an uploaded video to a local folder then do some video encoding on it.

So while this process is doing it's thing, will it effectively block on available connection hitting the IIS server, to be processed/handled?

Like, I heard there was a finite number of connections that can get processed at once ... which is the number of threads on the ... err thread-queue? Hmm.

Basically, can i have some background tasks going ahead and it doesn't impact the number of possible requests i can process.

+2  A: 

If you spawn a new thread, you CAN continue processing the response to the user, and the connection will close and release the connection to the pool. We use this type of setup for error logging purposes where I work. The user gets a quick error message and we have a lengthy process that tries to figure out what happened and inform us through various mechanisms.

But don't take my word for it, spawn a thread with a long sleep and test it out for yourself.

NickLarsen