cancel
Showing results for 
Search instead for 
Did you mean: 

2004 Registering Add On Connection Timed Out

Former Member
0 Kudos

Hi I am having a bit of trouble getting an addon to register and load successfully in SBO 2004...

I can get the Add On to Install properly, however when I load it, I get the error :

Add-on connection timed out

This occurs even though the add on has successfully loaded in the background and is running. In the Add On Manager the status of the add on is set to Failed...

I tried setting the AddonIdentifier string before connecting in my code using the Add-on Identifier Generator (Development and Implementation strings but these did not help)

The Helloworld sample was a good help getting thus far, but even when try to install that as an add it disconnects straight away.

Any help much appreciated!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi daniel,

i am facing the similar problem.

could you please help me in finding the solution.

I tried to hardcode the connectionstring also, but still problem persists.

AdKerremans
Active Contributor
0 Kudos

Hi,

If your addon is set mandatory, it is a known bug and not solved yet in patch 30.

Sometimes the addon times out, but the addon is started.

for the time being set your addon to automatic and it will work.

Ad

Former Member
0 Kudos

hi AD,

it is automatic, but still problem persist.

i tried on patch 14 and 26.

and i also tried to install hello world example and tried to change the version everytime.

still it shows failed status and connection timed out even though i gave 600 seconds to hello world example.

.can you post your .ard file content and the way you make company object connection and any extra command line augument to be passed either in addon.exe, installer.exe or in .ard file....

please help!!!!

thanks in advance

Agneesh

Former Member
0 Kudos

hi daniel,

i am facing the similar problem.

could you please help me in finding the solution.

I tried to hardcode the connectionstring also, but still problem persists.

Former Member
0 Kudos

Hi I solved this problem through a couple of changes:

1) I upgraded to the latest 2004A patch (5)

2) I was hard coding the development connection string!

former_member185703
Active Contributor
0 Kudos

Hi Daniel,

The connection string indicates which "instance" of the SAP Business One application (the EXE) started the Add-On.

Therefore using the development connection string can only work, if only 1 SAP Business One application is running.

In addition, there is no guarantee that this string will also work in future.

So, basically you have to fix the real problem.

Maybe you might want to post some code?

Regards,

Frank

Former Member
0 Kudos

Hi Frank,

I think the problem was the fact that I was hardcoding the connection string. After I changed it to accept it through the command arguments that the SAP application passes in it seems to connect fine - below is the procedure that I use to connect, I have left the commented lines in to show you how i was trying to connect. I am still unsure as to when to use the AddonIdentifier property however.

I have the add-on working 85% well now, but have posted again at any input on this post would be very appreciated!

Thanks,

Daniel

private bool SingleSignOn()

{

SAPbouiCOM.SboGuiApi objGui = new SAPbouiCOM.SboGuiApi();

objCompany = new SAPbobsCOM.Company();

string strCookie;

string strConnection;

long lngConnectResult;

try

{

//objGui.AddonIdentifier = "4CC8B8ACE0273A61489738C94047855DE8768CDD37F64D4F11E82759A542BD515D5A6E4F50A19B939FBB0FA844FA35C7B604E771";

//objGui.Connect("0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056");

objGui.Connect(Environment.GetCommandLineArgs().GetValue(1).ToString());

objApplication = objGui.GetApplication(-1);

strCookie = objCompany.GetContextCookie();

strConnection = objApplication.Company.GetConnectionContext(strCookie);

if(objCompany.Connected)

objCompany.Disconnect();

lngConnectResult = objCompany.SetSboLoginContext(strConnection);

if(lngConnectResult != 0)

{

System.Windows.Forms.MessageBox.Show("Connection failed, make sure SAP Business One is running and you are logged into a Company");

return false;

}

lngConnectResult = objCompany.Connect();

}

catch

{

System.Windows.Forms.MessageBox.Show("Connection failed, make sure SAP Business One is running and you are logged into a Company");

return false;

}

return true;

}

Former Member
0 Kudos

Hi Frank,

Any chance you could shed some light on the questions poset at the thread:

Thanks,

Daniel