on 05-23-2013 10:19 AM
See my source code below:
//Connect to UI API
SboGuiApi SboGuiApi = new SboGuiApi();
string connString = Environment.GetCommandLineArgs().GetValue(1).ToString();
SboGuiApi.Connect(connString);
application = SboGuiApi.GetApplication();
// Connect to DI API (first company)
company1 = (SAPbobsCOM.Company)application.Company.GetDICompany();
// Connect to DI API (second company)
company2 = new SAPbobsCOM.Company();
string cookie = company2.GetContextCookie();
string connContext = application.Company.GetConnectionContext(cookie);
if(company2.SetSboLoginContext(connContext) == 0){
company2.CompanyDB = "dbname2";
company2.Connect();
if(!company2.Connected){
SAP.application.StatusBar.SetText(company2.GetLastErrorDescription(), BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
// STOP
}
}
System.Windows.Forms.Application.Run();
My add-on makes a DIAPI connection with 2 companies. This code worked well with SAPB1 8.82. When I did the upgrade to 9.0 PL04 previous week, my add-on no longer connects to the second company and gives this error: "Unable to connect with the specified username and or password".
What must be changed in my source code to make the connection of the second company to work again?
Thanks for you help!
Regards,
Pieter
Hi Pieter,
In new SBO 9 there is a new restriction in place for user login.
Basically, the same user may only login to the same company once.
But based on our testing, it is still very buggy.
I notice that you are connecting to different company. Yet you are getting the restriction.
Maybe you can open a ticket for support.
Based on my testing, if you connect the 2nd company by providing user name and password instead of using cookie, you should not get this problem.
Regards,
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it possible that SAP 1837139 is related to my problem?
1837139 - Error Message Appears When Using Multiple DI API Connection Method to Connect Add-Ons to SAP Business One
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pieter,
For more info on this new restriction, you can look for SAP Note 1815509
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This is because you have same Username of both companies. There are some limitations of 9.0..Please read it about the user login.
Regards,
Idrees
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I thought the same user can connect to as many companies as (s)he wants as long as the session is the same. Session in 9.0 is defined as client IP, windows user, windows session.
See SAP note 1815509: https://websmp130.sap-ag.de/sap%28bD1ubCZjPTAwMQ==%29/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F...
Hi,
Thus your Company 1 and 2 are have the same username and password? Or have you tried to hard code the username, password in your company 2?
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.