Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: HTTP.post causes an App. Error with a Timeout > 0
Alexandre Archambault

From: Montréal, QC Canada
Posts: 49
Member Since: 02/27/01
posted April 23, 2001 5:03 PM

 I am trying to use HTTP.Post with a timeout of 0, if I do this I have an Application Error.
 If I put a Timeout of 1 or greater there's no Application Error.

 Anyone have an idea of what to do?

 Thanks
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 23, 2001 5:07 PM


Do the sample apps have the same problem?

Please tell me exactly how to duplicate the behavior with the sample apps.

Thanks,

Tony Priest
Dart Tech Support
Alexandre Archambault

From: Montréal, QC Canada
Posts: 49
Member Since: 02/27/01
posted April 24, 2001 10:55 AM

I cannot reproduce the problem in the Sample apps.
 I've even created a small DLL that essentially is a smaller replica of the more complex DLL where the problem is occuring and I'm unable to reproduce this problem in the new DLL.

 But the original problem persists in the more complex DLL.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 24, 2001 10:58 AM


Sounds like you're getting close to a solution. Keep adding stuff to the working DLL until you find the cause.

Tony
Alexandre Archambault

From: Montréal, QC Canada
Posts: 49
Member Since: 02/27/01
posted April 24, 2001 2:42 PM

 I still haven't found why I'm having this problem, this is what I've done to date. Maybe it'll give someone an idea.

 I've removed everything that is not being used for the POST in the DLL that isn't working.
 I've removed all library references that I did not need to perform a POST with the HTTP control.

 And it still generates an Application Error. It works fine if I put a TIMEOUT higher than 0 and it also works if I put a break point right after the post.
 When I have the break point the code and when I press F5 to resume the code, the post works fine?!

 The Application Error is happening in both Design and Run Time.

 I thought that maybe the problem was in the EXE that was calling the DLL, so I wrote a simple (real simple) EXE but the problem persists and the AE is being generated in the DLL and not the calling EXE.

 Thanks
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 24, 2001 2:47 PM


Are you aware that when timeout is set to 0, you are operating asychnchronously? Perhaps you are making another call to the control before the first one has completed? I'm curious, if it works when timeout is greater than 0, why don't you just set the timeout to a working value?

Hope this helps!

Tony Priest
Dart Tech Support
Alexandre Archambault

From: Montréal, QC Canada
Posts: 49
Member Since: 02/27/01
posted April 24, 2001 3:27 PM

Yes I am aware that a timeout of 0 is async, personnaly I would be happy to put a timeout but the DLL has to be async.

OK I've isolated the problem, it's a weird one (imo).
This is a generic DLL that has several of the DART controls in it and depending on what your doing different DART controls are being accessed.

I'm casting different DART object to a single type Object (Dim objDart as Object).
Well up to now this has worked fine with all the Dart Controls.
What I decided to do was change the definition of my object just for my test, instead of having objDart as Object I changed it to objDart as Dartweb.http

And the Application Error disappeared.

  Here's an example of what I was doing (if my explination wasn't clear)

  Old code:
   Private objDart as Object
   Private DartFTP as DartFTP.FTP
   Private DartHTTP as DartWeb.HTTP
   etc...

   Set DartHTTP = New DartWeb.HTTP
   set objDart = DartHTTP

   ...
   objDart.Post

  New Code:
   Private DartHTTP as DartWeb.HTTP

   Set DartHTTP = New DartWeb.HTTP
   ...
   DartHTTP.Post

  The new code works fine.
Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX