I found some info on the web, but I'm stuck on how to properly start the service I have written this
procedure TTitaniaAdminServer.ServiceStart(Sender: TService; var Started: Boolean);
begin
ServerContainer := TServerContainer.Create(nil);
ServerContainer.SparkleHttpSysDispatcher.Start;
Started := true;
end;
Do you get any exceptions? Have no idea what may be wrong, but you certainly do not need to create any thread.
It should be as simple as create a new Windows Service Application from Delphi template, and on ServiceStart create your XData server DataModule and activate the dispatcher (as it looks you're already doing).
you are probably using httpsys from the source.
One common problem when starting server is that the port/url namespace must be reserved once before.
You can use the Thttpsysserverconfig from an administrator account.
Also, don't forget that when running as a service, the application runs under a different user, so permissions are different. Also the current directory is different. Make sure you are not doing any operations that might be forbidden for other users, like accessing user-specific folders, things like that.
I am new to XData and am struggling with getting a service running as as Windows Service. I am currently getting the same message reported above by Gomezel - service runs and stops immediately. I have tried suggestions above with no luck.
I am probably missing something basic. What basic steps do I need to take to get a simple service going? Is there an example app available?