Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Rax-Palar · Oct 01, 2017 at 02:27 PM · webglserverdeployment

Why does my WebGl game run in the browser from OS but I get 404 errors when I run from IIS in my ASP.NET core 2.0 app?

I am trying to add my game to my secure ASP.NET core 2.0 site, all requests are rerouted to https. When I launch the game build in my browser from the local index.html it runs fine. When I run through IIS each of the runtime files all get 404 errors. Here is the list of files that get the 404 (Not Found) error:

build.asm.code.unityweb build.asm.framework.unityweb build.asm.memory.unityweb build.data.unityweb

Any assistance with this would be greatly appreciated.

Thanks in advance.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Rax-Palar · Oct 01, 2017 at 02:29 PM 0
Share

I realized I should have noted that the index.html launches fine so I do not believe it is a routing issue.

avatar image Rax-Palar · Oct 08, 2017 at 12:18 PM 1
Share

After a ton of research it seems that my web.config is either wrong or being ignored. When I change .unityweb to .jpeg and modify the .json accordingly the game runs great. $$anonymous$$y web.config contains:

 <staticContent>
         <remove fileExtension=".unityweb" />
         <mime$$anonymous$$ap fileExtension=".unityweb" mimeType="application/octet-stream" />
 </staticContent>
 <handlers>
   <remove name="aspNetCore"/>
   <add name="aspNetCore" path="*" verb="*" modules="AspNetCore$$anonymous$$odule" resourceType="Unspecified"/>
 </handlers>
 <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
  
avatar image icefoxz Rax-Palar · Jul 03, 2018 at 01:24 PM 0
Share

You are right! When I saw this solution, I just pass by as this $$anonymous$$AY NOT BE THE PROPER WAY TO DO IT. But I'm trying hard to find out any other solution to solve the 404 error. But none. When I try to download the file for the extension *.unityweb, but I got error which mean the file isn't there. So I suspect this maybe happened on ASP.NET CORE 2.0, or IIS 10 (my server is WinServer 2016). Hopefully someone realize this problem or point out I'm wrong.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by spokrock · Mar 14, 2018 at 12:56 AM

You need to add the mime type for the file extension

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by drorriov · Jun 28, 2018 at 10:36 AM

Like spokrock said, you need to define MIME type. In IIS at your website you need to go to MIME TYPES and add File name extnestion of:

 .unityweb

MIME type:

 application/octet-stream

alt text


untitled-3.png (27.6 kB)
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jakejolli · Mar 10, 2021 at 07:02 PM 0
Share

Thanks! This solved it for me.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

78 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

WebGL deployment question 0 Answers

Linking a Unity webgl game to a server/domain to access from a chatbot? 0 Answers

WebGL set up server to receive messages from android app 0 Answers

WebGl build on Server has load memory error 6 Answers

I am trying to create an online multiplayer game, but UnityEngine.Networking isn't supported with WebGL exports. What would be the best way to create a networked game for WebGL? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges