DefaultFilesMiddleware.Invoke(HttpContext) Method

Definition

This examines the request to see if it matches a configured directory, and if there are any files with the configured default names in that directory. If so this will append the corresponding file name to the request path for a later middleware to handle.

C#
public System.Threading.Tasks.Task Invoke (Microsoft.AspNetCore.Http.HttpContext context);

Parameters

context
HttpContext

Returns

Applies to

Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0