Last Modified October 11, 2018
- Home
- Guides
- Advanced Topics
- Running in Service Mode
The first consideration when implementing software_DNA for an application that will run in Windows Service Mode, is that
the "service application" can have the API calls that validate the CDM License file (file that holds the license data, expiry dates
and other important information) but cannot present a GUI interface to the User for the initial
activation of the application.
You will need a small external application (the "Activator") that will launch the activation scheme, capture the License Code,
License Password and
Activation Email from the User and complete the initial activation of the License, which will create the CDM License File for the
Application.
Once the activation is complete, you can launch the "service application" which can perform regular
DNA_Validate API calls to continously confirm the validity of the License:
If the license is valid, your service should run.
If you get an error, you should stop your service and open the external
"Activator" application. This should also perform a DNA_Validate API call and then display to the User
the appropriate error message and instructions. For example: "License has expired".
Both the "Activator" and the "service application" would use the same <Product_Key> for the
different API calls.
Some other considerations for applications running under Windows Service mode (i.e. on a server):
Given that the Application may continuously run for extended periods, a DNA_Validate API call
should be scheduled on a regular basis (ex: once per day) in addition to the initial DNA_Validate API call.
See Runtime Guards
for details.
The application should be protected with Level 3 Validation / Protection, and the Warning Limit should be set to
<Validation_Limit> minus 1 day.
The first API call when the application is started should be DNA_SetINIPathName, if used,
and then DNA_UseIESettings("0") to ensure the DNA.DLL uses the WINSOCK libraries instead of the
default WININET libraries which will not work in Service Mode behind proxy servers.
Please contact support@softworkz.com for additional information and recommendations on the
optimum implementation and settings for your application.