NetTalk Central

Author Topic: MultiSite - NetTalk Example 59  (Read 10359 times)

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
MultiSite - NetTalk Example 59
« on: December 27, 2011, 03:17:39 AM »
Hello Bruce,
 
This is not a huge issue right now but I thought I would ask you about this. 
 
I had the hardest time getting example 59 to run as a service.  Then I found the following code in a global embed:
 
gSelfService.SetPathToExeFolder = 1  ! usually this is done slightly later, but I want it done early
gSelfService._SetPathToExeFolder()   ! so that the LoadSettings can work. The Settings contain the service name
LoadSettings()                                   ! so that needs to be loaded here.
 
When I commented this code out, I could start the service. 
 
However, this code makes a call to the LoadSettings procedure.  So, by commenting this out, the app’s settings are not loaded when the app starts.
 
Any thoughts on this?
 
I’m using:
 
Clarion 8.8778
SelfService 3.34
WinEvent 3.77
xFiles 2.27
NetTalk 6.12
MessageBox 2.16
FM3 4.98
 
Thanks,
 
Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: MultiSite - NetTalk Example 59
« Reply #1 on: December 27, 2011, 05:23:53 AM »
thanks for posting here Don -
so, the thing is that you may want to run _multiple_ "Multi-Host" servers on the same machine. I had this situation on one server where I'm running a bunch of sites on port 80 (ie normal HTTP) but also multiple "sub-domains", with a wildcard certificate, on SSL (all on the same machine.)

Now since the program is a service, a number of the service settings need to be unique (like the service name, description and so on). If I hard-code this in the SelfService settings, (as one usually does) then you can only run one. The solution is to make the SelfService settings "variable".

So to make the program run as a service, you first need to set the Service name and Service description to something (unique).
Run the exe, go to the settings tab, enter something there, and click on "save".
(tip: the name can't contain spaces).

Then after that you can run the Exe /is and the service should install.

cheers
Bruce

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: MultiSite - NetTalk Example 59
« Reply #2 on: December 27, 2011, 05:43:23 AM »
Awesome!  Thanks Bruce!
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11