S
Susan
My windows application contains a browser, which is used
to browse to HTTPS sites. The Security Alert dialog comes
up stating that the name on the certificate doesn't match
the name of the site. I have implemented a
CertificatePolicy that accepts all certificates by always
returning true, but the browser is using or getting access
to this policy. The Security Alert is still appearing.
Code:
'My class to override the existing Certificate Policy
'Accepts all certificates
Public Class AcceptAllPolicy
Implements System.Net.ICertificatePolicy
Public Function CheckValidationResult(ByVal srvPoint _
As ServicePoint, ByVal cert As X509Certificate, ByVal _
request As WebRequest, ByVal certificateProblem As _
Integer) As Boolean Implements _
ICertificatePolicy.CheckValidationResult
Return True
End Function
End Class
'The axwebbrowser uses the navigate() or navigate2()
'method to access the site. I have implemented the
'following code when the site is to be navigated to
System.Net.ServicePointManager.CertificatePolicy = New
AcceptAllPolicy()
webBrowser.show()
webBrowser.navigate(<https site>)
Any ideas/help/comments/suggestions?
Thanks!!
to browse to HTTPS sites. The Security Alert dialog comes
up stating that the name on the certificate doesn't match
the name of the site. I have implemented a
CertificatePolicy that accepts all certificates by always
returning true, but the browser is using or getting access
to this policy. The Security Alert is still appearing.
Code:
'My class to override the existing Certificate Policy
'Accepts all certificates
Public Class AcceptAllPolicy
Implements System.Net.ICertificatePolicy
Public Function CheckValidationResult(ByVal srvPoint _
As ServicePoint, ByVal cert As X509Certificate, ByVal _
request As WebRequest, ByVal certificateProblem As _
Integer) As Boolean Implements _
ICertificatePolicy.CheckValidationResult
Return True
End Function
End Class
'The axwebbrowser uses the navigate() or navigate2()
'method to access the site. I have implemented the
'following code when the site is to be navigated to
System.Net.ServicePointManager.CertificatePolicy = New
AcceptAllPolicy()
webBrowser.show()
webBrowser.navigate(<https site>)
Any ideas/help/comments/suggestions?
Thanks!!