Discussion:
Timeout on POST with MSXML 4.0 ServerXMLHTTP
(too old to reply)
Marja Ribbers-de Vroed
2006-01-20 20:20:29 UTC
Permalink
I'm trying to get a classic ASP application to pass some XML data to another server. For that purpose I use the MSXML4 ServerXMLHTTP object, but the send method is raising a timeout error: "msxml4.dll error '80072ee2' The operation timed out"

My code is:
Set l_oXmlHttp = Server.Createobject("MSXML2.ServerXMLHTTP.4.0")
l_oXmlHttp.open "POST", l_sXmlInterfaceUrl, False
l_oXmlHttp.setRequestHeader "Content-type", "text/xml"
l_oXmlHttp.send s_oXML.xml


The company that owns the server that I'm trying to post to is not very helpful and they keep suggesting that the problem is on my side.

But as a test I've tried to post to some other URL (one that I borrowed from an example that I found), and then the send method does not result in an timeout. In that case I correctly get a response status of 200.

Can this timeout be caused by something on my end (e.g. some IIS setting)?
Or is this likely to be a problem of the receiving server?
--
Marja
Brian Staff
2006-01-20 22:15:06 UTC
Permalink
Server-side ASP scripts typically time-out after 90 seconds - look in IIS
properties for your own Virtual Directory timeout setting.

It could be that your server is timing out while waiting for a reply from the
3rd party server.

As an aside, try sending the XML object instead of the XML string...

oXmlHttp.send s oXML

hmmm! I'm not sure what that "s" is doing there? it should be:

oXmlHttp.send oXML

Brian
Martin Honnen
2006-01-21 12:07:45 UTC
Permalink
Post by Marja Ribbers-de Vroed
I'm trying to get a classic ASP application to pass some XML data to
another server. For that purpose I use the MSXML4 ServerXMLHTTP
object, but the send method is raising a timeout error: "msxml4.dll
error '80072ee2' The operation timed out"
My code is: Set l_oXmlHttp =
Server.Createobject("MSXML2.ServerXMLHTTP.4.0") l_oXmlHttp.open
"POST", l_sXmlInterfaceUrl, False l_oXmlHttp.setRequestHeader
"Content-type", "text/xml" l_oXmlHttp.send s_oXML.xml
As you are using ServerXMLHTTP you can set/change the timeouts with
setTimeouts, see
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/7e91f3de-d21c-404d-966a-95c148b22e98.asp>
Call that method before the open method.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Marja Ribbers-de Vroed
2006-01-21 14:30:17 UTC
Permalink
Post by Martin Honnen
Post by Marja Ribbers-de Vroed
I'm trying to get a classic ASP application to pass some XML data to
another server. For that purpose I use the MSXML4 ServerXMLHTTP
object, but the send method is raising a timeout error: "msxml4.dll
error '80072ee2' The operation timed out"
My code is: Set l_oXmlHttp =
Server.Createobject("MSXML2.ServerXMLHTTP.4.0") l_oXmlHttp.open
"POST", l_sXmlInterfaceUrl, False l_oXmlHttp.setRequestHeader
"Content-type", "text/xml" l_oXmlHttp.send s_oXML.xml
As you are using ServerXMLHTTP you can set/change the timeouts with
setTimeouts, see
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/7e91f3de-d21c-404d-966a-95c148b22e98.asp>
Call that method before the open method.
The syntax to set the timeouts is:
oServerXMLHTTPRequest.setTimeouts(resolveTimeout, connectTimeout,
sendTimeout, receiveTimeout)The default values for those 4 arguments (infinite, 60s, 30s, and 30s respectively) seem quite reasonable, so I wonder why those would need to be changed.Is there a way to find out which one of those 4 is the culprit in the timeout I'm receiving?--Marja
Martin Honnen
2006-01-21 18:25:31 UTC
Permalink
Post by Marja Ribbers-de Vroed
Is there a way to find
out which one of those 4 is the culprit in the timeout I'm
receiving?
Well putting that call into your code and experimenting with the
parameters should tell you. I don't think anyone here can do or guess
that for you.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
zuhair
2006-12-18 11:50:39 UTC
Permalink
I'm trying to get a classic ASP application to pass some XML data to =
another server. For that purpose I use the MSXML4 ServerXMLHTTP object, =
but the send method is raising a timeout error: "msxml4.dll error =
"80072ee2" The operation timed out"
Set l_oXmlHttp =3D Server.Createobject("MSXML2.ServerXMLHTTP.4.0")
l_oXmlHttp.open "POST", l_sXmlInterfaceUrl, False
l_oXmlHttp.setRequestHeader "Content-type", "text/xml"
l_oXmlHttp.send s_oXML.xml
The company that owns the server that I'm trying to post to is not very =
helpful and they keep suggesting that the problem is on my side.
But as a test I've tried to post to some other URL (one that I borrowed =
from an example that I found), and then the send method does not result =
in an timeout. In that case I correctly get a response status of 200.
Can this timeout be caused by something on my end (e.g. some IIS =
setting)?=20
Or is this likely to be a problem of the receiving server?
--=20
Marja
Hi ,
I am also facing the timeout error. I read somewhere that giving timeout = 0 will mean infinite time out so i have done that but still its giving me operation timed out error. can any one tell me where i am doing wrong

Dim objXMLHTTP As ServerXMLHTTP40
Set objXMLHTTP = New ServerXMLHTTP40

objXMLHTTP.setTimeouts 0, 0, 0, 0
objXMLHTTP.Open "GET", strURL, False
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objXMLHTTP.setProxyCredentials txtDomain.Text & "/" & txtUserName.Text, txtPassword.Text
objXMLHTTP.send



BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Umut Alev [MSFT]
2006-12-28 06:43:50 UTC
Permalink
Zuhair / Marja
Have you tried the use Msxml6 to see if this problem repros there too. You
can get the msxml6 from

http://www.microsoft.com/downloads/details.aspx?familyid=993c0bcf-3bcf-4009-be21-27e85e1857b1&displaylang=en

All you have to change here is change the "MSXML2.ServerXMLHTTP.4.0" to
"MSXML2.ServerXMLHTTP.6.0" to use the msxml6.

Also if that does not work try the "Winhttp.WinhttpRequest.5.1" as your
progid to see if that helps.

Cheers and a Happy New Year,
- Umut Alev [MSFT]
Post by zuhair
I'm trying to get a classic ASP application to pass some XML data to =
another server. For that purpose I use the MSXML4 ServerXMLHTTP object, =
but the send method is raising a timeout error: "msxml4.dll error =
"80072ee2" The operation timed out"
Set l_oXmlHttp =3D Server.Createobject("MSXML2.ServerXMLHTTP.4.0")
l_oXmlHttp.open "POST", l_sXmlInterfaceUrl, False
l_oXmlHttp.setRequestHeader "Content-type", "text/xml"
l_oXmlHttp.send s_oXML.xml
The company that owns the server that I'm trying to post to is not very =
helpful and they keep suggesting that the problem is on my side.
But as a test I've tried to post to some other URL (one that I borrowed =
from an example that I found), and then the send method does not result =
in an timeout. In that case I correctly get a response status of 200.
Can this timeout be caused by something on my end (e.g. some IIS =
setting)?=20
Or is this likely to be a problem of the receiving server?
--=20
Marja
Hi ,
I am also facing the timeout error. I read somewhere that giving timeout =
0 will mean infinite time out so i have done that but still its giving me
operation timed out error. can any one tell me where i am doing wrong
Dim objXMLHTTP As ServerXMLHTTP40
Set objXMLHTTP = New ServerXMLHTTP40
objXMLHTTP.setTimeouts 0, 0, 0, 0
objXMLHTTP.Open "GET", strURL, False
objXMLHTTP.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"
objXMLHTTP.setProxyCredentials txtDomain.Text & "/" & txtUserName.Text, txtPassword.Text
objXMLHTTP.send
BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Loading...