当前位置:网站首页>. 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 :
边栏推荐
猜你喜欢
场馆怎么做体育培训?
品牌电商如何逆势增长?在这里预见未来!
LVS+Keepalived(DR模式)学习笔记
.net 5 FluentFTP连接FTP失败问题:This operation is only allowed using a successfully authenticated context
Pinduoduo lost the lawsuit: "bargain for free" infringed the right to know but did not constitute fraud, and was sentenced to pay 400 yuan
The latest trends of data asset management and data security at home and abroad
This article introduces you to the characteristics, purposes and basic function examples of static routing
大咖云集|NextArch基金会云开发Meetup来啦
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第二阶段答案
Config distributed configuration center
随机推荐
JWT的基础介绍
华为机试题素数伴侣
.net core 访问不常见的静态文件类型(MIME 类型)
化工园区危化品企业安全风险智能化管控平台建设四大目标
unity3d学习笔记
途家、木鸟、美团……民宿暑期战事将起
Config分布式配置中心
Prime partner of Huawei machine test questions
How can gyms improve their competitiveness?
from .onnxruntime_pybind11_state import * # noqa ddddocr运行报错
Initial experience of addresssanitizer Technology
MySQL user permissions
循环肿瘤细胞——Abnova 解决方案来啦
【NOI模拟赛】区域划分(结论,构造)
Config distributed configuration center
BindingException 异常(报错)处理
场馆怎么做体育培训?
ip地址那点事
Problems and precautions about using data pumps (expdp, impdp) to export and import large capacity tables in Oracle migration
Please tell me how to monitor multiple schemas and tables by listening to PgSQL