cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting via Windows Service in VB .NET

Former Member
0 Kudos

Hi,

I have a solution which has 2 projects. One of the projects is a dll and the other is a windows service. In the dll I have a function which connects to several databases. I call that function when the windows service is starting.

The problem is that it doesn't connect to the databases, it gives me the next error:

-111 Connection to SBO-Common has failed

I have tried the function in an other application and it goes ok. Why does this happen?

Thanks in advance,

Vanesa

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi!

I think the windows service is using a different systemaccount that your other application, and that account does not have rights to read the sbo-common database.

You can change the account used by your service on the service definition or in the SERVICES application of Windows.

Sir Harold

jaccomoolenaar
Participant
0 Kudos

Hi Vanesa,

We have had this error before. It was a license problem. If I remember correctly the addon license was not flagged for the user which connected to the database.

Hope this information helps you.

Regards,

Jacco

Former Member
0 Kudos

Hi! Vanesa,

For .Net/Windows Services you have to add a web reference. Did you do that?

Anuj