Error: No connection could be made because the target machine actively refused it

Error: No connection could be made because the target machine actively refused it

Error:
The error message below may be seen in the FosVendorSyncService.log

12/20/2016 11:01:34 AM , Vendor Activation - Sync Started
12/20/2016 11:01:36 AM , No connection could be made because the target machine actively refused it
SOURCE: System
TARGETSITE: Void .ctor(System.String, Int32)
STACKTRACE: at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
at Pervasive.Data.SqlClient.Lna.ak.a6()
at Pervasive.Data.SqlClient.k.d()
at Pervasive.Data.SqlClient.k.ac()
at DDInt.Common.al.a6()
at DDInt.Common.d.b(l A_0, x A_1)
at DDInt.Common.ad.i()
at DDInt.Common.ao.bh(Object A_0)
at DDInt.Common.ad.a(Transaction A_0, ah A_1)
at DDInt.Common.d.a(Object A_0, l A_1, Boolean A_2, ah A_3)
at Pervasive.Data.SqlClient.PsqlConnection.Open()
at FosVendorSyncService.DataProviders.FosDataProvider.OpenConnection(String owner)
at FosVendorSyncService.DataProviders.FosDataProvider.GetOwner()
at FosVendorSyncService.DataProviders.FosDataProvider..ctor()
at FosVendorSyncService.BusinessProviders.FosBusinessProvider.GetVendorActivationList(Int32
Status)
at FosVendorSyncService.BusinessProviders.FosBusinessProvider.GetActivationMessageList()

Solution:
Edit the FosVendorSyncService.exe.config file line
<add key="FosConnectionString" value="Server=localhost;ServerDSN=FOSDATA" /> to replace 'localhost' with the server IP address or the DSN.