multi threading in asp.net

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.
 
J

Jon Skeet [C# MVP]

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.
 
G

Guest

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 ..
 
G

Gav

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 ]
 
D

DM McGowan II

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.
 
D

DM McGowan II

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top