cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP B1 Error -126 Failed to get license server address from SLD - SAP B1 Authentication Server

Fangio_Roegies
Newcomer
0 Kudos
172

Hi All,

I have an application (service) that uses DI-API.

With the new version 2502 it is not possible anymore to connect to the DI-API when an Identity Provider was activated:

Fangio_Roegies_0-1741278553567.png

I have followed the explanation of this document:

https://help.sap.com/doc/64cff8d4a2f041fb8cc6c2d5fe42a86c/10.0_SP_2502/en-US/2d099edcd3644a85ae328ea...

I have created an extension of type 'Daemon Service' in the Extension Single Sign On Manager.

I can sucessfully get an access token, and the company ID.

However when I use it to connect to the company I get this error message:

 

Fangio_Roegies_1-1741278746371.png

My code:

SAPbobsCOM.Company m_company = new SAPbobsCOM.Company();
m_company.AccessToken = accessToken;
m_company.CompanyID = companyID;
m_company.Server = server;
           
if (m_company.Connect() != 0)
{
    //Error
    MessageBox.Show("Error occured with code: " + m_company.GetLastErrorCode() + " " + m_company.GetLastErrorDescription());
}
else
{
    // Get the current company information
    SAPbobsCOM.CompanyInfo companyInfo = m_company.GetCompanyService().GetCompanyInfo();
    string message = string.Format("Company Name: {0}\nCompany Version: {1}",
		            companyInfo.CompanyName, companyInfo.Version);
	            MessageBox.Show(message, "Connected!");

    return m_company;
}

Any help would be appreciated!

 

 

View Entire Topic
TarekFatal
Explorer
0 Kudos

Hallo @Fangio_Roegies ,

To fix the SLD connection error you're seeing:

I've had this issue before. Check these thingsMake sure to explicitly set both servers
m_company.SLDServer = "your-sld-server:30000"; // The actual SLD hostname/IP
m_company.LicenseServer = "your-license-server:40000"; // Often same as SLD

The service layer needs both values, even though the client usually gets this automatically. For daemon services specifically, these connections need explicit parameters.

Also check that your firewall isn't blocking those ports and that the SLD service is running on the server.