title: Can I use an X509Certificate2 within ASP.NET without using a certificate store?
body: <p>I am trying to use an X509Certificate within an ASP.NET web service within the Rackspace Cloud.  I have a feeling the certificate stores on the cloud nodes maybe causing problems.  I also have a question related to this with the exception that I am receiving at <a href="https://stackoverflow.com/questions/2094735/sslstream-authenticateasclient-exception-when-using-iphone-apple-push-notificatio">SslStream.AuthenticateAsClient Exception when using iPhone Apple Push Notification Provider (apns-sharp) C#</a></p>
  
  <p>Within the apns-sharp project I was using the following code:</p>
  
  <pre><code>certificate = new X509Certificate2(p12File)
  </code></pre>
  
  <p>However I received an exception and changing the code to the following resolved the X509Certificate2 exception.  The new code is as follows:</p>
  
  <pre><code>certificate = new X509Certificate2(p12File, String.Empty, X509KeyStorageFlags.MachineKeySet);
  </code></pre>
  
  <p>I would like to know if I can use an X509Certificate2 within ASP.NET without using a certificate store?  Would the certificate stores be causing problems with the Rackspace Cloud nodes?</p>
  
  <p><strong>Update #1</strong>  Rackspace tell me that access to the Local Machine Certificate store is not permitted.  Is there any other way to bypass using the certificate store?  Maybe using a third party library?</p>