1 首先正确安装IIS
2 在项目的web.config文件中添加以下内容
<system.webServer>
<defaultDocument>
<files>
<add value="default.aspx" />
</files>
</defaultDocument>
<httpProtocol>
<customHeaders>
<!-- CORS temporary solution -->
<add name="Access-Control-Allow-Origin" value="*" />
<add name="--allow-file-access-from-files" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type, Authorization, Accept, X-Requested-With" />
<add name="Access-Control-Allow-Methods" value="OPTIONS, TRACE, GET, HEAD, POST, PUT" />
</customHeaders>
</httpProtocol>
</system.webServer>
3 添加MIME
需要用什么模型文件就添加什么模型文件,我本来想添加stl的,结果系统已经添加了。
最后就是重启IIS。基本上就OK了,当然,THREEJS相关的文件必须放正确位置。