hi...
i am to create a certificate for my webservice programatically and need to add it with my webservice.
i am trying this code.
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; public <span style="color:Blue; void CreateCertificateForCrackerJack()
{
X509Certificate2 certFile = <span style="color:Blue; new X509Certificate2(<span style="color:#A31515; "CN = XMLDSIG_Test");
certFile.FriendlyName = <span style="color:#A31515; "My Certificate";
X509Store store = <span style="color:Blue; new X509Store(StoreName.My, StoreLocation.LocalMachine);
<span style="color:Green; // or StoreName.Root and/or StoreLocation.CurrentUser
store.Open(OpenFlags.ReadWrite); <span style="color:Green; //OpenFlags.OpenExistingOnly | OpenFlags.ReadWrite);
store.Add(certFile);
store.Close();
}
[/code]
kindly suggest me. <hr class="sig maifs
View the full article
i am to create a certificate for my webservice programatically and need to add it with my webservice.
i am trying this code.
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; public <span style="color:Blue; void CreateCertificateForCrackerJack()
{
X509Certificate2 certFile = <span style="color:Blue; new X509Certificate2(<span style="color:#A31515; "CN = XMLDSIG_Test");
certFile.FriendlyName = <span style="color:#A31515; "My Certificate";
X509Store store = <span style="color:Blue; new X509Store(StoreName.My, StoreLocation.LocalMachine);
<span style="color:Green; // or StoreName.Root and/or StoreLocation.CurrentUser
store.Open(OpenFlags.ReadWrite); <span style="color:Green; //OpenFlags.OpenExistingOnly | OpenFlags.ReadWrite);
store.Add(certFile);
store.Close();
}
[/code]
kindly suggest me. <hr class="sig maifs
View the full article