Author | Forum: PowerTCP Web for ActiveX Topic: Delay unloading application using SSL |
Barbara Hamby From: Springfield, MO USA Posts: 11 Member Since: 10/04/02 |
posted October 14, 2002 1:01 PM Hi, I'm using the Dart Web Tool with VB6 to post some data to an https server. It's working just great now, but my users are reporting that it takes about 60 seconds for the program to finish unloading after it exits. We're launching a separate executable that performs the https communications and then returns control to the main application. I've tried asynchronous and synchronous with the same results. If I use the post example with http, it exits immediately, but if I modify it to use https, it hangs even if I include an End statement. I checked into http://support.dart.com/KBDetail.dwp3 and downloaded the patch for NT4 from microsoft, but it didn't help. It isn't hanging indefinitely, just for 55-60 seconds (it's very consistent). If I run the https program from within the VB6 IDE, it exits immediately. Do I need to switch to the tool that doesn't use wininet to get around this problem? Everything else is working so well with the web tool that I'm hesitant to switch tools this late in development. Thanks! |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted October 14, 2002 1:20 PM Hi, I am unable to reproduce this. I modified the Post Demo sample, by simply changing the Url to the secure page: "https://www.dart.com/PostSample.asp" I compiled it and ran the exe on an NT4 machine. After receiving the server's response, I closed the app down. I never experienced a delay of any kind. Please try this slight modification to the sample, and let me know if you see something different. Thanks, -ken |
Barbara Hamby From: Springfield, MO USA Posts: 11 Member Since: 10/04/02 |
posted October 14, 2002 2:11 PM I was also using dart strings to grab the cookie out from the headers and stick it back in on the subsequent posts. I changed it to let dart handle the cookie and the delay unloading is gone. I had it set the module-level dartstring variables to nothing in the form_unload event, but apparently that wasn't enough. I don't really care about who handles the cookie (I needed to be able to look at it for initial debugging, but not anymore), so this will work just fine. Thanks! |
Barbara Hamby From: Springfield, MO USA Posts: 11 Member Since: 10/04/02 |
posted October 14, 2002 5:03 PM Here's the code I used in your post sample to reproduce the delay unloading. Turns out it doesn't matter if it is ssl or not - either way it has the delay. I've also noticed that it delays unloading the first time it is run in the VB6 IDE but not on subsequent runs, but always delays if it is run as a built executable. Added to cmdPost_Click (first and last lines are same as original code): ' Set URL to test page on Dart's site Http1.Url = "http://www.dart.com/PostSample.asp" Http1.Cookies = False Set moHeaders = New DartStrings Set moRespHeaders = New DartStrings If Len(sCookie) > 0 Then moHeaders.Add "Cookie: " & sCookie End If ' Post the assembled string lblStatus.Caption = "Posting to Dart..." Http1.Post Data, moHeaders, Result, moRespHeaders For nCount = 1 To moRespHeaders.Count If Left$(moRespHeaders(nCount), 12) = "Set-Cookie: " Then ' save the cookie for later sCookie = Mid$(moRespHeaders(nCount), 13) End If Next ' Display results lblStatus.Caption = "Post successful!" Also need to add moHeaders and moRespHeaders as module-level private variables and local variables for sCookie and nCount. |
Reply | Return to search results | Forums |
This site is powered by
![]() |