Friday, March 14, 2008


I don't get to dabble in classic ASP much anymore, which is ok with me, but for the first time in years I had to debug some ASP code this morning to figure out an error for someone who is consuming one of our webservices.

The code was as simple as this:

Set MyXmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP") "get", "", False
MyXmlHttp.setRequestHeader "Content-Type", "text/xml"
XmlData = MyXmlHttp.responseText

The error was:

HTTP Error 403.1 - Forbidden: Execute access is denied

Can you spot the problem? "GET", "", False

It might not be obvious what I changed, but simply changing the method from "get" to "GET" fixed the problem.

I wondered if this was a bug but this MSDN article seems to confirm that the method is case-sensitive and must be in UPPER case.

"The HTTP method used to open the connection, such as PUT or PROPFIND. For ServerXMLHTTP, this parameter is case-sensitive and the method name must be entered in all upper-case letters."