Does anyone know how to open up the “Certificate Information” screen based on the SSL from the WebBrowser control?
Does anyone know how to open up the Certificate Information screen based on the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This can be achieved by using a class called
X509Certificate2UI.To make this class avalable to you, you need to add a reference to
System.Security.dllIn the
X509Certificate2UIclass you have a meyhod calledDisplayCertificate()which takes anX509Certificate2object as a parameter. When invoked, this method shows a dialog box displaying all cert information including chaining, exactly the same as the dialog box you will find in IE.The webbrowser control can only return a
X509Certificatewhich can then be passed into the constructor of theX509Certificate2class.So the code looks as such: