Static files in ASP.NET Core - static file handling in ASP.NET Core (link)

This article describes the Microsoft official website, static file in ASP.NET Core processing:

Static files in ASP.NET Core

 

Note that there are a few useful:

Use FileExtensionContentTypeProvider, define a static mapping from the file extension

Enable non-standard static file types , allows processing ASP.NET Core unknown static file types, but the article also mentioned that it is very dangerous, not recommended, recommended above FileExtensionContentTypeProvider to deal with non-standard static file types

 

Finally, the article also mentioned:

ASP.NET Core apps hosted in IIS use the ASP.NET Core Module to forward all requests to the app, including static file requests. The IIS static file handler isn't used. It has no chance to handle requests before they're handled by the module.

Thus, HTTP request static files in IIS, the ASP.NET Core Module will be forwarded to the ASP.NET Core applications are processed, and the handler is not associated with IIS.

 

Guess you like

Origin www.cnblogs.com/OpenCoder/p/12285908.html