共用方式為


DefaultFilesExtensions.UseDefaultFiles 方法

定義

多載

UseDefaultFiles(IApplicationBuilder)

啟用目前路徑上的預設檔案對應

UseDefaultFiles(IApplicationBuilder, DefaultFilesOptions)

使用給定的選項啟用預設檔案對應

UseDefaultFiles(IApplicationBuilder, String)

啟用指定要求路徑的預設檔案對應

UseDefaultFiles(IApplicationBuilder)

來源:
DefaultFilesExtensions.cs
來源:
DefaultFilesExtensions.cs
來源:
DefaultFilesExtensions.cs

啟用目前路徑上的預設檔案對應

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDefaultFiles(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDefaultFiles (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseDefaultFiles : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseDefaultFiles (app As IApplicationBuilder) As IApplicationBuilder

參數

傳回

備註

檔案會從 中指定的 WebRootPath 路徑提供,或 WebRootFileProvider 預設為 'wwwroot' 子資料夾。

適用於

UseDefaultFiles(IApplicationBuilder, DefaultFilesOptions)

來源:
DefaultFilesExtensions.cs
來源:
DefaultFilesExtensions.cs
來源:
DefaultFilesExtensions.cs

使用給定的選項啟用預設檔案對應

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDefaultFiles(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::DefaultFilesOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDefaultFiles (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.DefaultFilesOptions options);
static member UseDefaultFiles : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.DefaultFilesOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseDefaultFiles (app As IApplicationBuilder, options As DefaultFilesOptions) As IApplicationBuilder

參數

傳回

適用於

UseDefaultFiles(IApplicationBuilder, String)

來源:
DefaultFilesExtensions.cs
來源:
DefaultFilesExtensions.cs
來源:
DefaultFilesExtensions.cs

啟用指定要求路徑的預設檔案對應

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDefaultFiles(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, System::String ^ requestPath);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDefaultFiles (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string requestPath);
static member UseDefaultFiles : Microsoft.AspNetCore.Builder.IApplicationBuilder * string -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseDefaultFiles (app As IApplicationBuilder, requestPath As String) As IApplicationBuilder

參數

requestPath
String

相對要求路徑。

傳回

備註

檔案會從 中指定的 WebRootPath 路徑提供,或 WebRootFileProvider 預設為 'wwwroot' 子資料夾。

適用於