Windows 2019 4D Server / Interact with Desktop

Dear Forum,

Im running 4D Server 17.3 on a new Windows 2019 Server.

When I doubleclick the 4D Icon on the Desktop I get the Window that allows me to cleanly open and close my database and so on.

But this solution doesn’t allow me to setup that the Server will start on its own after a powerfailure.

For that I need to set up the Service of 4D Server which is no problem.

However, in Windows 2019 Server the Service Property “Allow Service to Interact with Desktop” can no longer be used. The Option ist still available/clickable but looking at Windows Session 0 has been deprecated out of Windows Server 2019 so this feature can no longer be used.

So now, if I use the Service:

  • It all restarts fine after a Power failure
  • BUT when I want to restart the Server I must do this:
    1. I enter the Administration Window via my Dbase Solution
    1. I kick off the users
    1. I stop the Service.
      At no stage did I “close the database” nicely.

There is a software called FireDaemon and FireInput that brings looking at the zero Session back to Windows 2019 Server but that doesn’t work with the 4D Server (we tried).

So heres my official question: How bad is it to close a database just by stopping the Service?

Is there another way to solve my dilemma that allows me to close a Database “cleanly” even though Im using the 4D Server as a Service?

Thanking you in advance,
Spongebob

Simply open the Service window from Microsoft, select 4D Server and click stop.

Don’t be afraid, this is not “kill”, this is a request to a service to stop.
4D will shutdown within the next minute. It will disconnect all clients automatically.

Note: if you are using server procedures, they need to respond correctly.
This means they need to stop whatever they are doing NOW. Not finishing stuff, stop whatever they do to quit.
To do so, you need to check in any loop running longer than a second as additional loop condition Process aborted, like while(not(process aborted))

If you want to inform your users upfront, in 4D v17 create a 4D method allowing you to do so. Either call that via a HTTP request (4DAction) or with a 4D Remote. The method uses Execute on Client to launch a method on each client showing a dialog and doing Quit 4D.

In 4D v18 you might do the same, or call a combination of:
REJECT NEW REMOTE CONNECTIONS
SEND MESSAGE TO REMOTE USER

or just install this component:
https://blog.4d.com/build-a-web-based-monitoring-dialog-step-by-step/