Click here to Skip to main content
15,891,902 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I am facing a problem in my asp.net application.
We have an application which process salary of employees and each process takes around 0.5 sec to complete.
If we have 60 emps then it takes 30 secs since the execution is sequential, also we are using a shared hosting account from godaddy.
The problem is if we have more employees and if processing time exceed 30 secs then I receive connection reset error at client side, I know the problem is bcoz of script time out and we cannot change it.
To overcome this problem we tried lot solutions but in vain.
Solution 1 : Multi threading, using it takes more time and we have limitiations of creating just 25 threads.
Solution 2 : using update panel for each employee grid row call c# code, but only the last request gets executed.
Solution 3 : using java script functionality to refresh update panel, this works fine as we wish and returns values also but takes lot of time since for every request request it given and then the response is received so these hops consume more time and all this happens sequentially
Solution 4 : Keeping records in datatable in session and then binding later again connection is reset after 30 secs

I want a solution where all the request for processing is sent to server asynchronously and data received parallely or asynchronously.
Kindly reply if you have a solution
Posted
v2

1 solution

You must remember that while you can take data fetching to the background and run them via background threads, your UI will still be refreshed by the single UI Thread which is controlled by the framework / OS.

Parallel programming can be applied to DB calls or to loops etc in your code provided you are using 4.0.

Also try and eplore the Task class[^] (proivided you use frameworks 4.5).
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900