关于SBO Addon Connection Timed out 连接增强器超时[解决方案]
private void SetApplication()
{
//*******************************************************************
//使用SBOGUIAPI對象建立連接,并初始化應用程序對象
//*******************************************************************
SAPbouiCOM.SboGuiApi SboGuiApi = null;
string sConnectionString = null;
SboGuiApi = new SAPbouiCOM.SboGuiApi();
//// by following the steps specified above, the following
//// statment should be suficient for either development or run mode
sConnectionString = System.Convert.ToString(Environment.GetCommandLineArgs().GetValue(1)); //该方式不会出现。正常
//sConnectionString = "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056";//该方式会出现启动ADDON连接超时,但ADDON启动是成功的。
//連接運行中的SBO Application(Connects to a running instance of a SAP Business One application.)
SboGuiApi.Connect(sConnectionString);
//// get an initialized application object
//得到初始化后的應用對象
//Returns an Application object initialized by the previous call to the SboGuiApi.Connect method. Public Properties
SBO_Application = SboGuiApi.GetApplication(-1);
}
{
//*******************************************************************
//使用SBOGUIAPI對象建立連接,并初始化應用程序對象
//*******************************************************************
SAPbouiCOM.SboGuiApi SboGuiApi = null;
string sConnectionString = null;
SboGuiApi = new SAPbouiCOM.SboGuiApi();
//// by following the steps specified above, the following
//// statment should be suficient for either development or run mode
sConnectionString = System.Convert.ToString(Environment.GetCommandLineArgs().GetValue(1)); //该方式不会出现。正常
//sConnectionString = "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056";//该方式会出现启动ADDON连接超时,但ADDON启动是成功的。
//連接運行中的SBO Application(Connects to a running instance of a SAP Business One application.)
SboGuiApi.Connect(sConnectionString);
//// get an initialized application object
//得到初始化后的應用對象
//Returns an Application object initialized by the previous call to the SboGuiApi.Connect method. Public Properties
SBO_Application = SboGuiApi.GetApplication(-1);
}
While creating final ard file dont use any connetion string .
1) REmove connection string.
2) Rebuild application.
3) Create ARD file.
详情查看SAP NOTE 912572 1) REmove connection string.
2) Rebuild application.
3) Create ARD file.
https://websmp206.sap-ag.de/notes