On May 9, 2019, at 2:00 PM, JOHN BAUGHMAN wrote:

> I am new to this and am wondering how does one manage a 4D Server running as 
> a service. If, for example, the server throws an error there is no way to see 
> the error. I guess what I am asking is to confirm that there is no way to see 
> the server gui while it is running as a service.
> 
> Also, I am not sure what "Allow service to interact with desktop" does. I am 
> still confused after reading up on this option.I have it checked as what I 
> have read leads me to believe that I need it checked for 4D server to access 
> thins like the file system, clibboard, email, etc. 
> 
> Maybe someone can help me better understand the ins and out of running 4D 
> server as a service.

First things first. Interact with desktop works fine with older versions of 4D 
Server and older versions of Windows Server. Newer versions have issues. Some 
combinations it’s just not going to work at all. Others you can get it to work 
if you do some Windows Registry setting changes. 4D v16+ and Windows Server 
2012+ take the most effort to get it to work. And some IT departments have 
Windows Server configured and user accounts configured to where it is just 
about impossible to get it to work. You’ll have to provide specific version of 
4D Server you will be using and version of Windows Server you will be using for 
me to comment on how easy/hard it will be to get it working.

When interact with desktop is working you will see a program in the Taskbar 
with a name like “Interactive Services”. It shows a small window with a button 
you can click. Click the button and the screen changes and you switch — to the 
"console user" I think it is called — and you will then see the 4D Server 
Administration window. Desktop disappears. Then everything looks and works just 
as expected. Error dialogs are displayed. You can edit Database Settings, 
backup settings, switch tabs in the Administration window, etc. 

There is also a small window — usually hidden behind the 4D Server MDI window — 
that has a button to allow you to return to the Desktop. Click that and you are 
back to Windows Server Desktop that you started from. That is basically it. 

Microsoft has decided that Interactive Desktop Services is now a bad idea and 
has depreciated it. It still works, but they block it from working with 
Registry entries in current Windows Server versions. You can edit the Registry 
and turn on some Windows Services and it still works. But they make it hard and 
a PITA to make you not want to use it. But I have used it — and currently are 
using it — and it works just fine. You want details on how to make it work, 
Google it or send me a private email and I’ll give you the info to make it work.

Current 4D recommendations is to not use interact with desktop when running 4D 
Server as a service and to handle everything yourself. Always install ON ERR 
CALL method on everything that runs on 4D Server and log the error somehow so 
you will never have a runtime error dialog appear. 

Be aware that sometimes you just have to launch 4D Server not as a service to 
deal with some things. Like you install a new structure file and you need to 
set the data file location. You start 4D Server as a Windows Service it will 
immediately quit. Since you can’t see the “select data file” dialog box, it 
just quits. So you have to start 4D Server on the Desktop, select the data file 
and then quit. Then you can start 4D Server as a service and it will stay 
running since it does not need to show the select data file dialog box. 

Also some other obscure error dialogs will display and the only way to see them 
and deal with them is to start 4D Server from the Desktop — not as a service — 
to see those dialog boxes and deal with them. It is challenging to run 4D 
Server as a Windows Service 100% of the time. It is supposed to be possible, 
but I’ve never been able to do it. Every once and a while I have to start it up 
from the Desktop and deal with a dialog box or message or make some setting 
change. 

To see the 4D Server Administration window, you can get it to show from 4D 
Client. Use the command OPEN ADMINISTRATION WINDOW from 4D Client. If you are 
using 4D Users and Groups you have to be logged in as Designer for it to work. 
You can’t do everything from this window that you can on the 4D Server machine, 
but you do a lot. 

Finally, you can write your own 4D Server Administration window and duplicate 
almost all — but not everything — using various commands and methods with the 
Execute on Server property set. I think their goal is to provide commands so 
that EVERYTHING you can currently do and see on the 4D Server Administration 
window will be doable from 4D Client. That includes all the graphs you see on 
the “Monitor” tab. OPEN ADMINISTRATION WINDOW may not even be needed. They are 
not there yet… maybe with v18 they will finish the command set to make it 
possible. 

Tim

*****************************************
Tim Nevels
Innovative Solutions
785-749-3444
[email protected]
*****************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to