Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Reading Session value from WebServer which processing the aspx page

Thread Tools

Reading Session value from WebServer which processing the aspx page

Posts: n/a

I'm developing a simple progress bar that display the
value for the task completed.

It has following files
1. A "StartTask.aspx" file that has a command
button "Start". When user clicks on this button, the file
is submitted to ASP.NET and the process goes through the
loop from 1 to 1000000. In every 10000th Counter, it
updates the session
variable "CurrentValue"=CurrentCounterValue (in this case
it will be 10000, 20000, 30000 etc) and fire the
Thread.Sleep(0) so that other waiting process can be run.

After it reaches 1000000, IT AGAIN GOES THROUGH ANOTHER
LOOP FOR 1 to 10000 and update the value of "CurrentValue"
in every 1000th count.

Once this small loop is completed, it goes through another
loop for 1 to 100000 and updates the value of
the "CurrentValue" once it is completed. The it returns
the page to the browser.

2. A Webservice file (Progress.asmx) with web
method "getCurrentValue()" that returns the value of the
session object(!) "CurrentValue".

3. A HTML file (Progress.html) that call the
webmethod "getCurrentValue()" in every 1000ms. I'm
using "WebService Behaviour" to call the webmethod without
refreshing the html file.

When user clicks on the "Start" command button, it opens a
new window with the "Progress.html" file and submits
the "StartTask.aspx" file also.

As the StartTask processed, obviously it updates the value
for "CurrentValue" in every 10000th count. BUT value
of "CurrentValue" is updated in the "Progress.html" ONLY
WHEN the process of the "StartTask.aspx" is completed.

So, my question is how to run these task simultaneously so
that I can get the updates in the "Progress.html" when the
value of the session "CurrentValue" is changed by
OF THE StartTask.aspx page!!!).

I also tried changing [Thread.Sleep(0) to Thread.Sleep
(3000)] in the "StartTask.aspx" and also by increasing
value of [ maxconnection="20" ] in the web.config file.
But these don't solve the problem!

Can anyone please help me to solve this problem!


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: Call an ASPX page from a main ASPX page Progman ASP .Net 2 02-13-2006 01:39 AM
Loading an aspx page in a fram from another aspx page =?Utf-8?B?Uk1M?= ASP .Net 1 09-16-2005 01:21 PM
adding main.aspx.vb & main.aspx.resx under aspx John M ASP .Net 1 05-29-2005 09:27 PM
How to Pass values between from a popup page aspx & a normal page aspx Marco Antonio Montalvo Durán ASP .Net 2 01-23-2004 09:35 PM
How do I post data from aspx page to another aspx page. Sriram Mallajyosula ASP .Net 1 11-05-2003 04:48 PM