HostingAbstractionsWebHostBuilderExtensions.PreferHostingUrls Method
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.
Indicate whether the host should listen on the URLs configured on the IWebHostBuilder instead of those configured on the IServer.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ PreferHostingUrls(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, bool preferHostingUrls);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder PreferHostingUrls (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, bool preferHostingUrls);
static member PreferHostingUrls : Microsoft.AspNetCore.Hosting.IWebHostBuilder * bool -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function PreferHostingUrls (hostBuilder As IWebHostBuilder, preferHostingUrls As Boolean) As IWebHostBuilder
Parameters
- hostBuilder
- IWebHostBuilder
The IWebHostBuilder to configure.
- preferHostingUrls
- Boolean
true
to prefer URLs configured on the IWebHostBuilder; otherwise false
.
Returns
The IWebHostBuilder.