Remove setting applicationName key and example (#4049)
Addresses #1870 Per @davidfowl: https://github.com/aspnet/Mvc/issues/6685#issuecomment-323599318pull/4056/head
parent
8fb7bedfce
commit
277b229961
|
@ -97,19 +97,10 @@ host.Run();
|
|||
|
||||
## Configuring a Host
|
||||
|
||||
The `WebHostBuilder` provides methods for setting most of the available configuration values for the host, which can also be set directly using `UseSetting` and associated key. For example, to specify the application name:
|
||||
|
||||
```csharp
|
||||
new WebHostBuilder()
|
||||
.UseSetting("applicationName", "MyApp")
|
||||
```
|
||||
The `WebHostBuilder` provides methods for setting most of the available configuration values for the host, which can also be set directly using `UseSetting` and associated key.
|
||||
|
||||
### Host Configuration Values
|
||||
|
||||
**Application Name** `string`
|
||||
|
||||
Key: `applicationName`. This configuration setting specifies the value that will be returned from `IHostingEnvironment.ApplicationName`.
|
||||
|
||||
**Capture Startup Errors** `bool`
|
||||
|
||||
Key: `captureStartupErrors`. Defaults to `false`. When `false`, errors during startup result in the host exiting. When `true`, the host will capture any exceptions from the `Startup` class and attempt to start the server. It will display an error page (generic, or detailed, based on the Detailed Errors setting, below) for every request. Set using the `CaptureStartupErrors` method.
|
||||
|
|
Loading…
Reference in New Issue