cancel
Showing results for 
Search instead for 
Did you mean: 

Error -131 when trying to connect .net addon update

Former Member
0 Kudos

Hi, Im updating to SAP version 9 (cloud), and I have a .net developer application running actually in SAP version 8.8, but when I updated my references to sapbobscom.dll to the new version, I got the -131 error code.  Could somebody help me with this issue please?

Regards

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Eric, Pieterjan thank you for your interest in help me with my issue, I was read a lot of documents that give me a better look of the change, and I was talked with the IT Administrator and he told me that we are migrate to SAP BO Version 9 into a cloud environment and our users are connecting by RDP service, that is the reason for that my add-on do not find the license server, by the way, the solution in this case taking a base on the documents that I was read is to install de B1WS service, I try to do that, but if you know about another way to establish a connection on this kind of environment I will very appreciate your advices.

Rewards

Former Member
0 Kudos

Hi Karlo,

Accessing by RDP (remote session) means that the addon has to be installaed on the server, or that the firewall is opened for the TCP ports used by B1 (the three for the License Server and the one for SQL-Server).

B1WS is an IIS extension which uses DI-Server and issue is going to be the same (else that this time, you'll need to open only the TCP port for IIS).

Regards,

Eric

Former Member
0 Kudos

Thank you Eric for help me with my problem.  I checked the point that you told me, I will try to explain more of my addon, this addon was created in Visual Studio 2005, therefore, it works only with Framework 2.0, in all versions of SAP I just reference the right version library SAPBobsCom, and i make the changes that my transactions need and all works fine, but now, I did the same thing and I am experimenting this inconvenient, I am not really sure if I need to specify an application property on my oCompany variable or the AddonIdentifier property.

I use this code to connect:

SAPbobsCOM.Company oCmp = new SAPbobsCOM.Company();

int lRetCode;

try

{               

   oCmp.Server = TxtServer.Text.Trim();

   oCmp.CompanyDB = TxtSBOCmpDB.Text.Trim();name of your company

   oCmp.UserName = TxtSBOUser.Text.Trim();

   oCmp.Password = TxtSboPassword.Text.Trim();

   oCmp.language = SAPbobsCOM.BoSuppLangs.ln_Spanish;

   oCmp.LicenseServer = TxtSBOLicSrv.Text.Trim();

   oCmp.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2008;

   oCmp.DbUserName = TxtSQLSUser.Text.Trim();

   oCmp.DbPassword = TxtSQLSPassword.Text.Trim();

   oCmp.UseTrusted = ChkTrueCnn.Checked;

   lRetCode = oCmp.Connect();

...

Regards

Former Member
0 Kudos

Hi Karlo,

For a DI only addon, this is not an issue to not connect thru the Application object. Not the issue, but you can remove the DbUserName and DbPassword (they are not mandatory since you're connecting thru the LicenseServer which holds these data).

In the cloud environment in which the addon is used, the addon is installed on the remote server? If no, which DI (8.x, 9.1 32bits, 9.1 64bits) is installed on the computer executing the addon?

Regards,

Eric

Former Member
0 Kudos

Hi Karlo

First of all:

You could try getting some more information by getting the last error description when your retValue is -131

Use:

String sErrorMsg = oCmp.GetLastErrorDescription()

Second ( and I'm not sure of this)

I think you're using too many 'parameters'

Try using only:

            oCompany.Server = _server

            oCompany.DbServerType = dbServerTypeEnum

            oCompany.CompanyDB = _companyDb

            oCompany.UserName = _userName

            oCompany.Password = _passWord

            oCompany.language = SAPbobsCOM.BoSuppLangs.ln_English

Former Member
0 Kudos

Hi Pieterjan,

LicenseServer is mandatory, but for sure too much parameters in the original code.

Which reminds me some installations' issues with hosted versions: the default port for the LicenseServer was not 30000 but 40000. Maybe Karlo should check this also?

Regards,

Eric

Former Member
0 Kudos

Hi Eric,

You might be very right that LicenseServer is required in some cases,

We're working on SAP B1 9.1 mostly and there it works without .LicenseServer.

It might be required in older versions (like 9.0) or for cloud-based installations.

Could you elaborate on this?

Former Member
0 Kudos

Hi Pieterjan,

Connection mechanism to DI was changed with 8.8 and now you have to provide the LicenseServer ("new" way) and because of this the DB credentials (saved Inside the LicenseServer) are optional. By the way, I remind to have answer a related question, for which the LicenseServer configuration was used to "hide" databases to specific users.

You can have a look at the help file (DI Reference / Company Object / Connect method) which explains this.

You can also have a look at http://scn.sap.com/docs/DOC-56935 where I described the various ways to connect onto a B1 server.

Regards,

Eric

Former Member
0 Kudos

Hi Karto,

Strangely not documented for me... But I'm sure I had it recentely.

I would verify in this order:

  • The proxies which are bound to the addon and in particular that the processor version is coherent between the addon and the DI (SBO) installed (64 bits addon with 32bits FAT client, not to have both the 32 and the 64 bits fat clients installed),
  • Check the DotNet Framework version used (way it is acting changes a lot between Framework 2 and 4) and if available migrate to Framework 4,
  • Check that B1 has been restarted after having installed the add-on (yes, stupid, I agree, but sometimes...),

Regards,

Eric