webgl开发中添加IIS的mime类型

1、在iis中直接设置

.obj application/octet-stream

.mtl application/octet-stream

2、在配置文件中加

<?xml version="1.0" encoding="utf-8"?>

<!--
  有关如何配置 ASP.NET 应用程序的详细消息,请访问
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
    <system.web>
        <compilation debug="true" targetFramework="4.0">          
        </compilation>
    </system.web>
  <appSettings>
    <add key="SQLString" value="Database=SDApp;Data Source=(local);User Id=sa;Password=skey123!@#;" />
  </appSettings>

  <system.webServer>    
    <staticContent>
      <mimeMap fileExtension=".cxml" mimeType="text/cxml" />
      <mimeMap fileExtension=".dzc" mimeType="text/xml" />
      <mimeMap fileExtension=".dzi" mimeType="text/xml" />
    </staticContent>
  </system.webServer>
</configuration>
这个就是在web.config里面直接改,加上了三种文件类型,cxml.dzc.dzi文件类型,你尝试这种方式看看。

posted on 2018-10-29 14:03  漫思  阅读(2082)  评论(0编辑  收藏  举报

导航