TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Tom
date: 2004-11-28 00:21:00
subject: VB.NET SSL Invalid Cert P

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.Create("https://10.4.4.4/cgi-bin/notice/notice.html")

If Err.Number  0 Then
 Console.WriteLine("Error: " & Err.Number & " "
& Err.Description)
 Err.Clear()
End If

Dim myResponse As WebResponse = myRequest.GetResponse()

If Err.Number  0 Then
 Console.WriteLine("Error: " & Err.Number & " "
& Err.Description)
 Err.Clear()
End If


Dim strm As Stream = myResponse.GetResponseStream()


Dim sr As StreamReader = New StreamReader(strm)
Dim sText As String = sr.ReadToEnd()

Console.WriteLine(sText)


myResponse.Close()


strm.Close()
myResponse = Nothing
strm = Nothing
sr = Nothing



Thanks in advance!

Tom



SearchString:  BlueRhinoDance
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com

---
 * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
 * RgateImp.MoonDog.BBS at 11/28/04 12:21:19 AM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270 5030/786
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.