User Tag List

Results 1 to 8 of 8

Thread: Using HTML5 application in asp MVC C#

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    marius's Avatar
    Join Date
    Dec 2015
    Location
    Oslo, Norway
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using HTML5 application in asp MVC C#

    Hi
    Just trying a wild shot in the dark here..
    I am making my own webpage in Visual Studio using an MVC template and uploading to Azure. However, when I try to add my game to my website, I get an error saying that the chh file is not found, even though the path is correct. It suggests I try to add a mime allowing this file to be downloaded, but the search results I found either made no sense, or did not work.

    Picture of error page:


    Does anyone use asp MVC, and know what I gotta do?
    Images attachées Images attachées

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    marius's Avatar
    Join Date
    Dec 2015
    Location
    Oslo, Norway
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Solved it.
    For future references, doing what the error suggested did work (I had a different problem which caused it not to so had to make a new MVC project).
    In the Web.config file:

    I believe this is something you must do in any asp .NET website, and not only the MVC ones.

  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export Module

    Join Date
    Jan 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was just about to reply, but I see that you solved this. Yes you must make sure that your mime type (extension) is recognized by IIS for any ASP/C# website/program regardless of MVC. I had to do this to get IIS to properly serve XML files my program was creating. You can also do this through the IIS admin tool but if you are not an admin on the web server then editing web.config is the only way.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Aug 2014
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to create an app from HTML5 with Visual Studio 2015

    Hi,
    Could you please give the complet way to create an app with Visual Studio 2015 ?

    I made a basic html5 app with an orange background (cf. CorrectApp.jpg).
    But it's running as if the Runtime.js, the .cch or the .cc1 is missing : the windows open with correct borders but nothing inside (cf. from VS.jpg).
    I tried to create the Web.config with your texte but nothing better !

    Could you help me to dispatch the datas from index.html and Runtime.js to default.html and default.js ?

    Thank's
    Dav.
    Images attachées Images attachées

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    marius's Avatar
    Join Date
    Dec 2015
    Location
    Oslo, Norway
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Google Chrome have something called "DevTools" if you press F12, that will give you a message in console tab about what's wrong. This is available in FireFox and other browsers too (probably), but I have not used them :b
    You may also click on the error in the console log and sometimes get a more informative error message from the server about what's wrong (for instance, if your mime types are not correct, the browser will receive a 404, but the server will tell).

    I can try give a quick guide out of my head about how to do it:

    1) Open WebConfig and insert the stuff in the mime stuff in the picture from second post (if system.webServer and/or staticContent does not exist already, just type them in - exactly as shown).

    2) Right click on your project and create a new folder and name it something like Fusion (this folder should now be in the same level as your App_Start folder, App_Data folder, Views folder, etc.).

    3) Export your project to your created folder, or export it somewhere and drag/drop it to your new folder. This can be done from inside Visual Studio.

    You can try open your game now. Click Preview and enter /Fusion/ProjectName after your localhost:xxxx. If its wrong, try look up the error message, and say it here. Mvc can be really confusing the first few times.

    In the end you might not want to have a Fusion folder for all this (maybe you want the Runtime.js in the Script folder, and your game in your own view). You may move these files wherever you want, as long as you correctly update the paths to the MMFCanvas and the Runtime.js.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Aug 2014
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's running perfectly with chrome and firefox on my PC.
    The issue is with visual studio and the most important on my smartphone lumia535 !!
    VS analyse, debug, and create package properly with no error and no alert ... but at the end the app is not running in the window.

    I never used WebConfig, it's not already existing. Where put it ?

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    marius's Avatar
    Join Date
    Dec 2015
    Location
    Oslo, Norway
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ohh.. For my guide to make sense, you must first make an MVC app in visual studio.
    Create a new Project and select Web -> ASP .NET Web Application. Give it a name, click OK, and select MVC.
    If you are unfamiliar with MVC, then this is gonna be all new. Maybe you can make something simpler by creating some blank ASP .NET web application.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Aug 2014
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried many things... always an echec
    until I found on my smartphone the Internet Explorer parameter : preference for web site : desktop version (instead of mobile version).
    And Oh magic : it running !!!
    And by running I mean the HTML5 project from Fusion 2.5. No need of Visual Studio !
    I just hope that parameter is still available on windows phone 10.
    Anyone already run with WP10 ?

Similar Threads

  1. How to enable normal scrolling in HTML5 application?
    By brett in forum HTML5 Export Module 2.5
    Replies: 2
    Last Post: 12th February 2017, 09:39 PM
  2. Replies: 2
    Last Post: 24th October 2016, 04:02 AM
  3. Edit Box won't show in HTML5 application
    By Bogeyman in forum HTML5 Export Module 2.5
    Replies: 3
    Last Post: 3rd December 2015, 05:43 PM
  4. retreived a user database ID in the html5 application
    By arthurh in forum HTML5 Export Module 2.5
    Replies: 0
    Last Post: 2nd September 2015, 03:00 PM
  5. Run the HTML5 application in own webpage
    By ASD in forum HTML5 Export Module 2.5
    Replies: 15
    Last Post: 25th August 2014, 04:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •