Stand Alone / Service Deployment

Stand Alone / Service Deployment

Stand Alone Server / Service Deployment

When you are developing your application, simply running the SA Server and typing$/start on your browser is enough for running your application. stands for the local host, 8888 is the port the embeded web server is listening to (check TIWServerControllerBase for learning about the Port property) and /$/start is the IntraWeb command that forces the start of a new user session.

You can also test your application through your network. From another computer, simply type the IP of the hosting computer (ex: and include the port number and the new session command:$/start.

If you can’t open the application, please check for proper network settings as well any firewall/router/proxy/etc rules that may prevent the proper communication.

Although you can simply let the Executable running, we recomend you deploy your application as a Windows Service, as it makes easier to manage your application. Having your application as a Windows Service allows your application to start automatically when the server starts.

Deploying a Stand Alone Server (SA Server) application is simple. First your need to turn your SA Server in a Windows Service SA Server. Open your DPR source code and change the IWStart.Execute parameter to False. This will prevent the GUI to be shown.

  1. program MyIWApplication;
  2. uses
  3.   IWStart,
  4.   Main in ‘Main.pas’ {formMain: TIWAppForm},
  5.   ServerController in ‘ServerController.pas’ {IWServerController: TDataModule};
  6. {$R *.res}
  7. begin
  9.   TIWStart.Execute(False);
  10. end.

Then run your application using the /install parameter (you can make a batch file for this taks or simply create a Windows shortcut and add the parameter to the shortcut). This will make the application to be installed as a Windows Service. If your application installed succesfully, you will see the following dialog. If this dialog does not appear, the service has not been installed.

From Vista forward, services must be installed while running with specific adminsitrator permissions. Installing without administrator elevation will not produce any error, but no dialog will appear. Take caution to change the shortcut to “Run as Administrator” or start the command prompt with administrator priveleges.

Installing a service will not start the service although it will be set to AutoStart. Reboot your server or open the Services Manager and start the application manually. You can also start the appplication by issuing “net start <servicename>” as an administrator.

Now your application is ready to receive users requests.

For more information about Windows Services and how to manage them, please check Windows Services.

To uninstall your application from the Windows Service list, run the application using /uninstall.

For installing a new version of your application, you need to open the Services Manager and stop the service of your application before replacing the Executable file. After that, you can restart the service again.

If you want to run your application with the normal GUI, you can use the /GUI param. Open the Run > Parameters options on the IDE menu and add /GUI as a parameter. This will make your application show the SA Server GUI again.

How to make your application visible for your users

After you have installed your application, you need to make it available to your user. If your users wiull be accessing your application from a internal network, they only need to know the IP server + the port the app is running + /$/start (for more information about the /$/start command, check Session management section in Server Controller.



If your users need to access your SA Server from outside your network, you can use a public IP, use some services like or similar ones, redirect a URL to your IP among other things. Talk to your network administrator for information on how to do that.