Skip to Content
0

Connection to license server failed - Remote Only

Dec 26, 2016 at 11:30 AM

62

avatar image

hi

im trying the simple sample app in the b1 sdk

here is my code

    Private Sub ConnectToCompany()
        oCompany = New SAPbobsCOM.Company
        oCompany.Server = "99.99.99.99"
        oCompany.CompanyDB = "SBODemoUS"
        oCompany.UserName = "manager"
        oCompany.Password = "manager"
        oCompany.language = SAPbobsCOM.BoSuppLangs.ln_English
        oCompany.DbUserName = "MYNAME"
        oCompany.DbPassword = "MYPASS"
        oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2012
        oCompany.UseTrusted = False
        oCompany.LicenseServer = "99.99.99.99:30000"
        oCompany.Connect()
        oCompany.GetLastError(lErrCode, sErrMsg)
        If lErrCode <> 0 Then
            MsgBox(sErrMsg)
        Else
            MsgBox("Connection Established", MsgBoxStyle.Information)
        End If
    End Sub

when i run it on the machine where sap is installed the connection gets established OK. but when i run it from my dev machine i get the following error:

-131: Connection to license server failed; if license server address is invalid, correct it; if TAO NT Naming Service stopped, activate it and restart License Manager

the port 30000 is open on the server (i checked on on yougetsignal), the credentails are obviuosly ok, since they work correctly on the server.

how can i get it to work on my dev machine?

thanks in advance!

10 |10000 characters needed characters left characters exceeded

is your 99.99.99.99 the correct IP address of your server as seen by this dev machine ?

0

hi. no.

this is just a dummy address for security reasons. in my code i have the correct ip. so is MYNAME and MYPASS. they're just placeholders.

thanks. waiting for getting this to work....

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Edy Simon Dec 28, 2016 at 02:02 AM
0

Hi,

Can you try on this simplified code :

Private Sub ConnectToCompany()
        oCompany = New SAPbobsCOM.Company
        oCompany.Server = "99.99.99.99"
        oCompany.CompanyDB = "SBODemoUS"
        oCompany.UserName = "manager"
        oCompany.Password = "manager"
        oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2012
        oCompany.LicenseServer = "99.99.99.99:30000"
        oCompany.Connect()
        oCompany.GetLastError(lErrCode, sErrMsg)
        If not oCompany.Connected Then
            MsgBox(sErrMsg)
        Else
            MsgBox("Connection Established", MsgBoxStyle.Information)
        End If
    End Sub

Also, try to ping the IP address from your dev.
If still not working, you may need to delete the %temp%\sm_obs_dll folder.
Or try re-installing the DI API.

Regards
Edy

Show 1 Share
10 |10000 characters needed characters left characters exceeded

hi

thank you for your help. here are the results:

1. with the code you posted, i get a different error:

The TAO NT Naming Service has stopped

i tried restarting the tao nt naming service as well as the license manager service, but to no avail

2. pinging worked ok. which was expected since if ping doesnt work, how can i get errors from the server? [also, i rdp to that server all the time]

3. deleting the %temp%\sm_obs_dll (which by the way had "64" in the name) made no difference, neither to your code nor to mine

4. where to reinstall the di-api? on server or my dev machine. on my machine its a fresh install from the day i started working on it (about 3 days ago)

thank you

0