Share via


ListenOptionsHttpsExtensions.UseHttps Method

Definition

Overloads

UseHttps(ListenOptions)

Configure Kestrel to use HTTPS with the default certificate if available. This will throw if no default certificate is configured.

UseHttps(ListenOptions, HttpsConnectionAdapterOptions)

Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>).

UseHttps(ListenOptions, TlsHandshakeCallbackOptions)

Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>).

UseHttps(ListenOptions, Action<HttpsConnectionAdapterOptions>)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, X509Certificate2)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, String)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, ServerOptionsSelectionCallback, Object)

Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>).

UseHttps(ListenOptions, StoreName, String)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, X509Certificate2, Action<HttpsConnectionAdapterOptions>)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, String, String)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, ServerOptionsSelectionCallback, Object, TimeSpan)

Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>).

UseHttps(ListenOptions, StoreName, String, Boolean)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, String, String, Action<HttpsConnectionAdapterOptions>)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation, Action<HttpsConnectionAdapterOptions>)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS with the default certificate if available. This will throw if no default certificate is configured.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ listenOptions);
public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions -> Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions
<Extension()>
Public Function UseHttps (listenOptions As ListenOptions) As ListenOptions

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, HttpsConnectionAdapterOptions)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>).

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

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

httpsOptions
HttpsConnectionAdapterOptions

Options to configure HTTPS.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, TlsHandshakeCallbackOptions)

Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>).

public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, Microsoft.AspNetCore.Server.Kestrel.Https.TlsHandshakeCallbackOptions callbackOptions);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions * Microsoft.AspNetCore.Server.Kestrel.Https.TlsHandshakeCallbackOptions -> Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions
<Extension()>
Public Function UseHttps (listenOptions As ListenOptions, callbackOptions As TlsHandshakeCallbackOptions) As ListenOptions

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

callbackOptions
TlsHandshakeCallbackOptions

Options for a per connection callback.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, Action<HttpsConnectionAdapterOptions>)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ listenOptions, Action<Microsoft::AspNetCore::Server::Kestrel::Https::HttpsConnectionAdapterOptions ^> ^ configureOptions);
public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, Action<Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions> configureOptions);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions * Action<Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions> -> Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions
<Extension()>
Public Function UseHttps (listenOptions As ListenOptions, configureOptions As Action(Of HttpsConnectionAdapterOptions)) As ListenOptions

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

configureOptions
Action<HttpsConnectionAdapterOptions>

An action to configure options for HTTPS.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, X509Certificate2)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS.

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

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

serverCertificate
X509Certificate2

The X.509 certificate.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, String)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS.

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

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

fileName
String

The name of a certificate file, relative to the directory that contains the application content files.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, ServerOptionsSelectionCallback, Object)

Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>).

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ listenOptions, System::Net::Security::ServerOptionsSelectionCallback ^ serverOptionsSelectionCallback, System::Object ^ state);
public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Net.Security.ServerOptionsSelectionCallback serverOptionsSelectionCallback, object state);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions * System.Net.Security.ServerOptionsSelectionCallback * obj -> Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions
<Extension()>
Public Function UseHttps (listenOptions As ListenOptions, serverOptionsSelectionCallback As ServerOptionsSelectionCallback, state As Object) As ListenOptions

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

serverOptionsSelectionCallback
ServerOptionsSelectionCallback

Callback to configure HTTPS options.

state
Object

State for the serverOptionsSelectionCallback.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, StoreName, String)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ listenOptions, System::Security::Cryptography::X509Certificates::StoreName storeName, System::String ^ subject);
public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Security.Cryptography.X509Certificates.StoreName storeName, string subject);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions * System.Security.Cryptography.X509Certificates.StoreName * string -> Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions
<Extension()>
Public Function UseHttps (listenOptions As ListenOptions, storeName As StoreName, subject As String) As ListenOptions

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

storeName
StoreName

The certificate store to load the certificate from.

subject
String

The subject name for the certificate to load.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, X509Certificate2, Action<HttpsConnectionAdapterOptions>)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ listenOptions, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ serverCertificate, Action<Microsoft::AspNetCore::Server::Kestrel::Https::HttpsConnectionAdapterOptions ^> ^ configureOptions);
public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Security.Cryptography.X509Certificates.X509Certificate2 serverCertificate, Action<Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions> configureOptions);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions * System.Security.Cryptography.X509Certificates.X509Certificate2 * Action<Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions> -> Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions
<Extension()>
Public Function UseHttps (listenOptions As ListenOptions, serverCertificate As X509Certificate2, configureOptions As Action(Of HttpsConnectionAdapterOptions)) As ListenOptions

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

serverCertificate
X509Certificate2

The X.509 certificate.

configureOptions
Action<HttpsConnectionAdapterOptions>

An Action to configure the HttpsConnectionAdapterOptions.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, String, String)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS.

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

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

fileName
String

The name of a certificate file, relative to the directory that contains the application content files.

password
String

The password required to access the X.509 certificate data.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, ServerOptionsSelectionCallback, Object, TimeSpan)

Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>).

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ listenOptions, System::Net::Security::ServerOptionsSelectionCallback ^ serverOptionsSelectionCallback, System::Object ^ state, TimeSpan handshakeTimeout);
public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Net.Security.ServerOptionsSelectionCallback serverOptionsSelectionCallback, object state, TimeSpan handshakeTimeout);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions * System.Net.Security.ServerOptionsSelectionCallback * obj * TimeSpan -> Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions
<Extension()>
Public Function UseHttps (listenOptions As ListenOptions, serverOptionsSelectionCallback As ServerOptionsSelectionCallback, state As Object, handshakeTimeout As TimeSpan) As ListenOptions

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

serverOptionsSelectionCallback
ServerOptionsSelectionCallback

Callback to configure HTTPS options.

state
Object

State for the serverOptionsSelectionCallback.

handshakeTimeout
TimeSpan

Specifies the maximum amount of time allowed for the TLS/SSL handshake. This must be positive and finite.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, StoreName, String, Boolean)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ listenOptions, System::Security::Cryptography::X509Certificates::StoreName storeName, System::String ^ subject, bool allowInvalid);
public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Security.Cryptography.X509Certificates.StoreName storeName, string subject, bool allowInvalid);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions * System.Security.Cryptography.X509Certificates.StoreName * string * bool -> Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions
<Extension()>
Public Function UseHttps (listenOptions As ListenOptions, storeName As StoreName, subject As String, allowInvalid As Boolean) As ListenOptions

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

storeName
StoreName

The certificate store to load the certificate from.

subject
String

The subject name for the certificate to load.

allowInvalid
Boolean

Indicates if invalid certificates should be considered, such as self-signed certificates.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, String, String, Action<HttpsConnectionAdapterOptions>)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ listenOptions, System::String ^ fileName, System::String ^ password, Action<Microsoft::AspNetCore::Server::Kestrel::Https::HttpsConnectionAdapterOptions ^> ^ configureOptions);
public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, string fileName, string password, Action<Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions> configureOptions);
public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, string fileName, string? password, Action<Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions> configureOptions);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions * string * string * Action<Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions> -> Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions
<Extension()>
Public Function UseHttps (listenOptions As ListenOptions, fileName As String, password As String, configureOptions As Action(Of HttpsConnectionAdapterOptions)) As ListenOptions

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

fileName
String

The name of a certificate file, relative to the directory that contains the application content files.

password
String

The password required to access the X.509 certificate data.

configureOptions
Action<HttpsConnectionAdapterOptions>

An Action to configure the HttpsConnectionAdapterOptions.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ listenOptions, System::Security::Cryptography::X509Certificates::StoreName storeName, System::String ^ subject, bool allowInvalid, System::Security::Cryptography::X509Certificates::StoreLocation location);
public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Security.Cryptography.X509Certificates.StoreName storeName, string subject, bool allowInvalid, System.Security.Cryptography.X509Certificates.StoreLocation location);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions * System.Security.Cryptography.X509Certificates.StoreName * string * bool * System.Security.Cryptography.X509Certificates.StoreLocation -> Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions
<Extension()>
Public Function UseHttps (listenOptions As ListenOptions, storeName As StoreName, subject As String, allowInvalid As Boolean, location As StoreLocation) As ListenOptions

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

storeName
StoreName

The certificate store to load the certificate from.

subject
String

The subject name for the certificate to load.

allowInvalid
Boolean

Indicates if invalid certificates should be considered, such as self-signed certificates.

location
StoreLocation

The store location to load the certificate from.

Returns

The ListenOptions.

Applies to

UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation, Action<HttpsConnectionAdapterOptions>)

Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs
Source:
ListenOptionsHttpsExtensions.cs

Configure Kestrel to use HTTPS.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ UseHttps(Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^ listenOptions, System::Security::Cryptography::X509Certificates::StoreName storeName, System::String ^ subject, bool allowInvalid, System::Security::Cryptography::X509Certificates::StoreLocation location, Action<Microsoft::AspNetCore::Server::Kestrel::Https::HttpsConnectionAdapterOptions ^> ^ configureOptions);
public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps (this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Security.Cryptography.X509Certificates.StoreName storeName, string subject, bool allowInvalid, System.Security.Cryptography.X509Certificates.StoreLocation location, Action<Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions> configureOptions);
static member UseHttps : Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions * System.Security.Cryptography.X509Certificates.StoreName * string * bool * System.Security.Cryptography.X509Certificates.StoreLocation * Action<Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions> -> Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions
<Extension()>
Public Function UseHttps (listenOptions As ListenOptions, storeName As StoreName, subject As String, allowInvalid As Boolean, location As StoreLocation, configureOptions As Action(Of HttpsConnectionAdapterOptions)) As ListenOptions

Parameters

listenOptions
ListenOptions

The ListenOptions to configure.

storeName
StoreName

The certificate store to load the certificate from.

subject
String

The subject name for the certificate to load.

allowInvalid
Boolean

Indicates if invalid certificates should be considered, such as self-signed certificates.

location
StoreLocation

The store location to load the certificate from.

configureOptions
Action<HttpsConnectionAdapterOptions>

An Action to configure the HttpsConnectionAdapterOptions.

Returns

The ListenOptions.

Applies to