| Dart Home | PowerTCP Web for ActiveX | Custom Development | Reply | PowerTCP Web for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Web for ActiveX Topic: Http1.Abort hangs |
| ambgabi From: Brooklyn, NY USA Posts: 8 Member Since: 09/26/04 |
posted September 26, 2004 11:01 AM Private Sub StopUpload_btn_Click() On Error GoTo errmsg blStopFlag = True LogError "stop button", ftpstate.Item(Http1.State) & " blPosting = " & blPosting Http1.Abort LogError "after aborting", ftpstate.Item(Http1.State) & " blPosting = " & blPosting Exit Sub errmsg: LogError "error in stop ", "StopUpload_btn_Click" End Sub |
| ambgabi From: Brooklyn, NY USA Posts: 8 Member Since: 09/26/04 |
posted September 26, 2004 11:07 AM I am evaluating Dart Communications PowerTCP HTTP/1.0 I am http-ing image files in a loop. (ActiveX used in webpage) Many times, when I click on my stop button http1.abort hangs the whole system as seen below. Please help |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted September 26, 2004 11:17 AM It could be hanging up in other places like inside an event where you are processing data. Try running your in VB and next time it "hangs", hit CTRL-BREAK to see where it stops. If you are unable to find the exact place where it is hanging, please write a very simple app that duplicates the problem and send it to support@dart.com |
| ambgabi From: Brooklyn, NY USA Posts: 8 Member Since: 09/26/04 |
posted September 27, 2004 2:01 PM It is actually hangs on Http.abort. Please advise. Gabriella |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted September 27, 2004 2:09 PM Please write a very simple application that duplicates the problem and send it to support@dart.com |
| ambgabi From: Brooklyn, NY USA Posts: 8 Member Since: 09/26/04 |
posted September 27, 2004 6:35 PM We are still evaluating the control, but after taking the entire program apart we think that we have found the problem. Http_Progress is being fired very often. In your sample code you are using a progress bar to show the status of the post; our code would do the same with simple labels. However VB gets into trouble (hangs) if every time progress is called the width of a label is changed. However no error being fired. I impplemented a counter and this way it seems to be working. private sub Http1_Progress(count as long,size as long) on error resume next progresscounter = progresscounter = 1 If progresscounter >= 20 Then If Size > 0 And Not (Count >= Size) Then If Size > 0 Then lblProgress.width = (Count * lblTotalProgress.width) / Size progresscounter = 0 'DoEvents End If endif endif |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted September 27, 2004 6:48 PM First, get rid of the On error resume next. You may be getting errors and not know it. Second, never call Doevents inside our events. They are not rentrant. There is no need to do this, since we process events anyway. If you had doevents uncommented before, I'll bet that was the problem. |
| ambgabi From: Brooklyn, NY USA Posts: 8 Member Since: 09/26/04 |
posted September 28, 2004 10:08 AM Thank you for your reply. And it is the doevents (with labels). I tried it in your sample project and it hung there too. Once I took away all doevents it seems to be working. |
| Reply | PowerTCP Web for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|