Kepware Knowledge Base: Solution
Creating a ClientAce Project That Will Run as a Service
Last Update: 2/5/2019
When creating a service application that will run under the system account (or in the background under a specified user), it is recommended that users do the following:
- Develop the ClientAce project as a Console Application so that it can run on the desktop and be tested in Debug Mode.
- Ensure that there are no pop-ups or User Interface interactions with the application. These will hang the process because there is no way to interact with the application when it is running as a service.
- Disable Visual Studio Hosting, which allows the application to be debugged at Runtime. This makes the application run with the launching user's credentials: it cannot run as a service. For more information, refer to the instructions below.
- In the VB .Net or C# development environment, open the project's properties. Then, select the Debug tab.
- Next, locate Enable Debuggers and uncheck Enable the Visual Studio hosting process.
- Then, convert the Console Application to a Service Application and compile the project in Release Mode.
Note:
The Application Manifest can be modified to force application elevation when the Operating System on which it is running has User Access Control (UAC) enabled. For more information, refer to Creating a ClientAce Service Application.
©
2021
PTC Inc. All Rights Reserved.