进入系统目录
%windir%\System32\inetsrv\config\
编辑IIS配置文件
applicationHost.config
找到如下行
<requestFiltering>
<fileExtensions allowUnlisted="true" applyToWebDAV="true">
<add fileExtension=".asa" allowed="false" />
<add fileExtension=".asax" allowed="false" />
<add fileExtension=".ascx" allowed="false" />
<add fileExtension=".master" allowed="false" />
<add fileExtension=".skin" allowed="false" />
<add fileExtension=".browser" allowed="false" />
<add fileExtension=".sitemap" allowed="false" />
<add fileExtension=".config" allowed="true" />
<add fileExtension=".cs" allowed="false" />
更改为true,保存退出;
---------------------------------------------------------------------------------------------
备注:起初尝试更改mime类型,结果证明无效,IIS配置管理禁止下载requestFiltering列表的后缀文件;