cancel
Showing results for 
Search instead for 
Did you mean: 

SAP B1 DI API problem within IIS only

0 Kudos

Hello,

I have a problem with my WEB solution that some times it's crash when i execute a code of SAP B1, for example I'm using the following code to get the item price:


var itemPriceParams = (SAPbobsCOM.ItemPriceParams)company.GetCompanyService().GetDataInterface(CompanyServiceDataInterfaces.csdiItemPriceParams);

            itemPriceParams.CardCode = cardCode;

            itemPriceParams.ItemCode = itemCode;

            itemPriceParams.UoMEntry = uomEntry;

            itemPriceParams.Currency = currency;

            itemPriceParams.Date = deliveryDate;

            return (SAPbobsCOM.ItemPriceReturnParams)company.GetCompanyService().GetItemPrice(itemPriceParams);

The executions of this code crash the IIS and all user's will lose their sessions.

I tried to call the same function with SAME dll (I'm using SAPBusinessOneSDK.dll) and in windows application and it didn't crash.

In IIS i enabled the 32bit application, and i tried to put the identity of application pool as local system, still no success.

What could cause those kind of issues i tried a lot of solutions but with no success.

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

AdKerremans
Active Contributor
0 Kudos

Dear Noor,

I have seen this more time with IIS.

I would advise you to separate the IIS application and the DI API part.

make a service that listens to a port and send your request from tjhe IIS application to that port and return the answer as XML.

Kind regards

Ad

0 Kudos

Dear A. Kerremans,

Thank you for the suggestion, i will take it in consideration ... but i really hope for a solution within the IIS

former_member183373
Active Participant
0 Kudos

Hello Noor,

You can try installing both 32 - 64 bit versions of the DI API to your IIS server. And also try creating both x86 and 64x version of your web service too.

I know this doesn't explain too much but I had a problem similar problem with IIS. Same code block that works in windows form application was failing in web application. I solved it by installing 32 Bit DI API.

Kind Regards,

Atilla

Hello Atilla,

I tried to install DI API 64 BIT on the web server, and i kept the 32 bit version installed.

At the beginning it didn't work, same crash occurred, but then i changed the application pool "Enable 32bit" to False then everything works correctly without crash WOOHAAAA .

Thank you Atilla.

Best Regards,

Noor

Answers (0)