通过配置文件添加MIME类型

在web.config配置文件中的configuration节点下添加如下节点:

<system.webServer>
  <staticContent>
    <mimeMap fileExtension=".kml" mimeType="text/plain" />
  </staticContent>
</system.webServer>

IIS Express调试时就可以支持kml扩展名文件访问了

原文地址:https://www.cnblogs.com/lauer0246/p/10153994.html