cancel
Showing results for 
Search instead for 
Did you mean: 

[C#/.NET] Unable to make a connection to DI

Former Member
0 Kudos

Hi All.

I am trying to make a connection to the DI API, but no matter what I do I can't get it to work. I'm hoping someone can help me out here:

I am using the following connection code - it's simple and straight forward:


public void Connect()

{

     var c = new Company();

     c.Server = "192.168.158.206";

     c.DbServerType = BoDataServerTypes.dst_MSSQL2008;

     c.CompanyDB = "SSS_DEV";

    

     c.LicenseServer = "192.168.158.206";

     c.UserName = "masterk";

     c.Password = "Kat@53";

     string errorMsg;

     int errCode;

     try

     {

          int returnValue = c.Connect();

          c.GetLastError(out errCode, out errorMsg);

     }

     catch (Exception ex)

     {

          logger.Debug("Exception occurred:", ex);

          c.GetLastError(out errCode, out errorMsg);

     }         

}


When I run this and step through the code.. the first thing that happens when step thru with the debugger and hit line 3 is that the following dialog appears.. I have no idea why:



If I click "Try Again", then the debugger continues on. Has anyone seen this come up before? What is this?


Continuing on, when I try to connect, the return value from line 16 is -10, and the error message from the GetLastError call is  - The specified resource name cannot be found in the image file.


I am certain the credentials and connection info are correct.


Here is a screenshot of the DI API added to my project:


I then checked my licenses for my SAP server, and I am not sure if they are correct (BI License Administration Module -> License Administration)



the Components tab:



Can anyone help? I have no idea how to proceed from here.

thanks.



Accepted Solutions (0)

Answers (2)

Answers (2)

edy_simon
Active Contributor
0 Kudos

Hi Amit,

Complementing  ,

License Server should include the port also,

In your case :

c.LicenseServer = "192.168.158.206:30000"


Regards

Eyd


Former Member
0 Kudos

Edy Simon wrote:

Hi Amit,

Complementing  A. Kerremans,

License Server should include the port also,

In your case :

c.LicenseServer = "192.168.158.206:30000"


Regards

Eyd


I tried the connection with the port as well, and exact same results. I will see if a reinstallation of DI will help.

AdKerremans
Active Contributor
0 Kudos

hi Mait,

It looks like your DI api installation is corrupted.

Please remove the DI, and delete the folder and reinstall it.

Regards

Ad