Skip to Content

Issue B1_DIInternalFields90.dll w3wp.exe crashes

Apr 24, 2017 at 07:43 AM


avatar image

Hello Everyone,

Overview about my app :

I have created the web-service (asmx) and integrated DIAPI in it. I am exposing Add Business Partner and Update Business Partner method. Those 2 method will help caller application to Add / Update business partner through our services. One more thing : user will be sending single business partner at a time for any of the 2 operation. In short if the user want to add 1000 business partner then the caller application will call our services 1000 times & the same for update method as well. In short its one BP at a time.

Issue :

When the user performs this action in bulk for e.g 10000 BP for Add / Update then at some points w3wp process crashes & below are the issue details I have trapped in th event viewer pls have a look at it. Suggest me solution on this error :

Faulting application name: w3wp.exe, version: 8.5.9600.16384, time stamp: 0x52157ba0
Faulting module name: B1_DIInternalFields90.dll, version:, time stamp: 0x581712a4
Exception code: 0xc0000005
Fault offset: 0x00013eb5
Faulting process id: 0xe54
Faulting application start time: 0x01d2bb2a098e0a4b
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Program Files (x86)\SAP\SAP Business One DI API\DI API 90\B1_DIInternalFields90.dll
Report Id: 57109d74-2727-11e7-8188-029f6db918f5
Faulting package full name: 
Faulting package-relative application ID: 

Some in-sights about my code :

Previously I thought I was not disposing the object appropriately so I doubled checked & didn't any issue so have a look at my below code and let me know in-case of any changes required.

BusinessPartners objBusinessPartners = null;
ContactEmployees oBPContactPerson = null;
SAPbobsCOM.Company oCmpy = null;

// Setting some logic for oCmpy connection object

objBusinessPartners = (SAPbobsCOM.BusinessPartners)oCmpy.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners);
Some Logic

if (oCmpy.Connected == true) { oCmpy.Disconnect(); System.Runtime.InteropServices.Marshal.FinalReleaseComObject(oCmpy); oCmpy = null; }
if (objBusinessPartners != null) { System.Runtime.InteropServices.Marshal.FinalReleaseComObject(objBusinessPartners); objBusinessPartners = null; }
if (oBPContactPerson != null)
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(oBPContactPerson); oBPContactPerson = null; }

Guys I feel I am able to explain in-detail but if in-case of any additional information pls pls do let me know & awaiting for your feedback.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Rahul Jain May 01, 2017 at 06:23 AM


I was struggling on this issue for such a long time & I tried alot from my side to fix but nothing was seems to work so me along with my mate Mr Pravin have sat for one last time & this time we managed to fix this issue.

Fix : I was opening & closing the connection everytime in my Add & Update method because of which w3wp.exe was getting crashed, so please open this connection only 1 time which I handled in Global.asax file. If anyone looking out for the code pls PM me will be glad to help anyone.

Also about this error : Faulting modulename: B1_DIInternalFields90.dll there are quite a number of possibility where I stumble upon this issue & those are as follows :

  1. Passing NULL Instead of blank.
  2. Passing '' where we have master values in the dropdown but we have not added '' as an option in the list.

So ping me up, Will be glad to help anybody facing this issue.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Rahul,

Can you share your code fragment please! I have the same issue.



Sorry for replying you late... just now I saw ur comment, ur still looking for the fix?

DIEGO LOTHER Apr 24, 2017 at 12:29 PM

Hi Rahul,

Look this link: maybe helps you.

Kind Regards,

Diego Lother

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks Diego Lother for your reply. I have gone through your link & have some queries related to that...

  • .Net Garbage Collector doesn't dispose com components so why we need to call GC ?

Also adding to that today one new error,

"A process serving application pool 'TestServices' suffered a fatal communication error with the Windows Process Activation Service. The process id was '11868'. The data field contains the error number."

- <Event xmlns="">
- <System>
<Provider Name="Microsoft-Windows-WAS" Guid="{524B5D04-133C-4A62-8362-64E8EDB9CE40}" EventSourceName="WAS" />
<EventID Qualifiers="32768">5011</EventID>
<TimeCreated SystemTime="2017-04-25T06:15:51.000000000Z" />
<Correlation />
<Execution ProcessID="0" ThreadID="0" />
<Security />
- <EventData>
<Data Name="AppPoolID">TestServices</Data>
<Data Name="ProcessID">11868</Data>


Hi Rahul,

The GC.Collect() method will reclaim the memory associated with dead objects.

Unfortunately I unknow the error that you mentioned. :|

Kind Regards,

Diego Lother

avatar image
Former Member May 09 at 06:34 AM

Hi, I hope this helps someone.

in my service I had the same problem.

I solved it by keeping the connection active. I solved it by keeping the connection active, that is, never release or disconnect the object "Company".


10 |10000 characters needed characters left characters exceeded