three.js所装载.OBJ错误的Azure而不是本地 [英] Three.js Loading .OBJ error in Azure but not Locally

查看:217
本文介绍了three.js所装载.OBJ错误的Azure而不是本地的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用three.js所进行的WebGL加载的obj
但我有Windows Azure中加载的obj捉迷藏的Windows Server 2008时出现问题
我使用谷歌Chrome浏览器和它给了以下错误:

I am using three.js for webGL to load .obj but I have a problem when loading .obj in Windows Azure runnning Windows Server 2008 I using Google chrome browser and it gives the error below:

http://websiteaddress.net/webGL/obj/test.mtl 404(未找到)

甚至,我用自己的原始来源$ C ​​$ C加载obj文件具有相同的误差

even, I used their original source code to load .obj file it has the same error

和当我尝试浏览其他图像中的服务器,我可以preVIEW它的文件
例如:(website.net/images/test.gif) - 我可以看到在浏览器中test.gif图片

and when i try to navigate other images file in the server i can preview it eg: (website.net/images/test.gif) - i can see the test.gif image in the browser

但是当我浏览到OBJ,我收到错误的浏览器:
(如:website.net/obg/test.obj)

but when i navigate to .obj, i receive error in the browser: (eg : website.net/obg/test.obj)

404 - 文件或目录未找到。
您正在寻找可能已经删除该资源,更名或暂时不可用。

404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

我可以在本地查看我的.OBJ而不是当我把它放在Azure中!
谁能帮助我?谢谢!

i can view my .obj locally but not when I put it in Azure! can anyone helps me? Thanks!

推荐答案

[解决] LOADING .OBJ(波前)文件中的Windows主机返回404错误[解决]

[SOLVED] LOADING .OBJ (Wavefront) FILE IN WINDOWS HOSTING RETURN 404 ERROR [SOLVED]

当我与three.js所工作和加载obj文件在本地主机对我的作品很好,但运行从Windows中的文件时,托管其用于obj文件返回404。

As I was Working with Three.js and loading a .obj file works great for me in localhost but when running the files from the Windows Hosting it return 404 for the .obj file.

所以,我们需要把这个行添加到的web.config 项目的根文件夹的文件(如果你没有在你的项目的根文件夹中的文件,然后继续前进,创建一个。 )

So, we need to add this lines to the web.config file of the project root folder (if you don't have the file in your project root folder then go ahead and create one. )

的web.config

        <?xml version="1.0" encoding="UTF-8"?>
        <configuration>
            <system.webServer>
                 <staticContent>
                        <mimeMap fileExtension=".obj" mimeType="application/octet-stream" />
                 </staticContent>
            </system.webServer>
        </configuration>

将web.config中正确的位置,您可以:)

Place the web.config to correct location and Enjoy :)

这篇关于three.js所装载.OBJ错误的Azure而不是本地的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆