The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.


I´m using XMLHttp in an asp page to fetch other pages. There´s no problem when using GET to get the pages but when I try to use POST I always get this error:

msxml3.dll error '800401e4'

Invalid syntax

The line it points to is the objXMLHttp.Send strPostdata

strPostData is something like this: user=foo&password=bar

Anyone know what this problem could be? I´ve already googled this and all I found was a description of an error that is because of a # character in an account password but I don´t use NT passwords and there are no # characters. Oh and this is XMLHttp.3.0, I tried doing 2.0 and 4.0 but 3.0 is the only one that seems to work on this particular server I´m doing this on.

Any suggestions?

Function PostHTML(strURL, strPostData)

  Set objXMLHttp = Server.CreateObject("Microsoft.XMLHTTP")
  objXMLHttp.Open "POST", strURL, False
  objXMLHttp.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"

  objXMLHttp.Send strPostData

  PostHTML = objXMLHttp.ResponseText
End Function
Thursday, July 07, 2005
Your xmlHttp POST code is correct.

What version of MSXML3.DLL are you using?

There was a bug in Microsoft XML Parser 3.0 Service Pack 1 which caused an unhandled exception in response to an xmlHttp request:;EN-US;q295431
Thursday, July 07, 2005
Well, found something that said I should use Server.CreateObject("MSXML2.ServerXMLHTTP") instead because this is being done serverside. I did that and now I get this error:

msxml3.dll error '80004005'

Unspecified error

this is pointing to the line

objXMLHttp.Open "POST", strURL, False

Here´s what microsoft says about this problem:

When you send a POST request by using ServerXMLHTTP, and the response from an HTTP/1.1 server does not contain a Connection header, and the HTTP/1.1 server keeps the connection alive after it delivers a response to an HTTP request, ServerXMLHTTP may stop responding (hang) until the timeout expires, and you may receive the following error message.

The only resolution they offer is to contact Microsoft Support. I don´t control the server I´m doing this on which is a bit of a problem. Anyone know how to get around this stuff? GET still works absolutely fine.
Thursday, July 07, 2005
thanks boozah. That also looks like it might be the problem. However my problem is that I don´t control the server and getting the admins to install any kind of patch or service pack is likely to take a long time :S. Anyone know of a way to get around this or whether this is more likely to be boozah's error or the one I pointed out in my second post.

Thanks in advance :)
Thursday, July 07, 2005
ah well, my own error, fixed it. :) Wrong url being given to the function.
Friday, July 08, 2005

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz