Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb_dotnet thread: Receiving XML over HTTPS


Message #1 by "Guy Harwood" <guy@h...> on Fri, 6 Dec 2002 17:10:05
One of our clients has a web page (written in PHP) on their server that 
returns an xml document.  It uses SSL and is accessed by using a URL 
with 'https://mywebserver.com/xml/doc.php?region=Anglia'

I am using the XMLTextReader class to try and get hold of the XML like 
so...

Dim xmlRdr As New Xml.XmlTextReader("https://mywebserver.com/xml/doc.php?
region=Anglia")
        xmlRdr.Read()
        Console.Write(xmlRdr.ReadInnerXml)
        Console.ReadLine()

When i run the app i get the following...

An unhandled exception of type 'System.Net.WebException' occurred in 
system.xml.dll

Additional information: The underlying connection was closed: Could not 
establish trust relationship with remote server.

If i browse the page with IE i can get it providing i accept the 
certificate dialog.  How can i get past this issue with .NET?

Am i using the right tools for the job?

Any help would be greatly appreciated.

Thanks

  Return to Index