title: Why am I getting "Invalid algorithm specified" exception
body: <p>Here is my code.            </p>
  
  <pre><code>X509Certificate pXCert = new X509Certificate2(@"keyStore.p12", "password");
  RSACryptoServiceProvider csp = (RSACryptoServiceProvider)pXCert.PrivateKey;
  string id = CryptoConfig.MapNameToOID("SHA256");
  return csp.SignData(File.ReadAllBytes(filePath), id);
  </code></pre>
  
  <p>On the last line I'm getting the exception:</p>
  
  <blockquote>
    <p>System.Security.Cryptography.CryptographicException "Invalid algorithm specified."</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>
  
  <p>UPDATE:</p>
  
  <p>id = 2.16.840.1.101.3.4.2.1</p>