Our IT dept is provisioning a server for me to use, in-house, local area network, for hosting a Xojo Web app and some related services applications. They love to deploy on VMs running WinSrv 2019, which I have no say in the matter. However I’m not certain what the base requirements are for hosting a Standalone Xojo Web App. Does anyone have a good recipe for this?
Will be running MySQL with very few transactions a day.
Needs to host a self-contained Xojo Web App.
Will run a few headless services apps for other business functions.
And will be a dedicated VM for hosting this solution.
you would register the web app as service.
if you replace the exe you have to stop the service,
overwrite the exe and start the service.
the service can also run in a “user” context.
you can use any free port starting at 1024. need simple port forwarding for extern use from public web.
for ssl you have a cert file copied beside the exe via build step.
if you like to access your app via https and not a port in the url
a web server would handle the request, then it can forward it to your app and your app can run without ssl in intranet.
your xojo service is a own “web server” you can access direct via ip:port or domain:port with a few settings.
could also be accessible via vpn for limited count of people.
in android i can enable a vpn connection and then i am in my home network.
example register once as windows service.
CMD as Admin!
sc create XojoFotoDoku type= own start= auto binpath= "C:\Users\Markus\Documents\MR_Xojo\Foto Doku\Builds - Foto Doku\Windows 64 bit\Foto Doku\Foto Doku.exe"
windows server you could access via remote desktop.
FWIW, my opinion on SSL for intranets: SSL or not pretty much depends on what your app is doing and your customer. I am always recommending SSL, even for intranet apps, as pretty much the same concerns, dangers, risks are valid on an intranet as well. For instance if you are asking your users in an intranet environment for their credentials you probably want to offer them the same security level as for an internet app and no one sniffing easily into the network traffic to the server. Most crimes in companies still happen by internal people.
But if your customer is short on budget and your app is more about delivering some non critical dashboard like data, you could probably go for a simple HTTP connection. But it will look “ugly” in most modern browsers, who will show your app as insecure. In my experience that is usually causing a lot of tickets from some users, concerned about security. Plus, you never know, how your app will develop over time. I bet that sooner or later the use of SSL will be a requirement. Hence, I would always recommend to embed SSL from the start and to price the cert costs into your offer. Sadly Let’s Encrypt is not (yet) covering local certificates and most likely they (technically) never will.
This is how virtually all my apps are running. I would recommend one VM optimized for MySQL and one to run as your Web Applications server if your IT department will build you two servers. This will give you lots of growth room for future apps. If not you can run both on a single server. There are CPU and Memory variables to consider depending on what your app does, but I’d need more details to advise you.
Setting up the app to run as a stand alone requires administrative privileges. I typically store all my apps in a folder in the C: vmdk called WebApps, and if more than one app needs a shared resource Webapps has a folder called Resources that I usually put them in. To setup the app you need to open a command window and paste in the following with just changing ApplicationName to whatever name you want showing in Windows Services and appname to whatever the app folder and executable name is
sc create ApplicationName type= own start= auto binpath= “C:\WebApps\appname\apname.exe”
sc create ShippingDB type= own start= auto binpath= “C:\WebApps\ShippingDB\ShippingDB.exe”
If your app needs network access to storage resources and that needs a specific username and password to login to the storage you can set that user in the Application Service/logon tab but your IT folks will need to make sure they have the username setup to “Logon as a service”
If you have any questions that I haven’t answered feel free to ask unless you would feel better sending me a PM. I have many Windows servers running Xojo web apps and have been running stand alone services for many years.
Thanks Tom, I’ll likely be leaning on you with a question or two for certain. I’ll start by first asking my IT crew how they feel about a 2nd server. It is generally good practice to host the databases on separate machine - thanks for reminding me.
This is a fun opportunity for me and a rare project where I have very few bosses, lots of time, and get to write the functional specification myself.