Hello,
I am running into a roadblock with an app I am writing to pull
an HTML doc from a SSL secured internal website. My app works fine
to sites with valid certs, but dies to my internal site. The internal site
has
a OpenSSL generated cert but the issuer is unknown. I expect this to be
always be the case. My problem is that I cannot seem to find a way to
tell VB.NET to ignore the cert's status. I have found some examples for
prior versions of VB, but that doesn't help much. Any input would be
greatly appreciated!!
Sample Code:
On Error Resume Next
Dim myRequest As WebRequest =
WebRequest.Crea te("https://10.4.4.4/cgi-bin/notice/notice.html")
If Err.Number <> 0 Then
Console.WriteLi ne("Error: " & Err.Number & " " & Err.Description )
Err.Clear()
End If
Dim myResponse As WebResponse = myRequest.GetRe sponse()
If Err.Number <> 0 Then
Console.WriteLi ne("Error: " & Err.Number & " " & Err.Description )
Err.Clear()
End If
Dim strm As Stream = myResponse.GetR esponseStream()
Dim sr As StreamReader = New StreamReader(st rm)
Dim sText As String = sr.ReadToEnd()
Console.WriteLi ne(sText)
myResponse.Clos e()
strm.Close()
myResponse = Nothing
strm = Nothing
sr = Nothing
Thanks in advance!
Tom
SearchString: BlueRhinoDance
I am running into a roadblock with an app I am writing to pull
an HTML doc from a SSL secured internal website. My app works fine
to sites with valid certs, but dies to my internal site. The internal site
has
a OpenSSL generated cert but the issuer is unknown. I expect this to be
always be the case. My problem is that I cannot seem to find a way to
tell VB.NET to ignore the cert's status. I have found some examples for
prior versions of VB, but that doesn't help much. Any input would be
greatly appreciated!!
Sample Code:
On Error Resume Next
Dim myRequest As WebRequest =
WebRequest.Crea te("https://10.4.4.4/cgi-bin/notice/notice.html")
If Err.Number <> 0 Then
Console.WriteLi ne("Error: " & Err.Number & " " & Err.Description )
Err.Clear()
End If
Dim myResponse As WebResponse = myRequest.GetRe sponse()
If Err.Number <> 0 Then
Console.WriteLi ne("Error: " & Err.Number & " " & Err.Description )
Err.Clear()
End If
Dim strm As Stream = myResponse.GetR esponseStream()
Dim sr As StreamReader = New StreamReader(st rm)
Dim sText As String = sr.ReadToEnd()
Console.WriteLi ne(sText)
myResponse.Clos e()
strm.Close()
myResponse = Nothing
strm = Nothing
sr = Nothing
Thanks in advance!
Tom
SearchString: BlueRhinoDance