共用方式為


WebHostBuilderIISExtensions.UseIIS(IWebHostBuilder) 方法

定義

設定伺服器在 AspNetCoreModule 後方執行時應該接聽的埠和基底路徑。 應用程式也會設定為擷取啟動錯誤。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseIIS(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseIIS (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder);
static member UseIIS : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseIIS (hostBuilder As IWebHostBuilder) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 IWebHostBuilder

傳回

IWebHostBuilder

適用於