当前位置:网站首页>. Net core accesses uncommon static file types (MIME types)
. Net core accesses uncommon static file types (MIME types)
2022-07-07 07:00:00 【Pingshan CP3】
background : Need to be in .net core The access suffix in the website is properties The file of , Discover direct access 404, After consulting colleagues , It needs to be configured .net core Support for accessing static file types , Make a note of
var provider = new FileExtensionContentTypeProvider();
// Add new mappings, take properties The file is mapped to text/html
provider.Mappings[".properties"] = "text/html";
app.UseStaticFiles(new StaticFileOptions
{
ContentTypeProvider = provider
});
Official documents about the configuration of static files :
边栏推荐
- Stack and queue-p78-8 [2011 unified examination true question]
- Get the city according to IP
- SolidWorks GB Library (steel profile library, including aluminum profile, aluminum tube and other structures) installation and use tutorial (generating aluminum profile as an example)
- MySql用户权限
- ANR 原理及实践
- 多学科融合
- 2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第一阶段答案
- 【mysqld】Can't create/write to file
- MATLAB小技巧(29)多项式拟合 plotfit
- Config distributed configuration center
猜你喜欢
随机推荐
Matlab tips (29) polynomial fitting plotfit
隐马尔科夫模型(HMM)学习笔记
LVS+Keepalived(DR模式)学习笔记
MySQL user permissions
Prompt for channel security on the super-v / device defender side when installing vmmare
Please tell me how to monitor multiple schemas and tables by listening to PgSQL
JDBC database connection pool usage problem
数据资产管理与数据安全国内外最新趋势
.net 5 FluentFTP连接FTP失败问题:This operation is only allowed using a successfully authenticated context
from .onnxruntime_pybind11_state import * # noqa ddddocr运行报错
【mysqld】Can't create/write to file
根据IP获取地市
中英文说明书丨ProSci LAG-3 重组蛋白
Maze games based on JS
Performance comparison between Ceres solver and g2o
LM11丨重构K线构建择时交易策略
How to share the same storage among multiple kubernetes clusters
MYSQL binlog相关命令
企业如何进行数据治理?分享数据治理4个方面的经验总结
CompletableFuture使用详解