Login  
Search All Forums
Dart Home | PowerTCP Web Enterprise for ActiveX | Custom Development Reply | PowerTCP Web Enterprise for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web Enterprise for ActiveX
Topic: Progress and State events for web client
BrendanM

From: Durban, South Africa
Posts: 80
Member Since: 07/11/02
posted May 2, 2018 12:15 PM

I have a WebASP client that POSTs data to a web server. It’s a large chunk of plain text – 160K bytes.

If I make the Timeout = 0 and the web server is off-line then I see this happening after a single call to the POST method:
1) The State event fires to say it is connected (very strange because the web server is off !)
2) A few Progress events fire with Method=webPost and Status=webSending to give an indication of progress (gets to about 25% of my 160K)
3) The State event fires to say it is disconnected
4) The Progress event never fires to say Method=webPost and Status=webBad (so I never know its failed)

If I make the Timeout > 0 and the web server is off-line then I see this happening after a single call to the POST method:
1) The State event fires to say it is connected (very strange because the web server is off !)
2) A few Progress events fire with Method=webCommand (not webPost) and Status=webSending to give an indication of progress (gets to about 25% of my 160K)
3) The State event fires to say it is disconnected
4) The Progress event never fires to say Method=webPost and Status=webBad (so I never know its failed)

If I make the Timeout = 0 and the web server is ON-LINE then I see this happening as expected after a single call to the POST method:
1) The State event fires to say it is connected
2) All the Progress events fire with Method=webPost and Status=webSending to give an indication of 100% of progress
3) 2 progress events fire with Method=webPost and Status=webReceiving which I presume is the response coming back
4) 1 progress event fires with Method=webPost and Status=webOk

If I make the Timeout > 0 and the web server is ON-LINE then I see this happening after a single call to the POST method:
1) The State event fires to say it is connected
2) All the progress events fire with Method=webCommand (not webPost) and Status=webSending to give an indication of 100% of progress
3) 2 progress events fire with Method=webCommand (not webPost) and Status=webReceiving which I presume is the response coming back
4) 1 progress event fires with Method=webCommand (not webPost) and Status=webOk

In summary:
- State event still fires with tcpConnected if web server is offline
- The Progress event fires to saying its sending data but it cannot send data because the web server is offline
- The Progress event never fires to say Method=webPost and Status=webBad if the web server is offline
- With Timeout>0 the progress event has Method=webCommand. It should be webPost
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted May 3, 2018 4:02 PM

Hello,

I tested your first report, and was unable to reproduce your issue. I set the timeout to 0, and attempted to post data amounting to approximately 160k:

Attempting to connect to an IP address that doesn't have a machine associated with it:
State changed: tcpConnecting
Error occurred: The connection has been dropped because of a network failure or because the peer system failed to respond. Also caused when Connect, Send, Receive, Fill or Close methods are used with a Timeout parameter and the operation fails to complete within the specified number of milliseconds.
State changed: tcpClosed

Attempting to connect to an IP address that does have a machine associated with it, but nothing listening on port 80:
State changed: tcpConnecting
Error occurred: Connect method failed. No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host - i.e. one with no server application running.
State changed: tcpClosed

For #2.4, "Method=webPost and Status=webBad" - the error event is raised, since we're unable to connect to the server (it's not a Web error, it's a TCP error).

I also tested your report #3 about incorrect progress method values when Timeout=0, and was unable to reproduce your issue:
State changed: tcpConnecting
State changed: tcpConnected
Method: webPost Status: webSending Count: 260 Size: 160875
Method: webPost Status: webSending Count: 8452 Size: 160875
Method: webPost Status: webSending Count: 16644 Size: 160875
Method: webPost Status: webSending Count: 24836 Size: 160875
Method: webPost Status: webSending Count: 33028 Size: 160875
Method: webPost Status: webSending Count: 41220 Size: 160875
Method: webPost Status: webSending Count: 49412 Size: 160875
Method: webPost Status: webSending Count: 57604 Size: 160875
Method: webPost Status: webSending Count: 65796 Size: 160875
Method: webPost Status: webSending Count: 73988 Size: 160875
Method: webPost Status: webSending Count: 82180 Size: 160875
Method: webPost Status: webSending Count: 90372 Size: 160875
Method: webPost Status: webSending Count: 98564 Size: 160875
Method: webPost Status: webSending Count: 106756 Size: 160875
Method: webPost Status: webSending Count: 114948 Size: 160875
Method: webPost Status: webSending Count: 123140 Size: 160875
Method: webPost Status: webSending Count: 131332 Size: 160875
Method: webPost Status: webSending Count: 139524 Size: 160875
Method: webPost Status: webSending Count: 147716 Size: 160875
Method: webPost Status: webSending Count: 155908 Size: 160875
Method: webPost Status: webSending Count: 160877 Size: 160875
Method: webPost Status: webReceiving Count: 580 Size: 15209
Method: webPost Status: webReceiving Count: 1360 Size: 15209
Method: webPost Status: webReceiving Count: 6800 Size: 15209
Method: webPost Status: webReceiving Count: 10880 Size: 15209
Method: webPost Status: webReceiving Count: 12240 Size: 15209
Method: webPost Status: webReceiving Count: 15209 Size: 15209
Method: webPost Status: webOk Count: 0 Size: 0

How exactly is your website 'offline'? Is the server machine on, but the server application (such as IIS) off? (Have you tried connecting with a web browser?)

What version of WebASP are you using? (You can see the expected version of each dll in the current release here: http://www.dart.com/ptwbe_relhist.aspx )

Can you provide a zipped-up project that reproduces each of your issues (each demonstrated from, for example, a different button. And information written to a textbox) into support@dart.com (do not include executables or dlls)?
BrendanM

From: Durban, South Africa
Posts: 80
Member Since: 07/11/02
posted May 3, 2018 4:22 PM

Hi Nick. I will email you a project tomorrow. Website is offline when server machine is on but nothing listening on the port.

1.9.1.1      
C:\WINDOWS\system32\DartWebASP.dll
BrendanM

From: Durban, South Africa
Posts: 80
Member Since: 07/11/02
posted May 4, 2018 2:57 AM

A ZIP file has been emailed. Please make sure it gets through your FW or anti-spammer
Jamie Powell (Admin)

From: Rome, NY USA
Posts: 448
Member Since: 03/13/07

Extra Support Options
Custom Application Development

posted May 4, 2018 11:54 AM

Thank you. The file has been received. You will receive a reply once testing is complete.

Regards,
Jamie
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted May 4, 2018 3:54 PM

Thank you for sending in your project. I am now able to reproduce #4; if WebAsp.Request.Variables does not contain anything, the POST is incorrectly reported as webCommand. I have entered this as TTWeb5787.

I am still unable to reproduce your reports #1 and #2 (unexpected behavior when the WebServer is offline); I still receive a 'Error 10061 Connect method failed - actively refused' error when using your sample, tested both on a Windows 7 and Windows XP SP3 machine. This suggests something specific to your environment. Does 'netstat -a' (executed on the machine you're attempting to connect to) report anything as accepting connections on that IP and port? Are you able to connect to the IP + port via telnet? Have you tested on and/or against other machines?
BrendanM

From: Durban, South Africa
Posts: 80
Member Since: 07/11/02
posted May 5, 2018 12:25 PM

Making sure the port was free was the first thing I did when the problem came up. This was what netstat -an returned (below), and showing port 81 as free.


Active Connections

 Proto Local Address     Foreign Address    State
 TCP  0.0.0.0:25       0.0.0.0:0       LISTENING
 TCP  0.0.0.0:80       0.0.0.0:0       LISTENING
 TCP  0.0.0.0:135      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:443      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:445      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:1043      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:1057      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:1801      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:2103      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:2105      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:2107      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:3389      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:6002      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:7001      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:7002      0.0.0.0:0       LISTENING
 TCP  0.0.0.0:15663     0.0.0.0:0       LISTENING
 TCP  0.0.0.0:19500     0.0.0.0:0       LISTENING
 TCP  127.0.0.1:1069     0.0.0.0:0       LISTENING
 TCP  127.0.0.1:6999     0.0.0.0:0       LISTENING
 TCP  127.0.0.1:8192     0.0.0.0:0       LISTENING
 TCP  192.8.64.139:139    0.0.0.0:0       LISTENING
 TCP  192.8.64.139:1064   192.8.64.139:3001   SYN_SENT
 TCP  192.8.64.139:2164   192.8.64.135:445    ES
BrendanM

From: Durban, South Africa
Posts: 80
Member Since: 07/11/02
posted May 5, 2018 1:24 PM

Seems like half of my previous long reply was in the forum .... I was syaing that I tried a Telnet which confirmed what you suspected. The port 81 was open but not reported by netstat. Thanks Windows ! Sorry for the hassles in chasing this Nick. At least we found a bug in Scenario 4. BTW: Right now I have to check 2 places to see if a Post fails. The 'Error 10061 Connect method failed - actively refused', and the webBad in the progress event. Could you not also make the Progress fire with a WebStatusConstant=webNoConenction or similar when the TCP connection cannot be opened? Means we only have to look in 1 place to see if a Post fails
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted May 7, 2018 2:04 PM

Hello Brendan,

The progress event is intended for HTTP-protocol-level progress only (above TCP), but I've entered this as feature request TTWeb5788. For information or updates on its status (or TTWeb5787), please contact jamie.powell@dart.com.
Reply | PowerTCP Web Enterprise for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX