Table of contents > SMS Proxy > Appendix B

Appendix B

This section explains how to make custom changes to the .NET Remoting configuration, such as changing port number and renaming the windows service. A thorough explanation of .NET Remoting configuration can be found on the MSDN web site (see http://msdn.microsoft.com/en-us/library/b8tysty8(VS.80).aspx).

The communication between the SMS Proxy windows service and the user interface application uses .NET Remoting. A change in the remoting configuration must be reflected in both the windows service and the user interface application. The configuration specifies, among others, which port and underlying protocol (e.g. HTTP) to use for the communication.

Remoting configuration for the SMS Proxy windows service

The remoting configuration for the SMS Proxy windows service is contained in the file GpsGate.SmsProxyService.exe.config in the windows service installation directory. It contains the following xml:

<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="ServiceName" value="SmsProxyService8992"/> <add key="RetrySmsProxyStartOnStart" value="true"/> <add key="RetrySmsProxyStartInterval" value="30000"/> </appSettings> <system.runtime.remoting> <application> <service> <wellknown mode="Singleton" type="GpsGate.SmsProxyRemotable.SmsProxyRemotable, GpsGate.SmsProxyRemotable" objectUri="GpsGate.SmsProxyRemotable.rem" /> </service> <channels> <channel ref="http" port="8992"> <serverProviders> <provider ref="wsdl" /> <formatter ref="soap" typeFilterLevel="Full" /> <formatter ref="binary" typeFilterLevel="Full" /> </serverProviders> <clientProviders> <formatter ref="binary" /> </clientProviders> </channel> </channels> </application> </system.runtime.remoting> </configuration>

Remoting configuration for the user interface application

The remoting configuration for the user interface application is contained in the file GpsGate.SmsProxyServiceUI.exe.config in the user interface installation directory. It contains the following xml:

<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.runtime.remoting> <application> <channels> <channel ref="http" port="0"> <clientProviders> <formatter ref="binary" /> </clientProviders> <serverProviders> <formatter ref="binary" typeFilterLevel="Full" /> </serverProviders> </channel> </channels> <client> <wellknown type="GpsGate.SmsProxyRemotable.SmsProxyRemotable, GpsGate.SmsProxyRemotable" url="http://localhost:8992/GpsGate.SmsProxyRemotable.rem"/> </client> </application> </system.runtime.remoting> </configuration>

Changing the windows service name

The tool for installing the windows service is the .NET InstallUtil.exe. InstallUtil.exe uses a config file named InstallUtil.config file to determine what the name of the windows service will be. InstallUtil.config contains the following xml:

<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="ServiceName" value="SmsProxyService8992"/> </appSettings> </configuration>

If you want to change the default windows service name, change the value of the key “ServiceName” in the InstallUtil.config before running the InstallUtil tool:

<add key="ServiceName" value="MyOwnServiceName"/>

The running windows service will use the GpsGate.SmsProxyService.exe.config file, so to avoid confusion the “ServiceName” value should also be changed to the same value in the GpsGate.SmsProxyService.exe.config file.

Changing the .NET Remoting port

In a custom installation it is possible to change the port used by .NET Remoting.

To do this, in the windows service config file, change the port number attribute of the channel tag:

<channel ref="http" port="9003">

A corresponding change must be made in the user interface config file. Change the port number in the “url” attribute of the element “wellknown ” in the user interface config file.
url="http://localhost:9003/GpsGate.SmsProxyRemotable.rem"

Continuous SMS Proxy start retry when windows service started

When started, the windows service will by default continuously try to start the SMS Proxy if for example no phone is connected. This retry behavior can be disabled by specifying RetrySmsProxyStartOnStart false in the GpsGate.SmsProxyService.exe.config file:

<add key="RetrySmsProxyStartOnStart" value="false"/>

In the same file, the interval in milliseconds of which retries are made can be changed by changing the value for the key RetrySmsProxyStartInterval, for example:

<add key="RetrySmsProxyStartInterval" value="60000"/>

Installing multiple windows services on the same machine

It is possible to install multiple SMS Proxy windows services on the same machine, although a single Tracking Server can communicate with only one SMS Proxy at a time. Installing multiple services involves running each windows service in its own folder and giving each a unique name and a unique .NET Remoting port number as explaned in sections 7.1 and 7.2 above. Follow this procedure for each windows service installation.

  1. Copy the SmsProxyService folder with all its contents to a new directory.
  2. Change the service name in InstallConfig.config and GpsGate.SmsProxyService.exe.config.
  3. Change remoting port for windows service and user interface.
  4. Run Setup.bat

Other configuration parameters

The SMS Proxy service has been tested using HTTP for the remoting channel but should also be able to handle TCP since the communication is handled by the .NET Remoting infrastructure. See the MSDN site for further information.

<< Appendix A