KestrelServerOptionsHttpsExtensions.UseHttps 方法

定义

重载

UseHttps(KestrelServerOptions, HttpsConnectionFilterOptions)

将 Kestrel 配置为使用 HTTPS。

UseHttps(KestrelServerOptions, X509Certificate2)

将 Kestrel 配置为使用 HTTPS。

UseHttps(KestrelServerOptions, String)

将 Kestrel 配置为使用 HTTPS。

UseHttps(KestrelServerOptions, String, String)

将 Kestrel 配置为使用 HTTPS。

UseHttps(KestrelServerOptions, HttpsConnectionFilterOptions)

将 Kestrel 配置为使用 HTTPS。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::KestrelServerOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::KestrelServerOptions ^ options, Microsoft::AspNetCore::Server::Kestrel::Https::HttpsConnectionFilterOptions ^ httpsOptions);
public static Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions options, Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionFilterOptions httpsOptions);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions * Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionFilterOptions -> Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions
<Extension()>
Public Function UseHttps (options As KestrelServerOptions, httpsOptions As HttpsConnectionFilterOptions) As KestrelServerOptions

参数

options
KestrelServerOptions

要配置的 Microsoft.AspNetCore.Server.KestrelServerOptions。

httpsOptions
HttpsConnectionFilterOptions

用于配置 HTTPS 的选项。

返回

Microsoft.AspNetCore.Server.KestrelServerOptions。

适用于

UseHttps(KestrelServerOptions, X509Certificate2)

将 Kestrel 配置为使用 HTTPS。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::KestrelServerOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::KestrelServerOptions ^ options, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ serverCertificate);
public static Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions options, System.Security.Cryptography.X509Certificates.X509Certificate2 serverCertificate);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions * System.Security.Cryptography.X509Certificates.X509Certificate2 -> Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions
<Extension()>
Public Function UseHttps (options As KestrelServerOptions, serverCertificate As X509Certificate2) As KestrelServerOptions

参数

options
KestrelServerOptions

要配置的 Microsoft.AspNetCore.Server.KestrelServerOptions。

serverCertificate
X509Certificate2

X.509 证书。

返回

Microsoft.AspNetCore.Server.KestrelServerOptions。

适用于

UseHttps(KestrelServerOptions, String)

将 Kestrel 配置为使用 HTTPS。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::KestrelServerOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::KestrelServerOptions ^ options, System::String ^ fileName);
public static Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions options, string fileName);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions * string -> Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions
<Extension()>
Public Function UseHttps (options As KestrelServerOptions, fileName As String) As KestrelServerOptions

参数

options
KestrelServerOptions

要配置的 Microsoft.AspNetCore.Server.KestrelServerOptions。

fileName
String

相对于包含应用程序内容文件的目录的证书文件的名称。

返回

Microsoft.AspNetCore.Server.KestrelServerOptions。

适用于

UseHttps(KestrelServerOptions, String, String)

将 Kestrel 配置为使用 HTTPS。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::KestrelServerOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::KestrelServerOptions ^ options, System::String ^ fileName, System::String ^ password);
public static Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions options, string fileName, string password);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions * string * string -> Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions
<Extension()>
Public Function UseHttps (options As KestrelServerOptions, fileName As String, password As String) As KestrelServerOptions

参数

options
KestrelServerOptions

要配置的 Microsoft.AspNetCore.Server.KestrelServerOptions。

fileName
String

相对于包含应用程序内容文件的目录的证书文件的名称。

password
String

访问 X.509 证书数据所需的密码。

返回

Microsoft.AspNetCore.Server.KestrelServerOptions。

适用于