Class HostBuilderExtensions
public static class HostBuilderExtensions
- Inheritance
-
HostBuilderExtensions
- Inherited Members
Fields
DEFAULT_URL
public const string DEFAULT_URL = "http://*:8080"
Field Value
Methods
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 WebHostBuilder
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 HostBuilder, 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(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 HostBuilder
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 HostBuilder, 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