multi threading in asp.net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI,
I am trying multi threading in asp.net , but i could not do it.
We do a daily Run in our company for calculations purpose etc.. we use SQl Stored Procedures to do all the process at back end.
Actually my requirement is, when i call a Sql Stored Procedure from aspx page the process begins to run for that stored procedure, and I want to run another Sql Stored Procedure simultaneously as a second thread so that i can minimise the time to take the complete the run.
please any body come out with a solution for above problem.
Thanks.
Regards,
Hari.
 
I am trying multi threading in asp.net , but i could not do it.
We do a daily Run in our company for calculations purpose etc.. we
use SQl Stored Procedures to do all the process at back end.
Actually my requirement is, when i call a Sql Stored Procedure from
aspx page the process begins to run for that stored procedure, and I
want to run another Sql Stored Procedure simultaneously as a second
thread so that i can minimise the time to take the complete the run.
please any body come out with a solution for above problem.

It would help if you could say what your actual problem is.

See http://www.pobox.com/~skeet/csharp/multithreading.html for general
multi-threading discussion.
 
ASP.NET by nature is multi threaded itself.

But in your question you want to invoke two seperate stored procedures from a ASPX page.

There is no special codeing required for that, you can define the two methods in your code behind file. and then on click on the button you can use the Threading class to invoke the relevant methods in the thread.

Another way would be to write a Library dll, which has a class that can call the various methods in a Thread. and you can invoke this class from your ASP.NET Page.


But since ASP.NET exposes the full power of the programming language, there is nothing special you need to do ..
 
Have a look into IAsyncResult Begin/End

Saurabh Nandu said:
ASP.NET by nature is multi threaded itself.

But in your question you want to invoke two seperate stored procedures from a ASPX page.

There is no special codeing required for that, you can define the two
methods in your code behind file. and then on click on the button you can
use the Threading class to invoke the relevant methods in the thread.
Another way would be to write a Library dll, which has a class that can
call the various methods in a Thread. and you can invoke this class from
your ASP.NET Page.
But since ASP.NET exposes the full power of the programming language,
there is nothing special you need to do ..
--
Regards,
Saurabh Nandu
Master C#, the easy way...
[ www.MasterCSharp.com ]
 
hari said:
HI,
I am trying multi threading in asp.net , but i could not do it.
We do a daily Run in our company for calculations purpose etc.. we use
SQl Stored Procedures to do all the process at back end.
Actually my requirement is, when i call a Sql Stored Procedure from aspx
page the process begins to run for that stored procedure, and I want to run
another Sql Stored Procedure simultaneously as a second thread so that i can
minimise the time to take the complete the run.
please any body come out with a solution for above problem.
Thanks.
Regards,
Hari.

I think I'd use a ThreadPool.
 
Gav said:
Have a look into IAsyncResult Begin/End


methods in your code behind file. and then on click on the button you can
use the Threading class to invoke the relevant methods in the thread.
call the various methods in a Thread. and you can invoke this class from
your ASP.NET Page.
there is nothing special you need to do ..

That's between the Client and the Server, the OP is asking how to
parallelize a specific case on the Server.
 
Back
Top