Web app on Windows

Thanks to the advice of Brad Hutchings and Andre Kuiper in https://forum.xojo.com/12033-web-app-on-mac-personal-web-sharing I have been able to run a standalone application on a Mac that can be accessed by other computers on the same network.

Now I wanted to do the same on PC. Here is what I did that works :

  • Follow the instructions at http://www.makeuseof.com/tag/install-windows-web-server-pc-xampp/ to install Xampp
  • During install, authorize non local access. Somehow it seems Apache does not recognize local computers otherwise
  • Build a Windows stand alone executable
  • Copy it to c:\xampp\htdocs
  • From the command line and that directory type
myappname --securePort=8080 --maxSecureSockets=100 &

Then the PC web app can be accessed through the machine local IP address as in:

http://192.168.1.55:8080

I find this particularly useful to test with portable devices :slight_smile:

Michel, for a standalone webapp you don’t need to install Apache. The standalone contains a webserver in it self. You can run it from everywhere as long as you have permissions in that directory and the firewall doesn’t block your port.

I just shut down Apache and run :

myapp --port=8080 --maxSockets=100 &

Windows firewall asked permission to open the port, clicked OK. Works like a charm. Neat :slight_smile:

Thank you Andre.

I agree. I suspect that step 2 opened ports in your firewall, that’s all.

Deployment in the documentation is far from being as straightforward.

I could use CGI right away from previous experience, but that standalone business would greatly gain a couple examples, don’t you think ?

[quote=89179:@Michel Bujardet]Deployment in the documentation is far from being as straightforward.

I could use CGI right away from previous experience, but that standalone business would greatly gain a couple examples, don’t you think ?[/quote]

Michel, did you get deploy a CGI in Windows Server with Xampp?

I gives me the following time error in apache error.log:
[Tue 11 October, 21: 09: 15.328389 2016] [cgi error] [pid 21240: 1764 tid] [client 85.136.91.107:38036] Script timed out before returning headers: xojoapp.cgi

The test perl installation is correct. Thanks.

Sorry, I deployed cgi only with Linux.

This forum abounds about horror stories about Windows Server and CGI. Actually, under Windows, I would probably go for Standalone, as it seems much more reliable.

[quote=291308:@Michel Bujardet]Sorry, I deployed cgi only with Linux.

This forum abound about horror stories about Windows Server and CGI. Actually, under Windows, I would probably go for Standalone, as it seems much more reliable.[/quote]

Thanks Michel. At the moment I continue with Standalone…

Getting a standalone web app working behind IIS is relatively straight forward see http://developer.xojo.com/iis-deployment.

Thanks Wayne.

[quote=291289:@Manuel Salguero]Michel, did you get deploy a CGI in Windows Server with Xampp?

I gives me the following time error in apache error.log:
[Tue 11 October, 21: 09: 15.328389 2016] [cgi error] [pid 21240: 1764 tid] [client 85.136.91.107:38036] Script timed out before returning headers: xojoapp.cgi

The test perl installation is correct. Thanks.[/quote]
FWIW, this means that the app quit or crashed before it had time to respond to the cgi request.

Thanks Greg. I check if I used a quit or similar instruction, but I do not remember doing it …