HTML5 on Microsoft server [solved]

Bringing your stacks to the web

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

HTML5 on Microsoft server [solved]

Post by MaxV » Mon Jun 06, 2016 9:37 am

Hi,
I have a friend that tried an HTML5 app, but it works on Linux server, not on Microsoft server.
What is the configuration needed on a microsfot server to run livecode HTML5 app?
Last edited by MaxV on Wed Jun 08, 2016 2:59 pm, edited 1 time in total.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: HTML5 on Microsoft server

Post by malte » Mon Jun 06, 2016 10:39 am

Did you serve it via a Webserver, or did you use a file URL to check?

If I am not mistaken you will have to have a Webserver (most likely IIS on Win, maybe apache) running on the server and put your HTML5 ab in the folder that is configured to serve the sites. Then you will need to point the browser to the correct HTTP(S) URL to your Webapp.

Hope this helps,

Malte

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: HTML5 on Microsoft server

Post by [-hh] » Mon Jun 06, 2016 12:11 pm

To my knowledge this is completely independent of the server (if there are no size limits for the single files to serve!!).
The only dependency is the browser used:
HTML5 standalones are NOT displayable by any Microsoft browser. Newest Chrome, Firefox, Opera and Safari are OK.
shiftLock happens

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: HTML5 on Microsoft server

Post by MaxV » Tue Jun 07, 2016 10:31 am

No,
this doesn't work on IIS server, but works on Linux server:
http://www.fenixsoftware.it/EsempioHTML ... d%201.html

I suspect that IIS needs some configuration.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: HTML5 on Microsoft server

Post by [-hh] » Tue Jun 07, 2016 12:31 pm

Three ideas, just to find out the culprit.
Please try one after the other, may be the first or the second already helps.

[1] Remove the space from the filename
(which is generated by the project name: Use "untitled1, not "untitled 1")
[2] Open the html file with a text editor and replace lines 226 to 229 by

Code: Select all

<script async type="text/javascript" src="standalone-community-8.0.1-rc-1.js"></script>
</body>
</html>
[3] Try to generate the standalone with 8.0.0-dp15.

If none of the three helps, then please come back.
[Edit. One server-sided possibility: Older servers don't support "async" loading. You could check that for your server version --- or try in step 2 without the word "async"].
shiftLock happens

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: HTML5 on Microsoft server

Post by MaxV » Wed Jun 08, 2016 12:37 am

No, nothing works... :?:
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: HTML5 on Microsoft server

Post by [-hh] » Wed Jun 08, 2016 8:38 am

Next idea.
Make a standalone from a stack "maxvtest.livecode", containing nothing than a standard button. Rename "standalone.zip" to "maxvtest.zip".
Put the following into a UTF8 file "maxvtest.html", it is a 'naked' minimal calling HTML.
Put this file in the folder of the standalone.
Now you have a folder "maxvtest" containing

standalone-community-8.0.1-rc-1.js
standalone-community-8.0.1-rc-1.html.mem
maxvtest.zip
maxvtest.html

load http://<your server>/maxvtest/maxvtest.html

with exactly the same browser and OS from both the WinServer and the LinuxServer.

If both works, then the original problem is caused by the standalone and we have to investigate there.
If it works from Linux only then it's the WinServer and I have no further idea.

Code: Select all

<!DOCTYPE html>
<html lang="en"> <head> <meta charset="utf-8"> <title>Max V's tests</title> </head>
<body> <div>
<canvas id="canvas" oncontextmenu= "event.preventDefault()" style="outline:none;"></canvas>
<script type="text/javascript">
var Module = {canvas: document.getElementById('canvas')};
Module.livecodeStandalone = "maxvtest.zip";
</script>
<!-- one may also try without "async" for older server -->
<script async type="text/javascript" src="standalone-community-8.0.1-rc-1.js"></script>
</div> </body> </html>
shiftLock happens

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: HTML5 on Microsoft server

Post by MaxV » Wed Jun 08, 2016 10:28 am

It doesn't work on IIS server 7.5. I get:
Exception thrown, see JavaScript console.
An the console reports:

Code: Select all

run() called, but dependencies remain, so not running
Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught could not load memory initializer standalone-community-8.0.0.html.mem
Failed to load resource: the server responded with a status of 404 (Not Found)
still waiting on run dependencies:
dependency: memory initializer
dependency: al standalone-community-8.0.0.html.mem
(end of list)
So I suppose that IIS server must be configured for javascript... I never put my hand before on a IIS server, so I don't know what to do.
Probably it doesn't serve mem file, if it isn't configure properly.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: HTML5 on Microsoft server

Post by [-hh] » Wed Jun 08, 2016 10:40 am

I wonder why it is looking (not finding) for .. 8.0.0.html.mem?
Everything must be called exactly with the version, that produced the standalone:
Is there a bug in the version naming?

Please check: this should be in the folder
standalone-community-8.0.0.js
standalone-community-8.0.0.html.mem

and in the html file near the end
<script async type="text/javascript" src="standalone-community-8.0.0.js">
shiftLock happens

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: HTML5 on Microsoft server

Post by MaxV » Wed Jun 08, 2016 2:46 pm

No, it doesn't serve the MEM file.
Look at the error if I try to go directly to MEM file:

Code: Select all

Server Error in Application "<application name>"
--------------------------------------------------------------------------------
HTTP Error 404.3 - Not Found
HRESULT: 0x80070032
Description of HRESULT: The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and is not allowed.
http://go.microsoft.com/fwlink/?LinkID= ... 70032,7601
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: HTML5 on Microsoft server [solved]

Post by MaxV » Wed Jun 08, 2016 3:00 pm

I solved on my local Microsoft server adding the MIME type MEM as: application/emscriptem
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Post Reply

Return to “HTML5”