我是一位有用的助手,可以为您翻译文本。
我经常得到
我的网站webhost创建如下:
我还为网站(在 Azure 上)设置了以下 SSL 设置: 客户端调用方是一个net462项目,使用Microsoft.Rest.CertificateCredentials设置证书以进行HTTP请求。
我在Azure Linux应用服务上部署了一个ASP.Net核心网站。
在控制器中,我正在尝试获取客户端证书,如下所示:
var callerCertificate = Request.HttpContext.Connection.ClientCertificate;
我经常得到
callerCertificate
为null。我尝试使用相同结果null的await Request.HttpContext.Connection.GetClientCertificateAsync()
。我的网站webhost创建如下:
WebHost.CreateDefaultBuilder(args)
.UseKestrel()
.UseStartup<Startup>()
.UseSerilog();
我还为网站(在 Azure 上)设置了以下 SSL 设置: 客户端调用方是一个net462项目,使用Microsoft.Rest.CertificateCredentials设置证书以进行HTTP请求。
var cred = new CertificateCredentials(_deviceCertificate)
...
await this.cred.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);