Client as Service

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
MartinLentzsch
Jr. Member
Jr. Member
Posts: 4
Joined: 24 Jan 2017, 16:20

Client as Service

Post by MartinLentzsch »

Hello,

I have a problem with running the client als Windows Service.

My application is a service which calls some method of an external library to communicate with some communication endpoints.
All libraries will be binded at runtime.
Each library has its own communication protocol. One of the library should communicate through OPC to an endpoint.
The license file is embedded to this library. The AddProcessLiceenses function is called in the constructor of the main class in the library. This contstructor is called when the library will be instantiated.

When I try to start the service with the service manager, the application hangs when the OPCSession is created. When I stop the service it will go through the creation of the OPCSession and will stop the service after it.
But, when I start the service directly (using direct creation and output through the console) it will run correctly

I hope I had described my construction right and someone can help me.

Thank you.

Best regards
Martin

User avatar
Support Team
Hero Member
Hero Member
Posts: 3073
Joined: 18 Mar 2011, 15:09

Re: Client as Service

Post by Support Team »

We tested the client running as a service and did not have any problems. Did you set ApplicationInstance.NoAutoStartServic to true?
If setting this property does not help to resolve the issue, please create a support ticket and a attach a sample client that can reproduce the issue.
Best regards
Unified Automation Support Team

MartinLentzsch
Jr. Member
Jr. Member
Posts: 4
Joined: 24 Jan 2017, 16:20

Re: Client as Service

Post by MartinLentzsch »

Thanks. It seemed to be the problem.

Post Reply