FileServerExtensions.UseFileServer FileServerExtensions.UseFileServer FileServerExtensions.UseFileServer Method

Definition

Overloads

UseFileServer(IApplicationBuilder) UseFileServer(IApplicationBuilder) UseFileServer(IApplicationBuilder)

Enable all static file middleware (except directory browsing) for the current request path in the current directory.

UseFileServer(IApplicationBuilder, FileServerOptions) UseFileServer(IApplicationBuilder, FileServerOptions) UseFileServer(IApplicationBuilder, FileServerOptions)

Enable all static file middleware with the given options

UseFileServer(IApplicationBuilder, Boolean) UseFileServer(IApplicationBuilder, Boolean) UseFileServer(IApplicationBuilder, Boolean)

Enable all static file middleware on for the current request path in the current directory.

UseFileServer(IApplicationBuilder, String) UseFileServer(IApplicationBuilder, String) UseFileServer(IApplicationBuilder, String)

Enables all static file middleware (except directory browsing) for the given request path from the directory of the same name

UseFileServer(IApplicationBuilder) UseFileServer(IApplicationBuilder) UseFileServer(IApplicationBuilder)

Enable all static file middleware (except directory browsing) for the current request path in the current directory.

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
Parameters
Returns

UseFileServer(IApplicationBuilder, FileServerOptions) UseFileServer(IApplicationBuilder, FileServerOptions) UseFileServer(IApplicationBuilder, FileServerOptions)

Enable all static file middleware with the given 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
Parameters
Returns

UseFileServer(IApplicationBuilder, Boolean) UseFileServer(IApplicationBuilder, Boolean) UseFileServer(IApplicationBuilder, Boolean)

Enable all static file middleware on for the current request path in the current directory.

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
Parameters
enableDirectoryBrowsing
Boolean Boolean Boolean

Should directory browsing be enabled?

Returns

UseFileServer(IApplicationBuilder, String) UseFileServer(IApplicationBuilder, String) UseFileServer(IApplicationBuilder, String)

Enables all static file middleware (except directory browsing) for the given request path from the directory of the same name

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
Parameters
requestPath
String String String

The relative request path.

Returns

Applies to