Bagikan melalui


FileServerExtensions.UseFileServer Metode

Definisi

Overload

UseFileServer(IApplicationBuilder)

Aktifkan semua middleware file statis (kecuali penjelajahan direktori) untuk jalur permintaan saat ini di direktori saat ini.

UseFileServer(IApplicationBuilder, FileServerOptions)

Aktifkan semua middleware file statis dengan opsi yang diberikan

UseFileServer(IApplicationBuilder, Boolean)

Aktifkan semua middleware file statis untuk jalur permintaan saat ini di direktori saat ini.

UseFileServer(IApplicationBuilder, String)

Mengaktifkan semua middleware file statis (kecuali penjelajahan direktori) untuk jalur permintaan yang diberikan dari direktori dengan nama yang sama

UseFileServer(IApplicationBuilder)

Sumber:
FileServerExtensions.cs
Sumber:
FileServerExtensions.cs
Sumber:
FileServerExtensions.cs

Aktifkan semua middleware file statis (kecuali penjelajahan direktori) untuk jalur permintaan saat ini di direktori saat ini.

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

Parameter

Mengembalikan

Keterangan

File disajikan dari jalur yang ditentukan di WebRootPath atau WebRootFileProvider default ke subfolder 'wwwroot'.

Berlaku untuk

UseFileServer(IApplicationBuilder, FileServerOptions)

Sumber:
FileServerExtensions.cs
Sumber:
FileServerExtensions.cs
Sumber:
FileServerExtensions.cs

Aktifkan semua middleware file statis dengan opsi yang diberikan

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

Parameter

Mengembalikan

Berlaku untuk

UseFileServer(IApplicationBuilder, Boolean)

Sumber:
FileServerExtensions.cs
Sumber:
FileServerExtensions.cs
Sumber:
FileServerExtensions.cs

Aktifkan semua middleware file statis untuk jalur permintaan saat ini di direktori saat ini.

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

Parameter

enableDirectoryBrowsing
Boolean

Haruskah penjelajahan direktori diaktifkan?

Mengembalikan

Keterangan

File disajikan dari jalur yang ditentukan di WebRootPath atau WebRootFileProvider default ke subfolder 'wwwroot'.

Berlaku untuk

UseFileServer(IApplicationBuilder, String)

Sumber:
FileServerExtensions.cs
Sumber:
FileServerExtensions.cs
Sumber:
FileServerExtensions.cs

Mengaktifkan semua middleware file statis (kecuali penjelajahan direktori) untuk jalur permintaan yang diberikan dari direktori dengan nama yang sama

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

Parameter

requestPath
String

Jalur permintaan relatif.

Mengembalikan

Keterangan

File disajikan dari jalur yang ditentukan di WebRootPath atau WebRootFileProvider default ke subfolder 'wwwroot'.

Berlaku untuk