Ive been having an issue with an intermittent bug that only appears on a server, not local host.
After spending a lot of time on it, Ive nailed it down to the following.
When a particular page is submitted, it has to do 2 things.
It has to post back to the server, so that the data entered on the page can be processed, and added to the database.
At the same time, using client side javascript I am opening a new aspx page, that needs to pull some of that data back from the database, and render it in a form that is printed (more javascript).
Sometimes, when the printout form is created and displayed in the new browser, no data is present (Though it is in the database by the time I can check on it).
My initial thoughts are, on the second page, to have (Pseudocode)
so if for any reason there is no data after say 4 seconds, then an error can be reported. However, it seems a really clumsy way of handling this, and could, if a few differnet customers hit the same point at the same time, lead to a lot of Web Server threads sat there sleeping.
Any other suggestions, comments or even ridicule on my investigations that the pages are getting ahead of each other?
K
After spending a lot of time on it, Ive nailed it down to the following.
When a particular page is submitted, it has to do 2 things.
It has to post back to the server, so that the data entered on the page can be processed, and added to the database.
At the same time, using client side javascript I am opening a new aspx page, that needs to pull some of that data back from the database, and render it in a form that is printed (more javascript).
Sometimes, when the printout form is created and displayed in the new browser, no data is present (Though it is in the database by the time I can check on it).
My initial thoughts are, on the second page, to have (Pseudocode)
Code:
while (dataset.rows = null) and (emtpyRowCounter < 4)
{
emptyCount ++;
thread.sleep(1000);
}
so if for any reason there is no data after say 4 seconds, then an error can be reported. However, it seems a really clumsy way of handling this, and could, if a few differnet customers hit the same point at the same time, lead to a lot of Web Server threads sat there sleeping.
Any other suggestions, comments or even ridicule on my investigations that the pages are getting ahead of each other?
K