.NET Agent Settings for Windows Services
Configure the .NET Agent settings that are specific for applications running as Windows services.
Enable the Agent to monitor Windows services
By default, the Agent is not enabled for any Windows services. Enable it explicitly
for each service by adding a service
element under
services
to the configuration file:
<seeker>
<services>
<service name="MyServiceName"/>
</services>
</seeker>
Map Windows services to Seeker projects
-
If you have multiple Windows services to monitor, you might want to map each service to a specific Seeker project by setting the
project
attribute in the configuration file to the relevant project’s key, as in the following example:<seeker> <services> <service name="MyService" project="project1_key"/> </services> </seeker>
Attention: If theSEEKER_PROJECT_KEY
environment variable is defined, it takes priority, and this configuration is ignored. -
You can instruct an Agent to use a certain project as default for all services that are not mapped to any specific projects, and report detected vulnerabilities to that project. The following example defines
my_project_key
as the default project for all services.<seeker> <services project="my_project_key"> <service name="MyService1"/> <service name="MyService2"/> </services> </seeker>
You can map projects to Windows services.
The example below creates the following project mappings:- Defines
project_def_key
as the default project for all Windows services. - Maps
project_key
to theWindowsService1
service.
As a result, the Agent will use
project_def_key
for all services butWindowsService1
.<seeker> <services project="project_def_key"> <service name="WindowsService1" project="project_key"/> <service name="WindowsService2"/> </services> </seeker>
- Defines
Identify testing environments where Agents are running
To help identifying the testing environments in which vulnerabilities are detected by an Agent, you can assign custom tags to an Agent by the following:
<seeker>
<services>
<service name="MyService" customTags="dev,myservice"/>
</services>
</seeker>
Configure start and stop timeouts for applications running as Windows services
When the Seeker .NET Agents service starts, it restarts applications
running as Windows services. The serviceStartTimeout
and
serviceStopTimeout
parameters define the start and stop
timeouts that Seeker waits till applications are restarted. Their respective default
values are 30 and 30 seconds.
<seeker>
<services serviceStartTimeout="60" serviceStopTimeout="60">
<service name="MyService"/>
</services>
</seeker>