Class HostBuilderExtensions
[Obsolete("This feature will be removed in the next major version. See https://steeltoe.io/docs/v3/obsolete for details.")]
public static class HostBuilderExtensions
- Inheritance
-
HostBuilderExtensions
- Inherited Members
Fields
DEFAULT_URL
public const string DEFAULT_URL = "http://*:8080"
Field Value
Methods
UseCloudHosting(WebApplicationBuilder, int?, int?)
Configure the application to listen on port(s) provided by the environment at runtime. Defaults to port 8080.
public static WebApplicationBuilder UseCloudHosting(this WebApplicationBuilder webApplicationBuilder, int? runLocalHttpPort = null, int? runLocalHttpsPort = null)
Parameters
webApplicationBuilderWebApplicationBuilderrunLocalHttpPortint?Set the Http port number with code so you don't need to set environment variables locally
runLocalHttpsPortint?Set the Https port number with code so you don't need to set environment variables locally
Returns
- WebApplicationBuilder
Your WebApplicationBuilder, now listening on port(s) found in the environment or passed in
Remarks
runLocalPort parameter will not be used if an environment variable PORT is found
THIS EXTENSION IS NOT COMPATIBLE WITH IIS EXPRESS
UseCloudHosting(IWebHostBuilder, int?, int?)
Configure the application to listen on port(s) provided by the environment at runtime. Defaults to port 8080.
public static IWebHostBuilder UseCloudHosting(this IWebHostBuilder webHostBuilder, int? runLocalHttpPort = null, int? runLocalHttpsPort = null)
Parameters
webHostBuilderIWebHostBuilderYour IWebHostBuilder
runLocalHttpPortint?Set the Http port number with code so you don't need to set environment variables locally
runLocalHttpsPortint?Set the Https port number with code so you don't need to set environment variables locally
Returns
- IWebHostBuilder
Your IWebHostBuilder, now listening on port(s) found in the environment or passed in
Remarks
runLocalPort parameter will not be used if an environment variable PORT is found
UseCloudHosting(IHostBuilder, int?, int?)
Configure the application to listen on port(s) provided by the environment at runtime. Defaults to port 8080.
public static IHostBuilder UseCloudHosting(this IHostBuilder hostBuilder, int? runLocalHttpPort = null, int? runLocalHttpsPort = null)
Parameters
hostBuilderIHostBuilderYour IHostBuilder
runLocalHttpPortint?Set the Http port number with code so you don't need to set environment variables locally
runLocalHttpsPortint?Set the Https port number with code so you don't need to set environment variables locally
Returns
- IHostBuilder
Your IHostBuilder, now listening on port(s) found in the environment or passed in
Remarks
runLocalPort parameter will not be used if an environment variable PORT is found
THIS EXTENSION IS NOT COMPATIBLE WITH IIS EXPRESS