Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

SAP B1 remote connection through DI API crashes with no exception nor error

$
0
0

I have SAP B1 8.8 installed on a computer along with SQL Server in the same computer. I made an application that connects

 

to SAP through DI API in C#. When I run the application in the same computer where the SAP and SQL server are installed,

 

it works fine. When I run the C# application over the network the application cannot even connect to the company, it simply

 

crashes and says that it stops working. No exception thrown, no error, no nothing, it simply crashes. Strange thing is that,

 

I can get the companies but not connect to them, here is the connection code:

 

          try

          {

            _sapCompany                           = new SAPbobsCOM.Company();

            _sapCompany.language             = SAPbobsCOM.BoSuppLangs.ln_English;

            //_sapCompany.UseTrusted        = true;

            _sapCompany.Server                 = serverBox.Text;

            _sapCompany.DbUserName       = siteuserBox.Text;

            _sapCompany.DbPassword        = sitepassBox.Text;

            _sapCompany.DbServerType      = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2008;

            _sapCompany.LicenseServer      = "192.168.1.102:30000";

 

             SAPbobsCOM.Recordset recorset = _sapCompany.GetCompanyList();

 

           _sapCompany.UserName            = sapuserBox.Text;

            _sapCompany.Password            = sappassBox.Text;

            _sapCompany.CompanyDB        = System.Convert.ToString(recorset.Fields.Item(0).Value)

            _sapCompany.Connect();

          }

 

As I mentioned, the aplication does not send any exception, just crashes as soon as it reaches the Connect() method.

 

Computer where the c# is running can see with no problem the computer where SAP and SQL server are, because

I can get the company list.

 

I do not know what could be causing this problem since app only crashes, does not send any error message nor exception. I only installed

 

SAP client and DI API to computer with c# application.

 

Any thoughts??


Viewing all articles
Browse latest Browse all 9159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>