# Static files
1. By default, an asp.net core application will not serve static files
2. The default directory for static files is wwwroot and this directory must be in the root project folder
2. Middleware which serves static files
// Add Static Files Middleware
app.UseStaticFiles();
## Serving Default document
1. // Add Default Files Middleware
app.UseDefaultFiles();
2. The following are the default files which UseDefaultFiles middleware looks for
index.htm
index.html
default.htm
default.html
## Directory Browsing middleware
1. DirectoryBrowser middleware, enables directory browsing and allows users to see files within a specified directory.
Tuesday, 22 March 2022
Static Files
Subscribe to:
Post Comments (Atom)
Search This Blog
Creating your first "Alexa" Skill
Index What is Alexa What is Alexa Skill? Why is it required when Alexa already equipped with voice assistant? Dev...
About Me
Menu
-
Index What is Alexa What is Alexa Skill? Why is it required when Alexa already equipped with voice assistant? Dev...
-
Adding Azure AD B2C to React Native App Register your app in Azure active directory 1. Go to azure ad b2c, app registratio...
-
# Project file 1. .net Core project file no longer contains file or folder reference - all files and folder present within the root fol...
No comments:
Post a Comment