This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void FromFile() | |
{ | |
// You have to use certificate.p12 or certificate.pfx that contains private key. These extensions represent PKCS#12 standard. There can also be whole certificate chain included in these files | |
var certificatefilePath = "CertificateFile.pfx"; | |
var certpwd = "password"; | |
var URL = "Host_URL"; | |
X509Certificate cert = new X509Certificate(certificatefilePath,certpwd); | |
var webrequest = WebRequest.Create(URL) as HttpWebRequest; |
NewerOlder