Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vb.net - can't use https protocol to retrieve web page

Status
Not open for further replies.

cmitzel

Programmer
Mar 8, 2002
7
0
0
US
I am trying to access a web page with the https protocol.

Here's my code:
Code:
Dim http As System.Net.HttpWebRequest
Dim strm As System.IO.Stream

http = System.Net.HttpWebRequest.Create("[URL unfurl="true"]https://secure.website.com")[/URL]

strm = http.GetResponse.GetResponseStream

And here's the message I get:
[tt]
The underlying connection was closed: Could not establish trust relationship with remote server.[/tt]

This code works with the http protocol. It only gives me this error when trying to use https.

Thanx in advance for any help.
Chris
 
That feature (so I've heard) is forthcoming in v1.1 of the Framework. But for the 1.0 Framework (which is what we all have), you can't use the httpWebRequest object to open a https connection (that would require something like a httpsWebRequest object).

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top