ASP XML ResponseText has 403 Error

Posted on 2005-04-20
Medium Priority
Last Modified: 2008-01-09
Hi, I am sending XML data in ASP to another client's asp page. I keep getting 403 forbidden error (page can not be displayed) in the Response String. But when I go back and try again some time 4 Times, I then get a successful Response Status of 200.

My IIS does not have any ISAPI Filters to be executed. Is this error the clients IIS error of my IIS error?

This is the responseText:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">  <HTML><HEAD><TITLE>The page cannot be displayed</TITLE>  <META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">  <STYLE type="text/css">    BODY { font: 8pt/12pt verdana }    H1 { font: 13pt/15pt verdana }    H2 { font: 8pt/12pt verdana }    A:link { color: red }    A:visited { color: maroon }  </STYLE>  </HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>    <h1>The page cannot be displayed</h1>  You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.  <hr>  <p>Please try the following:</p>  <ul>  <li>Contact the Web site administrator if you believe this directory should allow execute access.</li>  </ul>  <h2>HTTP Error 403.1 - Forbidden: Execute access is denied.<br>Internet Information Services (IIS)</h2>  <hr>  <p>Technical Information (for support personnel)</p>  <ul>  <li>Go to <a href="http://go.microsoft.com/fwlink/?linkid=8180">Microsoft Product Support Services</a> and perform a title search for the words <b>HTTP</b> and <b>403</b>.</li>  <li>Open <b>IIS Help</b>, which is accessible in IIS Manager (inetmgr),   and search for topics titled <b>Configuring ISAPI Extensions</b>, <b>Configuring CGI Applications</b>, <b>Securing Your Site with Web Site Permissions</b>, and <b>About Custom Error Messages</b>.</li>  <li>In the IIS Software Development Kit (SDK) or at the <a href="http://go.microsoft.com/fwlink/?LinkId=8181">MSDN Online Library</a>, search for topics titled <b>Developing ISAPI Extensions</b>, <b>ISAPI and CGI</b>, and <b>Debugging ISAPI Extensions and Filters</b>.</li>  </ul>    </TD></TR></TABLE></BODY></HTML>  
Question by:edanladi
  • 3
  • 3
LVL 27

Expert Comment

ID: 13832387
If I remember correctly it is necessary in ASP to use the correct XML HTTP object so that the request gets sent properly. Can you post your ASP code which does the request to the other machine?

Author Comment

ID: 13834864
'Post Data
P_URL = "http://dt.test.testing.com/testingdata.asp"
Set XMLPost = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
XMLPost.Open "Post", P_URL
XMLPost.send pXMLStream

'Get Response
Set XMLResp = Server.CreateObject("Msxml2.DOMDocument")
XMLResp.async = false
Set XMLResp = XMLPost.responseXML

Author Comment

ID: 13835016
Actually I use this to get the xml string for storing in the database:

pXMLResponse = ""
c = 0
Do While pXMLResponse = ""
      c = c + 1
      pXMLResponse = XMLPost.responseText

Response.Write (XMLPost.Status) 'gives me 403
Response.Write(pXMLResponse) 'Give me the erroe message included in my question above (the response text: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" .......)
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 13837155
Set XMLPost = Server.CreateObject("Microsoft.XMLHTTP" )
XMLPost.Open "Post", P_URL
GETHTTP = XMLPost.Responsetext
End Function


icerik = GETHTTP(URL)
LVL 27

Expert Comment

ID: 13857249
First the "POST" string on the open command suggests that you are going to post some data with the send command, which is what you don't do. It would look like :-

   Set datatopost = "parameter=" + escape(Value)

If no data is to be send I'd use the "GET" method.

Secondly the XMLPost.responseXML property is an XML DOM so you don't need to use the text property. One simply checks for parser error (XMLPost.responseXML.ParserError.errorCode) and uses the XML property to get the text ready to store away or whatever (XMLPost.responseXML.xml)

Thirdly I'd replace version 3.0 with version 4.0 (or leave it out) when creating the server http object.

Author Comment

ID: 13870410
This is getting more complicated than I thought. All I am asking for is when I get a Post.Status of 400,500,600 etc a status that is not 200-->an OK post...whose HTTP/Server is to be checked at as the source of the problem?

our servers or the clients? When we get the Post.Status <> "200", our servers are always running smoothly but I am not sure if our internet servers are to be blamed for a Post.Status that is not 200. We are sending a post to another client's URL and so is the POST.Status based on the clients HTTP problem or our problem?

LVL 27

Accepted Solution

BigRat earned 1000 total points
ID: 13884162
>>...whose HTTP/Server is to be checked at as the source of the problem?

There are two aspects of this. First the reponse of 403 might be real - you might need to authenticate. Since you say "but I am not sure if our internet servers are to be blamed" I'm assuming that the request you are making is going wrong. Hence my first and third points.

Because of the way IIS works any HTTP requests made out of it cannot use the WinINet control - hence this "ServerXMLHTTP" control. There have been problems with this thing which is why I suggested using the latest version.

My second point was simply to save code and time.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Simple Linear Regression
Starting up a Project

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question