IWebHostBuilder Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A builder for IWebHost.
public interface class IWebHostBuilder
public interface IWebHostBuilder
type IWebHostBuilder = interface
Public Interface IWebHostBuilder
- Derived
Methods
| Name | Description |
|---|---|
| Build() |
Obsolete.
Builds an IWebHost which hosts a web application. |
| ConfigureAppConfiguration(Action<WebHostBuilderContext,IConfigurationBuilder>) |
Adds a delegate for configuring the IConfigurationBuilder that will construct an IConfiguration. |
| ConfigureLogging(Action<ILoggerFactory>) |
Adds a delegate for configuring the provided ILoggerFactory. This may be called multiple times. |
| ConfigureServices(Action<IServiceCollection>) |
Adds a delegate for configuring additional services for the host or web application. This may be called multiple times. |
| ConfigureServices(Action<WebHostBuilderContext,IServiceCollection>) |
Adds a delegate for configuring additional services for the host or web application. This may be called multiple times. |
| GetSetting(String) |
Get the setting value from the configuration. |
| UseLoggerFactory(ILoggerFactory) |
Specify the ILoggerFactory to be used by the web host. |
| UseSetting(String, String) |
Add or replace a setting in the configuration. |
Extension Methods
| Name | Description |
|---|---|
| UseAzureAppServices(IWebHostBuilder) |
Configures application to use Azure AppServices integration. |
| CaptureStartupErrors(IWebHostBuilder, Boolean) |
Set whether startup errors should be captured in the configuration settings of the web host. When enabled, startup exceptions will be caught and an error page will be returned. If disabled, startup exceptions will be propagated. |
| PreferHostingUrls(IWebHostBuilder, Boolean) |
Indicate whether the host should listen on the URLs configured on the IWebHostBuilder instead of those configured on the IServer. |
| Start(IWebHostBuilder, String[]) |
Start the web host and listen on the specified urls. |
| SuppressStatusMessages(IWebHostBuilder, Boolean) |
Specify if startup status messages should be suppressed. |
| UseConfiguration(IWebHostBuilder, IConfiguration) |
Use the given configuration settings on the web host. |
| UseContentRoot(IWebHostBuilder, String) |
Specify the content root directory to be used by the web host. |