469,326 Members | 1,224 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,326 developers. It's quick & easy.

how to debug a server program

I have a testing client program, the purpose is send a xml file to a server
program, and the server return another xml message. So I wrote a testing
server program the simple one and make sure the communication is fine. After
that I started to program more complicated server program, since there are
many compliation error. The client program keep displaying:
The remote server returned an invalid statuscode: #8221;500 Internal Server
Error

Is there any way to display a detailed error message about the server
program in the web browser? So I can quickly debugging it and fix it, not to
have to waiting for an email from the program?

Thanks.

<%
Set xmlDom=CreateObject("Microsoft.XMLDOM")

XMLDom.async =False
xmlDom.load Server.MapPath("0925SelectTest.xml")
DataToSend = xmlDom.xml

dim xmlhttp
set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST","https://xxxx.com/TestCompleteB2B.asp",false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send xmlDom.xml
if(Err <0) then
Response.Write("An error occured when retrieving data from an external
source.<br />")
Response.Write(Err.Description)
Response.End
end if
On error goto 0
'if request is not Ok then display detailed message about the request
problem
if(xmlHttp.status <200) then
Response.Write("The remote server returned an invalid statuscode: #8221;"
& _
xmlHttp.status & " " & xmlHttp.statusText)
Response.End
end if

'
--
Betty
Oct 29 '07 #1
0 1356

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Kay Levein | last post: by
10 posts views Thread by Scott | last post: by
3 posts views Thread by Meatball.Li | last post: by
8 posts views Thread by | last post: by
3 posts views Thread by fripper | last post: by
10 posts views Thread by Brett | last post: by
46 posts views Thread by Ian Boyd | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.