Skip to Content
avatar image
Former Member

Connection to license server failed - Remote Only

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!

Add comment
10|10000 characters needed characters exceeded

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

  • Former Member Edy Simon

    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....

  • Get RSS Feed

1 Answer

  • Dec 28, 2016 at 02:02 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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