About the web deployment

Hi. I have made a simple unity scene, built it in my PC and uploaded all files to the server. Then I’ve went in the browser to http://…/Assets/my_name.html where must be my scene, and it doesn’t work. Only appears Unity logo but downloading don’t begin.
What’s wrong? How to deploy right?

that is deploeyed right, given you uploaded it in binary mode
Are you sure the plugin is up to date and correctly installed for your browser (each browser has an own one)

It’s strange, but it doesn’t work.
May be any requirements for the server?

I made your image smaller. There is zero need to post such a massive screenshot (ruining the browsing experience here) to show an empty loader bar. Please be mindful of that in the future, thanks.

  1. Test locally on your machine, does that work? If not then sort that out before uploading.

  2. Upload to server using binary (not text) mode.

  3. Make sure your server’s mime type configuration is properly set-up (you’ll find this information in the HTML file).

1 and 2 - OK.
3 - what exactly I must do?
I’ve added .unity3d and .unity in mime types.
Still the same.

Are you certain that your HTML and *.unity3d file are posted into the same relative locations as when created on your machine?

For example:

yourserver.com/yourpage.html
yourserver.com/yourfile.unity3d

The standard HTML produced by Unity has the src tag such that the HTML and *.unity3d file must be in the same directory. If you didn’t upload like that then that would explain the breakage.

Also, you asked what you must do for mime type configuration and then said you’ve done it. Do you know what to do there or not? Have you done it or not? You’re not quite clear there. :stuck_out_tongue:

If all else fails, can you post your HTML and *.unity3d file for someone else to try posting? If necessary (sensitive material) you can pass it to me and I’ll post it as a test in private location for you and I to test and verify.

All is uploaded the same way as in my PC.
About mime - I had a page where I could add some additional types of files. I wrote .unity and .unity3d.
Not sure 100% that it was OK, but have done namely this.
This is what I could.

By the way, in Safari it writes an error: Failed to download data file.
Error details → download failed, please retry.
In the status bar: “Loading …html”, completed 2 of 3 items or 3 of 4.

139445–5097–$1_803.zip (13.3 KB)
139445–5098–$1_247.html (6.1 KB)

You seem to have added a separate set of object/embed tags after the script block (why?) and the object tag looks fine as it references 1.unity3d, but your embed tag (used by all browsers other than Win IE) references “1_247_files/1.html” as the web player data file, not correct.

I removed that errant object/embed tag block you added, saved, uploaded and poof, it works just fine:

http://files.unity3d.com/tom/forums/21772/1.html

Try that on your end.

Your original version works as well, it just attempts to show two pieces of content, one that works (left) and one that doesn’t (right, the bogus object/embed tag set you seem to have added):

http://files.unity3d.com/tom/forums/21772/2.html

Now that you’ve handed me modified files I’m confused as to what you were attempting to post in the first place. Either way, your files are fine so make sure they’re in the same directory on your server.

Thanks, the first works OK. But it is strange, on my PC it works well, but after uploading on the server - no (I mean my version, not on your server).
If I understood right, there are some added wrong bytes, but I don’t know where are they from.
I didn’t paste anything, only have built with Unity.
By the way, I’ve uploaded the Island demo, it doesn’t work too.

Yes, there is an additional set of broken object/embed tags in the file you sent me (see the 2.html link above) that are simply not there in the Unity template so they must have come from somewhere after you created the build. I can’t imagine they come from Unity as they use an ever so strange folder/file path that references a HTML file name that doesn’t match the *.unity3d file name.

Can you please share a URL for your content, or the Island demo live somewhere? Even if that needs to be done with me via PMs (confidentiality assured if needed) that would be a big help so I can examine the files as delivered from your site.

Via personal messages we have resolved this issue! It all broke down to IIS 7 needing to have the mime types properly set, apparently the control panel it provides doesn’t work. The problem was that the file was uploaded and sitting there, but would return 404 errors as it was seen as a Unix executable and not a web file to be delivered.

So I’m happy to report that motorway is on his way again! :smile:

I must share. My problem exhibited the same symptoms. The mime did “take” in my case. I had some url-rewriting going on in my config(IIS7). The rewrite took me to the page allright, but I got the the “Invalid Data File”. I went straight in to the “real” url and it worked fine. Why? dunno, me must make game.

I’m having the same problem, and as a networking newbie I’m having trouble figuring out how to explain the fix to my web hosting service. Does this sound right? : The mime type configuration needs to be properly set-up to recognize the .unity3d extension.

Thanks for your help with this…it has been driving me crazy!

Brian

Generally the mime type is most critical when someone attempts to view your content and doesn’t have the player installed. But in the case above it was a matter of IIS 7 (Windows server OS) not seeing the *.unity3d file as a web player file, instead it viewed them as Unix executables that wouldn’t be web-delivered.

Is your hosting service based on Windows? If so is it using IIS 7? If so then you might have a match to this situation.

So how IIS7 should be configured in this case?
Which mime types,etc?

The mime types are clearly listed in the default HTML file produced by Unity. For our *.unity3d files the mime type is application/vnd.unity. And again, as per this issue apparently IIS7’s control panel doesn’t do it quite right so your sys admin may need to take extra manual steps to be sure it’s set properly.

I added the MIME type to my IIS server ,but kept getting the issue. I rebooted the server and it all works fine now. So reboot seemed to be the key.

IIS6 2003 server.

http://www.mccoyproductions.com/unity/mvs1.html

Windows Server 2008 - IIS7
Adding mimetype:

extension : .unity3d
MIME Type : application/vnd.unity

Internet Information Services (IIS) Manager ->works fine.

Just make sure you :

  • add the mime type to the ‘default’ machine mime-types.
    or
  • add the mime type only to the website.

DO NOT … first add it to the website and after, add it to the machine … .NET doesn’t really like that and will generate a ‘server error’. To solve this you will have to remove the mimetype from your website’s web.config manually.