Groups | Blog | Home
all groups > asp.net > april 2006 >

asp.net : Accessing classic ASP page that returns xml


Mike Hanson
4/25/2006 11:13:02 PM
I am working on a web app that needs to get xml data from a classic ASP
application hosted on a remote server.

If I reference the url with IE, the xml is displayed correctly and formatted
using the default style sheet, so we know the page is working for a standard
browser request.

However if I access the page using either XmlDocument.Load() or and
HttpWebRequest I get an "Internal Server Error 500"

The following should work as far as I can tell from documentation and samples

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("http://server/pag.asp");

But the second line results in the exception. The stack trace shows that
the Load method has used an HttpWebRequest and throws the exception at the
point where GetResponse() is called. Which is the same point the exception
is thrown if I use the HttpWebRequest directly.

Greg Young [MVP]
4/26/2006 12:00:00 AM
What is the actual exception being thrown?

Cheers,

Greg
[quoted text, click to view]

AddThis Social Bookmark Button