viewpoint-particle

Author Topic: WebBatch Interactive Response Web Page  (Read 2472 times)

jazzy495

  • Newbie
  • *
  • Posts: 1
WebBatch Interactive Response Web Page
« on: October 06, 2014, 11:27:48 am »
I have a WebBatch script that was migrated from Windows Server 2000 to Windows Server 2008 R2 (64-bit). The WebBatch code has different behavior now that it is on 2008 R2. When the WebBatch script was called on Windows Server 2000 the user would get web page updates at each step of the WebBatch script. Now that the WebBatch is running on Windows Server 2008 R2 - the user gets no updates until the entire script is done and then they appear to get the whole page at the same time. Here's an example script I wrote to show what was happening:

Code: [Select]
WebOut("Content-type: text/html",2)     
WebOut("<html><body>",1)
WebOut('Step 1 of 3 - Submitting batch job',1)
TimeDelay(5) 
WebOut('Step 2 of 3 - Processing Data',1)
TimeDelay(5) 
WebOut('Step 3 of 3 - Done',1)
TimeDelay(5) 
WebOut(' Finished',1)
WebOut('</body></html>',1)

When this SimpleOutput.web WebBatch program ran on Windows Server 2000 the user gets a browser response "Step 1 of 3 - Submitting Batch Job" then 5 seconds later they get the message "Step 2 of 3 - Processing Data", then 5 seconds later they would get "Step 3 of 3 - Done" then 5 seconds later they get the "Finished" message that completes the job. So you can understand that the user got frequent updates in their IE browser along the way of the status of the job.

Now that the SimpleOutput.web WebBatch program is running on Windows Server 2008 R2 (64-bit) this step by step update to the client browser no longer works. Now what happens is the user calls SimpleOutput.web and the client gets a blank browser for 15 seconds then all at once gets a response that is all the Steps at once. Now the user complains that the system is 'hanging up' and not responsive so they hit the back button (oh no!) and rerun the SimpleOutput.web again.

How can I get my SimpleOutput.web WebBatch program to send regular step by step updates to the browser as it runs so that the user knows what step the program is on at any given moment? 

Thank you in advance for your support,

Bruce

td

  • Tech Support
  • *****
  • Posts: 2159
    • WinBatch
Re: WebBatch Interactive Response Web Page
« Reply #1 on: October 06, 2014, 03:02:38 pm »
Obviously, IIS 7.* is buffering output in the standard output buffer until the buffer is closed when the WebBatch ends execution.  I am not aware of any IIS setting that changes that behavior. 

Perhaps someone else can thing of  a better idea but you could dump some javaScript to the browser that would periodically call back to the server with a parameter.  WebBatch could then use the parameter to determine the message to send back to the browser.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


Windowless

  • Newbie
  • *
  • Posts: 11
Re: WebBatch Interactive Response Web Page
« Reply #2 on: May 05, 2015, 05:32:12 pm »
responseBufferLimit=0 should be set in the IIS configuration on the server.

td

  • Tech Support
  • *****
  • Posts: 2159
    • WinBatch
Re: WebBatch Interactive Response Web Page
« Reply #3 on: May 06, 2015, 08:24:40 am »
Better late than never.  It does appear that IIS 7.5 does have a 'responsBufferLimit' property and has been reported that setting the property to 0 resolves similar issues.

Thanks for bringing it to our attention.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates