Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
来自Azure function应用程序内部的X509Certificate2-无法识别提供给包的凭据_Azure_Ssl Certificate_X509certificate2 - Fatal编程技术网

来自Azure function应用程序内部的X509Certificate2-无法识别提供给包的凭据

来自Azure function应用程序内部的X509Certificate2-无法识别提供给包的凭据,azure,ssl-certificate,x509certificate2,Azure,Ssl Certificate,X509certificate2,我正在尝试从Azure function应用程序内部创建X509Certificate2。它在我自己的机器上运行良好,具有相同的证书 ver cert = new X509Certificate2(bytes, "passcode"); 但是,当在函数应用程序中运行时,会发生以下异常 System.Net.Http.ConnectHelper+<EstablishSslConnectionAsyncCore> System.ComponentModel.Win32Exception

我正在尝试从Azure function应用程序内部创建X509Certificate2。它在我自己的机器上运行良好,具有相同的证书

ver cert = new X509Certificate2(bytes, "passcode");
但是,当在函数应用程序中运行时,会发生以下异常

System.Net.Http.ConnectHelper+<EstablishSslConnectionAsyncCore>
System.ComponentModel.Win32Exception
The credentials supplied to the package were not recognized
System.Net.Http.ConnectHelper+
System.ComponentModel.Win32异常
无法识别提供给包的凭据

这是某种权限问题吗?没有证书存储

只是好奇,证书对象是否包含私钥?你能检查
X509Certificate2
对象的
HasPrivateKey
PrivateKey
属性吗?是的,它确实有私钥,那么远程方似乎不信任你的证书。我想问题是网站加载用户配置文件=1,即使证书是动态生成的,用户配置文件也需要加载,这与azure存在相同的问题。这个解决方案对你有用吗?