找不到请求的对象-System.Security.Cryptography.X509Certificates

时间:2019-05-17 09:22:31

标签: cryptography azure-functions x509certificate2

我的代码是:

var query = System.Web.HttpUtility.ParseQueryString(req.RequestUri.Query);
string certificate = = query.Get("issuerCertificate");
byte[] bytes = Encoding.ASCII.GetBytes(certificate);
X509Certificate2 cer = new X509Certificate2(bytes);

预先感谢

1 个答案:

答案 0 :(得分:0)

从查询字符串参数发送证书时,在某些空格之间的证书内部。所以我通过添加application / json删除空格。现在我的证书运行正常。