Threading in ASP.NET - inputs needed
-
Hello, I'm pondering the use of threading in my asp.net application, and would sure like some input from you guys. Upon a succesful login, details about this login must be written to a database. In itself an operation which has no influence on the application per se. So as to not slow the app down, I'm considering sending this to a thread of its own, as I anticipate a hefty run on the application throughout the two weeks it will be up. Would this make sense to ship off to a seperate thread - or would there be too many complications (such as a maxed out threadpool) deriving from this? I'm not big on threads in asp.net, but hopefully some of you are, and have a piece of advice for me. Thanks in advance, Morten
-
Hello, I'm pondering the use of threading in my asp.net application, and would sure like some input from you guys. Upon a succesful login, details about this login must be written to a database. In itself an operation which has no influence on the application per se. So as to not slow the app down, I'm considering sending this to a thread of its own, as I anticipate a hefty run on the application throughout the two weeks it will be up. Would this make sense to ship off to a seperate thread - or would there be too many complications (such as a maxed out threadpool) deriving from this? I'm not big on threads in asp.net, but hopefully some of you are, and have a piece of advice for me. Thanks in advance, Morten
I would like to know why do you want to save the details of login. If it is for reporting purpose ( who has logged in since date so so) then i would like to say that rather then making another query to the database for saving the details and making a thread, you should do the following. Query the database for username and password (through a stored procedure) if they are valid (successful login) insert these details in the table you want to save (in the same procedure0 and then return to redirect the user to the successfull login page. Hope it solves your problem.
Ahsan Ullah Senior Software Engineer
-
I would like to know why do you want to save the details of login. If it is for reporting purpose ( who has logged in since date so so) then i would like to say that rather then making another query to the database for saving the details and making a thread, you should do the following. Query the database for username and password (through a stored procedure) if they are valid (successful login) insert these details in the table you want to save (in the same procedure0 and then return to redirect the user to the successfull login page. Hope it solves your problem.
Ahsan Ullah Senior Software Engineer