cancel
Showing results for 
Search instead for 
Did you mean: 

SAPbobsCOM.Company connect/disconnect problems

0 Kudos
495

Hi SAP Experts,

We're making a software integration between our POS system and SAP BO.
In this scenario, a lot of sales are generated on POS and need to be sent in realtime (~100 sales/minute).

The code was developed in C#, with SAPbobsCOM, deployed as a SoapWebservice, running on IIS.

Basically, we are doing something like this:

SAPbobsCOM.Company sboCompany = new SAPbobsCOM.Company();
try {
    sboCompany.Connect();<br>    // Do a lot of things using GetBusinessObjects(...) 
} finally {<br>    oCompany.Disconnect();
    Marshal.ReleaseComObject(sboCompany);
    sboCompany = null;<br>}

The problem:

Sometimes, after disconnect, we have an exception on IIS (w3wp.exe). This exception is a windows message that freezes all following requests to webservice.

Debugging the source code, we are thinking that connect/disconnect can be the cause.

Is there some good practice to handle SAP connections?

Accepted Solutions (0)

Answers (0)