Skip to main content

 

 
Go Search
Home
Getting Started
Knowledge Base
Training
Discussions
Downloads
Platform SDK
  

 
 
VersionOne Community > Downloads > Integration Documentation > ServiceHost8.0
 
VersionOne Service Host Configuration

VersionOne Service Host Configuration


Introduction

The VersionOne.ServiceHost.exe (ServiceHost) is an application that can be installed and run as a console application or as a Windows Service. It provides a host process and shared services (e.g. publish/subscribe event engine, logging, persistence) to any number of 'hosted services'. At startup, the ServiceHost initializes all configured hosted services specified in the configuration file. This document provides general information about installing, configuring and running the ServiceHost. For configuration details on a specific hosted service (e.g. Subversion Integration), see the help documentation included within that service’s zip file package.

System Requirements

VersionOne: 7.1 or above

Integration Server:

  • Operating System—Windows 2000, 2003

  • Framework—Microsoft .Net 2.0

Downloads

The latest version of Service Host is available at V1: Integration Downloads.

Installation

This package is XCOPY-deployed; simply extract the contents of the zip file to a directory of your choice.

The VersionOne.ServiceHost.exe can run as a console application or can be installed to run as a Windows Service. It is HIGHLY recommended that you run it from the console when initially configuring your hosted services; once the configuration is correct and the service behaves as expected, install and run it as a service.

Installing as a Windows Service

To install/uninstall it as a Windows Service, simply run it from the command-line as shown below. The service will automatically start after it has been installed successfully. The service will be installed with the settings listed in Table 1, “Windows Service Settings”.

VersionOne.ServiceHost.exe --install

VersionOne.ServiceHost.exe --uninstall

Table 1. Windows Service Settings

Service SettingConfiguration Value
Startup TypeAutomatic
Log On AsNT AUTHORITY\Local Service


Use Windows Services administration utility to change the startup type or credentials for the service after installation. Please ensure that the ServiceHost is configured with 'Log On As' credentials that have adequate permissions for all of the configured hosted services. For example:

  • The account must have file create and write permissions for the FileLogService to create and write to a log file in the configured location

  • the account must be a valid VersionOne user if VersionOne is configured to use Windows Integrated Security

Configuration

There are 2 primary sections of the ServiceHost configuration file 'VersionOne.ServiceHost.exe.config': <Installer> and <Services>.

The <Installer> section contains configuration options used during installation as a Windows Service. In that section, you can configure the service's long and short name:

<Installer>	
	<ShortName>V1SVC</ShortName> <!-- May be used as an argument with net start/stop {ShortName} on the command-line -->
	<LongName>VersionOne Integration Service</LongName> <!-- Used for display in the listing of Services in the Service admin utility -->
</Installer>

The <Services> section contains a configuration section for each hosted service that will be loaded at startup. The root element for each hosted service must be uniquely named within the context of the <Services> section. On the root element, the required class attribute indicates which class the ServiceHost will load and initialize at startup and the assembly within which it's contained. For example, the file-based logging service is in the 'VersionOne.ServiceHost.Core' assembly, and is implemented by the 'VersionOne.ServiceHost.Logging.FileLogService' class:

<FileLogService class="VersionOne.ServiceHost.Logging.FileLogService, VersionOne.ServiceHost.Core">
	<LogFile>.\ServiceHost.log</LogFile>
</FileLogService>

In this example, the only configuration needed for the hosted service is the <LogFile> element, indicating the path andy filename for the log file.

Execution

To run the ServiceHost as a console application, simply execute it from the command-line.

VersionOne.ServiceHost.exe

To stop the process hit Ctrl-C or Q, both of which will gracefully shut down the ServiceHost - this is comparable to stopping a service, giving all the hosted services the opportunity to free up any resources they are using (e.g. close connections/files, stop timers).

To run it as a Windows Service, use the Windows Service Administration utility to Start and Stop the service.

Logging

By default, 2 logging services are configured: a ConsoleLogService and a FileLogService. The ConsoleLogService is only active when running as a console application, whereas the FileLogService logs all output to a file, specified in the <LogFile> element of the FileLogService's configuration.

Copyright © 2008, VersionOne, Inc. All rights reserved. This document was generated 2008-01-22 23:13:58.