Please remember this is a work in progress. Home » Deployment

Deployment

 

Stand Alone Server / Service Deployment

 

When you are developing your application, simply running the SA Server and typing http://127.0.0.1:8888/$/start on your browser is enough for running your application.

http://127.0.0.1 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: 192.168.100.10) and include the port number and the new session command: http://192.168.100.10:8888/$/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.  
  3. uses
  4.   IWStart,
  5.   Main in 'Main.pas' {formMain: TIWAppForm},
  6.   ServerController in 'ServerController.pas' {IWServerController: TDataModule};
  7.  
  8. {$R *.res}
  9.  
  10. begin
  11.   // the Execute boolean parameter as False prevents the GUI to be shown
  12.   TIWStart.Execute(False);
  13. 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.

Ex:

  • http://192.168.102.20:8877/$/start

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

 

Terms of Use | Privacy Statement © 2002 - 2018 Atozed Software