当前位置:网站首页>. 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 :
边栏推荐
猜你喜欢

This article introduces you to the characteristics, purposes and basic function examples of static routing

Please answer the questions about database data transfer

2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第二阶段答案

使用TCP/IP四层模型进行网络传输的基本流程

「运维有小邓」符合GDPR的合规要求

MOS tube parameters μ A method of Cox

DHCP路由器工作原理

场馆怎么做体育培训?

SolidWorks的GB库(钢型材库,包括铝型材、铝管等结构)安装及使用教程(生成铝型材为例)

化工园区危化品企业安全风险智能化管控平台建设四大目标
随机推荐
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第一阶段答案
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第二阶段答案
7天零基础能考证HCIA吗?华为认证系统学习路线分享
关于数据库数据转移的问题,求各位解答下
Redhat5 installing vmware tools under virtual machine
How can flinksql calculate the difference between a field before and after update when docking with CDC?
联合索引ABC的几种索引利用情况
MySQL (x)
服装门店如何盈利?
Abnova循环肿瘤DNA丨全血分离,基因组DNA萃取分析
MYSQL binlog相关命令
「运维有小邓」符合GDPR的合规要求
Abnova 免疫组化服务解决方案
ANR 原理及实践
What books can greatly improve programming ideas and abilities?
JESD204B时钟网络
Networkx绘图和常用库函数坐标绘图
网络基础 —— 报头、封装和解包
The startup of MySQL installed in RPM mode of Linux system failed
Get the city according to IP
https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/static-files?view=aspnetcore-5.0