Windows Server 2019 (deployment) as Standalone

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?

More detail:

  • 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.

TIA for pointers!

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.

https://documentation.xojo.com/topics/application_deployment/web/deployment_details.html
https://documentation.xojo.com/topics/application_deployment/web/deployment_details.html#Deploying_with_SSL
https://documentation.xojo.com/Category:Web_Deployment

usually you have a domain and behind is a public ip.
your web app have a ip:port in your intranet.
this port forwarding make a link between extern and intern.
so

https://domain.com:1024 = 80.77.44.5:1024 > 192.168.52.5:4567

as example.
the port itself does not say if ssl (secure socket layer) is used or not.
a valid cert file make your service app run with “ssl”.

if you use ms iis before your app its a license thing.

Thanks Markus! Is IIS even necessary for intranet published of a Web App? I though I saw some notes about how the build of a Web App for Windows included it’s own “web publishing” engine of some kind.

And worth mentioning that I did check out those links and prior postings in the forum before raising this question (I can appreciate that there’s lots of historical data on this matter)

1 Like

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.

the part with Windows Service and Deploying with SSL should work.
unfortunately the entire manual can not up to date for all this stuff.

This is a great place for @Tim_Parnell to announce support for “Lifeboat PC-edition”!

1 Like

You might get something out of this movie https://www.youtube.com/watch?v=V8U1q1ddR_Y&t=323s

1 Like

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.

1 Like

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”

Example:

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.

2 Likes

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. :slight_smile:

1 Like

Could not agree more! All the ugly warnings for a non-secure connection take away from the breathtaking beauty of my Web 2.0 UI!

1 Like