Dela via


DefaultFilesExtensions.UseDefaultFiles Method

Definition

Overloads

UseDefaultFiles(IApplicationBuilder)

Enables default file mapping on the current path

UseDefaultFiles(IApplicationBuilder, DefaultFilesOptions)

Enables default file mapping with the given options

UseDefaultFiles(IApplicationBuilder, String)

Enables default file mapping for the given request path

UseDefaultFiles(IApplicationBuilder)

Source:
DefaultFilesExtensions.cs
Source:
DefaultFilesExtensions.cs
Source:
DefaultFilesExtensions.cs

Enables default file mapping on the current path

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

Parameters

Returns

Remarks

Files are served from the path specified in WebRootPath or WebRootFileProvider which defaults to the 'wwwroot' subfolder.

Applies to

UseDefaultFiles(IApplicationBuilder, DefaultFilesOptions)

Source:
DefaultFilesExtensions.cs
Source:
DefaultFilesExtensions.cs
Source:
DefaultFilesExtensions.cs

Enables default file mapping with the given options

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

Parameters

Returns

Applies to

UseDefaultFiles(IApplicationBuilder, String)

Source:
DefaultFilesExtensions.cs
Source:
DefaultFilesExtensions.cs
Source:
DefaultFilesExtensions.cs

Enables default file mapping for the given request path

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

Parameters

requestPath
String

The relative request path.

Returns

Remarks

Files are served from the path specified in WebRootPath or WebRootFileProvider which defaults to the 'wwwroot' subfolder.

Applies to