Discussion:
Timeout problem with MSXML/ServerXMLHTTP
(too old to reply)
o***@gmx.de
2005-05-10 09:17:03 UTC
Permalink
Hi,

we are using an external web service from a partner company for the
first time. We use the ServerXMLHTTP object from the MS XML Parser V4.0
on WinXP SP-1 to send and receive XML via HTTPS.

The problem with the WS is, that the first request times out every day,
most other requests get a response within 3-10 seconds.

Initially we set the timeout values for resolve/connect/send/receive to
2000/2000/5000/30000. To know how long the first request really takes
we changed this to 2000/2000/0/0 as the documentation states that a
timeout value of 0 means "forever". But insteaf of receiving a correct
reponse after we then get an ActiveX error "12152: The server returned
an invalid or unrecognized response" after about 73sec. So there are
some other settings that prevent us from timing the response time for
the first request.

So the question is:
which other settings do we have to change so that we can time the
response?

TIA,
Stefan
Stephen Sulzer
2005-05-11 02:40:43 UTC
Permalink
You should use the WinHTTP Tracing Facility to see what kind of response the
server is sending back for the first request. The "invalid or unrecognized
response" is likely caused by a malformed response from the server--perhaps
as simple as a missing CR-LF character pair. Or possibly the server is
abruptly closing the socket connection before sending back all the response
data that ServerXMLHTTP expects (as indicated by the Content-Length header).

See the following KB article about using the tracing feature:
http://support.microsoft.com/default.aspx?scid=kb;en-us;307272

Hope that helps.

- Stephen
Stefan Misch
2005-05-13 09:05:39 UTC
Permalink
Stephen,

thanks for answering and your tip about using the trace tool. As we are
accessing the web service via HTTPS I'm not sure if the trace tool is much
help, but I will give it a try.

Thanks,
Stefan
Stefan
2005-05-17 07:48:28 UTC
Permalink
Stephen,

either I'm missunderstanding the information about how to use the
WinHTTP trace tool or there is something other wrong as I do not get
traced anything. The documentation states that I should restart IIS
once I configured the trace options. But there is no IIS on my machine.
Remember that I'm using the ServerXMLHTTP object as an ActiveX-object
from within a 4GL client application. Also, there is a proxy server
involved (don't know if that is important). I created a simple testcase
to access a WS from xmethods to see if the tracing works. I get a valid
response from the WS, but nothing is traced.

I would appreciate if you can help me.
TIA,
Stefan
Stephen Sulzer
2005-05-18 01:28:25 UTC
Permalink
Hi Stefan,

What trace config settings are reported when you run the winhttptracecfg.exe
tool without any parameters?

There are a couple things to be aware of when using the WinHTTP tracing
facility:

After running winhttptracecfg.exe (or using the serverXMLHTTPTrace.htm web
page), you must restart the application that is using ServerXMLHTTP/WinHttp.
If you were using ServerXMLHTTP from within an ASP application, for
instance, then that would mean restarting IIS. ServerXMLHTTP/WinHttp checks
the trace config settings only once when the first instance of ServerXMLHTTP
is created within the process.

Also, by default, the trace file will be stored in the application's working
directory, so you need to know the location of that. (You can override the
location of the trace output file by setting the Log Path/Prefix option.)
The name of the trace file will have a .LOG extension and should contain the
name of the executable and date & timestamp for when the process was
started.

Finally, be sure that you are using the ServerXMLHTTP component from MSXML
4.0 and not MSXML 3.0. ServerXMLHTTP in MSXML 3 does not support tracing,
unless you have MSXML 3 SP4 or later I think.

The fact that the request is going via an HTTP proxy server is not an issue.

If you are still having trouble, then let's try a simple VBScript-based test
app. With WinHTTP tracing enabled (and no Log Path/Prefix setting), create
and run the following test.vbs script in a C:\Test directory:

set http = CreateObject("Msxml2.ServerXMLHTTP.4.0")
http.open "GET", "http://www.microsoft.com/default.htm", False
http.send
WScript.Echo http.status

After running the script--which should output "200" if it runs
successfully--there should be a .LOG file in the directory. Does that work
for you?

Hope that helps.

Regards,
Stephen
Stefan
2005-05-18 09:48:34 UTC
Permalink
Stephen,

arghh - I always tried to enable tracing using the
serverXMLHTTPTrace.htm web page. With winhttptracecfg.exe, I got an
access denied error because I was not allowed to change the appropriate
registry settings. Now that the company's network admin changed my
profile I was able to get a trace.

Sorry and thanks again for your detailed answer!
Stefan

Loading...