Cannot connect to SAP B1 9.1 server using SAPbobsCom.dll when using IP address

1

I have never seen this and searched a long time and without an answer, I have a need to connect to SAP B1 9.1 using the SAPbobsCOM.dll to sync user objects between our different instances of SAP. We can use the server name to connect to the local server, but the name does not resolve for the remote server and we need to use the IP address. Locally we get an error if we try to connect via IP address : The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) the same error if we try the remote server.

I have the reference added to the dll and there is no error accessing the methods or properties. Here is the code I use to connect:

var comp = new Company();
comp.DbServerType = BoDataServerTypes.dst_MSSQL2014;
comp.Server = "192.168.1.200"; // server name SAP91
comp.CompanyDB = "SBO_SAP91";
comp.LicenseServer = "192.168.1.200:30000";
comp.UserName = "Admin"; // SAP Admin user
comp.Password = "Admin";
var noth = comp.MinimalSupportedVersion;
var connected = (comp.Connect() == 0 ? "Connected" : "Not Connected");
System.Diagnostics.Debug.WriteLine(comp.GetLastErrorDescription());
var CONN = comp.CompanyName;

I am really unsure as to how I can connect and read all objects locally when using the server name but not quite sure why it doesn't work by IP address, any help on this would be appreciated as we have to manually sync the user objects until this can be resolved.

Thank you

connection
ip
sap
asked on Stack Overflow Apr 18, 2016 by theshwaguy

1 Answer

0

You did not registered the IP address in the SLD.

Regards.

answered on Stack Overflow May 19, 2017 by Enriquillo

User contributions licensed under CC BY-SA 3.0