Yannick Turgeon
2006-01-13 22:16:36 UTC
Hello all,
To make a very long story short when I call function InternetReadFile,
it hangs and never return (not in less than 25 minutes thought).
BUT, my situation is a bit special I think. We are currently using
vbXMLRPC.dll in a client (say "ClientA") to communicate with a python
home-made server application (say "ServerA"). It works great. Now, I
have to build another VB application (say "ClientB") to communicate
with another python home-made server (say "ServerB") using vbXMLRPC.dll
too. But ServerB uses SSL. vbXMLRPC.dll actually has this feature.
Here is some facts concerning my situation:
- ServerA (HTTP) works fine with ClientA (vbXMLRPC.dll).
- ServerA (HTTP) works fine too with a PHP client (PHP XML-RPC module).
- ServerB (HTTPS) works fine with a python client (python xmlrpclib).
- ServerB (HTTPS) hangs forever with ClientB (vbXMLRPC.dll).
- Both server use XML-RPC protocol.
- ServerA runs on a W2K server.
- ServerB runs on a Linux server.
I've found on the net some code to test the wininet.dll used by
vbXMLRPC.dll. It appears that I've got the same problem using the
wininet.dll directly (bypassing vbXMLRPC.dll). (full code I used can be
viewed here: http://docvb.free.fr/apidetail.php?idapi=208 (see exemple
near middle of the page)).
The part where it hangs is:
-------------------------------------
Do While blDoLoop
stRead = vbNullString
blDoLoop = InternetReadFile(hRequest, stRead, Len(stRead),
lgRead) ' <--- *** here ***
stLoad = stLoad & Left$(stRead, lgRead)
If Not CBool(lgRead) Then blDoLoop = False
Loop
-------------------------------------
What else? Humm... Oh, I tried to contact the ServerB using IE, Firefox
(calling a page page which returne a 501 error as expected) and
ClientB: All three hang, never reaching the EOF but Firefox prints what
it received: the 501 web page. IE and ClientB don't... till I kill
ServerB.
Looking at ServerB log, I can see that the SSL negotiation is correctly
done. Then the server send the answer (501 error)... and hangs on its
side too. So both server and client are hanging. I kill the server: the
client returns the output. It looks like the socket is nerver closed.
Client CPU is not active so it's not related to KB263754 (
http://support.microsoft.com/?scid=kb%3Ben-us%3B263754&x=10&y=9 ).
Anyway, I tried the proposed solution without success.
So, my question is: Anybody know the reason, has a solution to solve
this problem?
Thanks a lot for your time.
Yannick
To make a very long story short when I call function InternetReadFile,
it hangs and never return (not in less than 25 minutes thought).
BUT, my situation is a bit special I think. We are currently using
vbXMLRPC.dll in a client (say "ClientA") to communicate with a python
home-made server application (say "ServerA"). It works great. Now, I
have to build another VB application (say "ClientB") to communicate
with another python home-made server (say "ServerB") using vbXMLRPC.dll
too. But ServerB uses SSL. vbXMLRPC.dll actually has this feature.
Here is some facts concerning my situation:
- ServerA (HTTP) works fine with ClientA (vbXMLRPC.dll).
- ServerA (HTTP) works fine too with a PHP client (PHP XML-RPC module).
- ServerB (HTTPS) works fine with a python client (python xmlrpclib).
- ServerB (HTTPS) hangs forever with ClientB (vbXMLRPC.dll).
- Both server use XML-RPC protocol.
- ServerA runs on a W2K server.
- ServerB runs on a Linux server.
I've found on the net some code to test the wininet.dll used by
vbXMLRPC.dll. It appears that I've got the same problem using the
wininet.dll directly (bypassing vbXMLRPC.dll). (full code I used can be
viewed here: http://docvb.free.fr/apidetail.php?idapi=208 (see exemple
near middle of the page)).
The part where it hangs is:
-------------------------------------
Do While blDoLoop
stRead = vbNullString
blDoLoop = InternetReadFile(hRequest, stRead, Len(stRead),
lgRead) ' <--- *** here ***
stLoad = stLoad & Left$(stRead, lgRead)
If Not CBool(lgRead) Then blDoLoop = False
Loop
-------------------------------------
What else? Humm... Oh, I tried to contact the ServerB using IE, Firefox
(calling a page page which returne a 501 error as expected) and
ClientB: All three hang, never reaching the EOF but Firefox prints what
it received: the 501 web page. IE and ClientB don't... till I kill
ServerB.
Looking at ServerB log, I can see that the SSL negotiation is correctly
done. Then the server send the answer (501 error)... and hangs on its
side too. So both server and client are hanging. I kill the server: the
client returns the output. It looks like the socket is nerver closed.
Client CPU is not active so it's not related to KB263754 (
http://support.microsoft.com/?scid=kb%3Ben-us%3B263754&x=10&y=9 ).
Anyway, I tried the proposed solution without success.
So, my question is: Anybody know the reason, has a solution to solve
this problem?
Thanks a lot for your time.
Yannick