Re: Managing 4D Server as a service

2019-05-11 Thread Tim Nevels via 4D_Tech
On May 11, 2019, at 2:00 PM, JOHN BAUGHMAN wrote:

> Got it working. The fix was to use the Admin account in the Log On tab. That 
> also fixed the Xojo WebApp. The fix did take until the server machine was 
> restarted. I also opened 4D server and database as Administrator before 
> restarting the computer.
> 
> Looks like Interactive desktop only works with Local System account checked. 
> Bummer.

It wasn’t always that way. I had sites where this is how I initially set it up 
and it worked fine. Then something changed either with 4D or Windows and I had 
to switch to using an account.

Now I have to periodically go change the saved password because my client has 
that option turned in Windows. Luckily I am using my own account login for the 
4D Server Service, so when I get prompted to make the password change, I just 
have to remember to go to the 4D Server machine and also do it there for the 
Service.

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com
*

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Managing 4D Server as a service

2019-05-11 Thread JOHN BAUGHMAN via 4D_Tech
Got it working. The fix was to use the Admin account in the Log On tab. That 
also fixed the Xojo WebApp. The fix did take until the server machine was 
restarted. I also opened 4D server and database as Administrator before 
restarting the computer.

Looks like Interactive desktop only works with Local System account checked. 
Bummer.

Thanks for all who helped.

John



> On May 10, 2019, at 3:50 AM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> On May 10, 2019, at 8:09 AM, JOHN BAUGHMAN wrote:
> 
>> Tim,  thank you for that most informative post. It really helps. I will be 
>> switching my client's 4D Server to a service later this evening for the 
>> first time. After reading your post I feel far more confident going forward.
>> 
>> The client is running v16R6 on Windows Server 2008 R2. You pointed me in the 
>> right direction and it appears in this configuration Interactive Services 
>> works great. I suspect that the client will continue using Win Server 2008 
>> until they are forced to upgrade, but I will be moving them to v17 shortly. 
>> Hopefully Interactive Services will continue to work with v17.
> 
> Windows Server 2008 R2 fully supported interactive desktop, so no need for 
> Registry entry modifications there. 
> 
> But be warned that you may still run into an issue with how you “Log on as:” 
> in the “Log on” tab in the Services dialog for 4D Server in the Services 
> window. 4D or Microsoft changed something and I had an issue upgrading from 
> 4D Server v12 to v16 on Windows Server 2012. 
> 
> https://dl.dropboxusercontent.com/s/w6d63gpm5rn5mp7/Services%20Log%20On.PNG
> 
> Normally you just select the default “Local System account” and it works. But 
> when I  did a v12 to v16 upgrade it would not work. Pat Bensky also recently 
> had this same problem. The solution is to switch to “This account:” and use 
> an administrator account. But — and Pat will tell you this — be careful how 
> you specify the account name. It’s not just something like “timnevels” it may 
> be “\domain\timnevels”. Use the “Browse” button to find the account name and 
> it will put it in a form that works. 
> 
> Also, you may need to “Run as administrator” the 4D Server.exe to be able to 
> access “Register Current Database as Service” in the File menu of 4D Server. 
> If the item is disabled, you need to run as administrator. 
> 
> One last tip, if you can, since this is a new switch from macOS to Windows, 
> and if you have ready access to the server machine, start off by NOT running 
> 4D Server as a Windows Service. Run it as a desktop application. You can do 
> the Services setup and try it out, but Stop the service mark the service as 
> “Manual” when you are done setting it up and testing. 
> 
> Save running as a Service for a few days. Make sure there are no unexpected 
> issues with this macOS to Windows conversion. It’s much more convenient and 
> removes some variables if you just run 4D Server from the Desktop. You can 
> remote to the server and see what is going on without having do the 
> interactive services switch dance. Once things are running smoothly, then you 
> can switch to running as a Service. Any new problems might then be explained 
> as connected to running the database as a Service and not just “worked fine 
> on a macOS server but on Windows server it doesn’t work, so it’s a Windows 
> server problem”. 
> 
> Sometimes printing — like creating PDFs on the server — can be an issue when 
> running as a Service. 
> 
> Tim
> 
> *
> Tim Nevels
> Innovative Solutions
> 785-749-3444
> timnev...@mac.com
> *
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Managing 4D Server as a service

2019-05-10 Thread Douglas von Roeder via 4D_Tech
John:

I see that Tim surfaced this in another thread.


--
Douglas von Roeder
949-336-2902


On Fri, May 10, 2019 at 1:20 PM Douglas von Roeder 
wrote:

> John:
>
> I have one system that’s a built app that runs as a service. Maybe this
> applies to your situation.
>
> When I put out a new structure, I launch the app by choosing the .exe, do
> a right mouse and select “Run as administrator”, select the datafile, and
> let the app launch. Once it’s running, I launch the built client app,
> ensure that the update runs, and then quit the client app. That sequence
> ensures that the server has the data file path, that it can respond to
> requests, that it can serve the new code, and that the client can update
> and connect.
>
> Next step is to quit 4D Server, start the service running, and log into it
> with the built client app.
>
> I realize that the built server/client is a little different but maybe
> launching the server manually would help in your situation.
>
> --
> Douglas von Roeder
> 949-336-2902
>
>
> On Fri, May 10, 2019 at 1:04 PM JOHN BAUGHMAN via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
>> Well, last night I tried to start the service on the client’s production
>> machine and I could not get it to work.
>>
>> After registering the service from 4D server, I tried starting the
>> service from the Service Manager and it indicated that it had started up
>> but I was unable to establish a connection using a 4D client. On my VM
>> Interactive Services takes a while to show up in the task bar after a
>> restart, but it eventually does. On the production server, it never makes
>> an appearance. So I have no other way to see it the server is running
>> properly.
>>
>> I then restarted the computer with the service set to start
>> automatically. Again I was unable to establish a connection with 4D Client.
>> I tried both manually and automatically a few times without success. Each
>> time I tried to start up 4D Server normally and on at least one occasion 4D
>> asked if I wanted to open the database in Read Only mode, which tells me
>> the service had opened the datafile. On other tries, I was able to open the
>> database normally.
>>
>> A couple of other things to note.
>> 1. A year or so ago I was investigating the ins and outs of
>> running as a service on this same machine and I was able to get everything
>> to work.
>>
>> 2. I have the service 4D’s Application Server listening on port
>> 19816 as I have another 4D server running a different database on the same
>> box opened normally (not as a service) listening on port 19813. It only
>> opens after the Admin user logs in. They both work fine together when both
>> are opened normally.
>>
>> 3. The service 4D is also running a web server which respond to
>> requests from a Xojo WebApp running on the same machine. Those requests
>> fail when 4D Server is supposedly
>> running as a service.
>>
>> 5. Finally of note is that when the Xojo WebApp is opened as a
>> Service it will not open as it unexpectedly quits on startup. All of this,
>> Xojo and 4D Server work just fine on my VM and all worked fine a year ago
>> when I first started researching things on the production machine. The
>> folks at Xojo suggest that my WebApp may be trying to access a file that
>> the service does not have access to. Tonight I will be trying to get the
>> Xojo service to work with no file access queries in the WebApps startup
>> events.
>>
>> I think that the inability to start both the Xojo WebApp and 4D as
>> services is related and may be encountering an issue with the OS, which may
>> have different updates than my VM. The production machine has been
>> religiously updated by windows over the year,, my VM not so much.
>>
>> Any suggestions?
>>
>> Thanks,
>>
>> John
>>
>> **
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
>
>
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Managing 4D Server as a service

2019-05-10 Thread Douglas von Roeder via 4D_Tech
John:

I have one system that’s a built app that runs as a service. Maybe this
applies to your situation.

When I put out a new structure, I launch the app by choosing the .exe, do a
right mouse and select “Run as administrator”, select the datafile, and let
the app launch. Once it’s running, I launch the built client app, ensure
that the update runs, and then quit the client app. That sequence ensures
that the server has the data file path, that it can respond to requests,
that it can serve the new code, and that the client can update and connect.

Next step is to quit 4D Server, start the service running, and log into it
with the built client app.

I realize that the built server/client is a little different but maybe
launching the server manually would help in your situation.

--
Douglas von Roeder
949-336-2902


On Fri, May 10, 2019 at 1:04 PM JOHN BAUGHMAN via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Well, last night I tried to start the service on the client’s production
> machine and I could not get it to work.
>
> After registering the service from 4D server, I tried starting the service
> from the Service Manager and it indicated that it had started up but I was
> unable to establish a connection using a 4D client. On my VM Interactive
> Services takes a while to show up in the task bar after a restart, but it
> eventually does. On the production server, it never makes an appearance. So
> I have no other way to see it the server is running properly.
>
> I then restarted the computer with the service set to start automatically.
> Again I was unable to establish a connection with 4D Client. I tried both
> manually and automatically a few times without success. Each time I tried
> to start up 4D Server normally and on at least one occasion 4D asked if I
> wanted to open the database in Read Only mode, which tells me the service
> had opened the datafile. On other tries, I was able to open the database
> normally.
>
> A couple of other things to note.
> 1. A year or so ago I was investigating the ins and outs of
> running as a service on this same machine and I was able to get everything
> to work.
>
> 2. I have the service 4D’s Application Server listening on port
> 19816 as I have another 4D server running a different database on the same
> box opened normally (not as a service) listening on port 19813. It only
> opens after the Admin user logs in. They both work fine together when both
> are opened normally.
>
> 3. The service 4D is also running a web server which respond to
> requests from a Xojo WebApp running on the same machine. Those requests
> fail when 4D Server is supposedly
> running as a service.
>
> 5. Finally of note is that when the Xojo WebApp is opened as a
> Service it will not open as it unexpectedly quits on startup. All of this,
> Xojo and 4D Server work just fine on my VM and all worked fine a year ago
> when I first started researching things on the production machine. The
> folks at Xojo suggest that my WebApp may be trying to access a file that
> the service does not have access to. Tonight I will be trying to get the
> Xojo service to work with no file access queries in the WebApps startup
> events.
>
> I think that the inability to start both the Xojo WebApp and 4D as
> services is related and may be encountering an issue with the OS, which may
> have different updates than my VM. The production machine has been
> religiously updated by windows over the year,, my VM not so much.
>
> Any suggestions?
>
> Thanks,
>
> John
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Managing 4D Server as a service

2019-05-10 Thread JOHN BAUGHMAN via 4D_Tech

> On May 10, 2019, at 3:50 AM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> But be warned that you may still run into an issue with how you “Log on as:” 
> in the “Log on” tab in the Services dialog for 4D Server in the Services 
> window. 4D or Microsoft changed something and I had an issue upgrading from 
> 4D Server v12 to v16 on Windows Server 2012. 
> 
> https://dl.dropboxusercontent.com/s/w6d63gpm5rn5mp7/Services%20Log%20On.PNG 
> 
> Normally you just select the default “Local System account” and it works. But 
> when I  did a v12 to v16 upgrade it would not work. Pat Bensky also recently 
> had this same problem. The solution is to switch to “This account:” and use 
> an administrator account. But — and Pat will tell you this — be careful how 
> you specify the account name. It’s not just something like “timnevels” it may 
> be “\domain\timnevels”. Use the “Browse” button to find the account name and 
> it will put it in a form that works. 


That may be my problem (see my recent post). Will check this out 
tonight.

> Also, you may need to “Run as administrator” the 4D Server.exe to be able to 
> access “Register Current Database as Service” in the File menu of 4D Server. 
> If the item is disabled, you need to run as administrator. 

This was not a problem.

> One last tip, if you can, since this is a new switch from macOS to Windows, 
> and if you have ready access to the server machine, start off by NOT running 
> 4D Server as a Windows Service. Run it as a desktop application. You can do 
> the Services setup and try it out, but Stop the service mark the service as 
> “Manual” when you are done setting it up and testing. 

The server has been running on the production machine not as a service 
without any problems for over a year.

John
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Managing 4D Server as a service

2019-05-10 Thread JOHN BAUGHMAN via 4D_Tech
Well, last night I tried to start the service on the client’s production 
machine and I could not get it to work.

After registering the service from 4D server, I tried starting the service from 
the Service Manager and it indicated that it had started up but I was unable to 
establish a connection using a 4D client. On my VM Interactive Services takes a 
while to show up in the task bar after a restart, but it eventually does. On 
the production server, it never makes an appearance. So I have no other way to 
see it the server is running properly. 

I then restarted the computer with the service set to start automatically. 
Again I was unable to establish a connection with 4D Client. I tried both 
manually and automatically a few times without success. Each time I tried to 
start up 4D Server normally and on at least one occasion 4D asked if I wanted 
to open the database in Read Only mode, which tells me the service had opened 
the datafile. On other tries, I was able to open the database normally.

A couple of other things to note.
1. A year or so ago I was investigating the ins and outs of running as 
a service on this same machine and I was able to get everything to work.

2. I have the service 4D’s Application Server listening on port 19816 
as I have another 4D server running a different database on the same box opened 
normally (not as a service) listening on port 19813. It only opens after the 
Admin user logs in. They both work fine together when both are opened normally.

3. The service 4D is also running a web server which respond to 
requests from a Xojo WebApp running on the same machine. Those requests fail 
when 4D Server is supposedly 
running as a service.

5. Finally of note is that when the Xojo WebApp is opened as a Service 
it will not open as it unexpectedly quits on startup. All of this, Xojo and 4D 
Server work just fine on my VM and all worked fine a year ago when I first 
started researching things on the production machine. The folks at Xojo suggest 
that my WebApp may be trying to access a file that the service does not have 
access to. Tonight I will be trying to get the Xojo service to work with no 
file access queries in the WebApps startup events.

I think that the inability to start both the Xojo WebApp and 4D as services is 
related and may be encountering an issue with the OS, which may have different 
updates than my VM. The production machine has been religiously updated by 
windows over the year,, my VM not so much.

Any suggestions?

Thanks,

John

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Managing 4D Server as a service

2019-05-10 Thread Tim Nevels via 4D_Tech
On May 10, 2019, at 8:09 AM, JOHN BAUGHMAN wrote:

> Tim,  thank you for that most informative post. It really helps. I will be 
> switching my client's 4D Server to a service later this evening for the first 
> time. After reading your post I feel far more confident going forward.
> 
> The client is running v16R6 on Windows Server 2008 R2. You pointed me in the 
> right direction and it appears in this configuration Interactive Services 
> works great. I suspect that the client will continue using Win Server 2008 
> until they are forced to upgrade, but I will be moving them to v17 shortly. 
> Hopefully Interactive Services will continue to work with v17.

Windows Server 2008 R2 fully supported interactive desktop, so no need for 
Registry entry modifications there. 

But be warned that you may still run into an issue with how you “Log on as:” in 
the “Log on” tab in the Services dialog for 4D Server in the Services window. 
4D or Microsoft changed something and I had an issue upgrading from 4D Server 
v12 to v16 on Windows Server 2012. 

https://dl.dropboxusercontent.com/s/w6d63gpm5rn5mp7/Services%20Log%20On.PNG

Normally you just select the default “Local System account” and it works. But 
when I  did a v12 to v16 upgrade it would not work. Pat Bensky also recently 
had this same problem. The solution is to switch to “This account:” and use an 
administrator account. But — and Pat will tell you this — be careful how you 
specify the account name. It’s not just something like “timnevels” it may be 
“\domain\timnevels”. Use the “Browse” button to find the account name and it 
will put it in a form that works. 

Also, you may need to “Run as administrator” the 4D Server.exe to be able to 
access “Register Current Database as Service” in the File menu of 4D Server. If 
the item is disabled, you need to run as administrator. 

One last tip, if you can, since this is a new switch from macOS to Windows, and 
if you have ready access to the server machine, start off by NOT running 4D 
Server as a Windows Service. Run it as a desktop application. You can do the 
Services setup and try it out, but Stop the service mark the service as 
“Manual” when you are done setting it up and testing. 

Save running as a Service for a few days. Make sure there are no unexpected 
issues with this macOS to Windows conversion. It’s much more convenient and 
removes some variables if you just run 4D Server from the Desktop. You can 
remote to the server and see what is going on without having do the interactive 
services switch dance. Once things are running smoothly, then you can switch to 
running as a Service. Any new problems might then be explained as connected to 
running the database as a Service and not just “worked fine on a macOS server 
but on Windows server it doesn’t work, so it’s a Windows server problem”. 

Sometimes printing — like creating PDFs on the server — can be an issue when 
running as a Service. 

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com
*

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Managing 4D Server as a service

2019-05-10 Thread John DeSoi via 4D_Tech

> On May 9, 2019, at 4:25 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 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. 


Unfortunately, this is not true. There are several types of errors that show a 
dialog on the server even if an error hander is installed. See this feature 
request on the forums for examples. And add your vote for it :).

https://forums.4d.com/Post/EN/17994245/1/17994246


John DeSoi, Ph.D.

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Managing 4D Server as a service

2019-05-10 Thread Epperlein, Lutz (agendo) via 4D_Tech
We use Windows Services all the time with success. But we have to launch the 
server application from time to time as a desktop application as John said, 
but it is pretty rare. Nearly all errors we try to catch and write the 
messages to a log file. But there are situations where this isn't possible, 
e.g. starting with wrong journal file. These messages are generated by 4D 
processes unmanageable by programming or settings.
But there is a feature request that such error message should be logged all 
the time if the application runs as a service:
https://forums.4d.com/Post/DE/19227573/1/19227655#19227655

Regards
Lutz
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Managing 4D Server as a service

2019-05-09 Thread JOHN BAUGHMAN via 4D_Tech
Tim,  thank you for that most informative post. It really helps. I will be 
switching my client's 4D Server to a service later this evening for the first 
time. After reading your post I feel far more confident going forward.

> On May 9, 2019, at 11:25 AM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 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. 


The client is running v16R6 on Windows Server 2008 R2. You pointed me in the 
right direction and it appears in this configuration Interactive Services works 
great. I suspect that the client will continue using Win Server 2008 until they 
are forced to upgrade, but I will be moving them to v17 shortly. Hopefully 
Interactive Services will continue to work with v17.

Thank s again,

John
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Managing 4D Server as a service

2019-05-09 Thread Tom Benedict via 4D_Tech
On May 9, 2019, at 14:25, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> 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.
> 
> 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. 
> 

The 4D World Tour example disk include a Server Administration Web Interface, 
which is really the way to do remote administration. I haven’t tried it, but it 
looks pretty slick.

Tom Benedict
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Managing 4D Server as a service

2019-05-09 Thread Tim Nevels via 4D_Tech
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


Managing 4D Server as a service

2019-05-09 Thread JOHN BAUGHMAN via 4D_Tech
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.

Thanks,

John




**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**