-
Simply serve static files (html, css, images, etc).
There are two static files being served in this project, index.html and hello.css. They are stored under
wwwrootfolder, which is the default folder location for this library.To access them you have to refer them directly e.g.
localhost:5000/index.htmlandlocalhost:5000/hello.css. -
Allow listing and browsing of your
wwwrootfolder. -
Combines the functionality of
UseStaticFiles, UseDefaultFiles, and UseDirectoryBrowser. -
Customize the way Directory Browsing is displayed. In this sample the custom view only handles flat directory. We will deal with more complex scenario in the next sample.
-
Custom Directory Formatter - 2
Show custom Directory Browsing and handle directory listing as well as files.
-
Use Directory Browsing on a certain path using
DirectoryBrowserOptions.RequestPath, e.g./browse. -
Serve Static Files from more than one folders
This example shows how to serve static files from multiple directories (even outside your application path).
-
Physical File Provider - Content and Web roots
Access the file information on your Web and Content roots.
-
Implement a simple and largely nonsense file provider. It is a good starting point to implement your own proper File Provider.
-
Log information about the static file being served.
dotnet8