Question Status

Leonardo Catzin asked a question on 14 Jan 2011 2:34 PM


We have a web service developed in Visual Basic .Net, 2008.

The service is installed in IIS7 (Win 2008). The website is configured to use the business connector in the app pool. Ax 2009 has the  business connector proxy user configured in the system accounts.

The web service invoke a static function of AX. The function has a parameter of type string. This string is in XML format . When the string is short works fine, but when the string is long (more than 50 characters) fails and the result is the following:

AX Attempted to read or write protected memory. This is often an indication that other memory is corrupt

In Event viewer we have two events:

EventID 110

Source: Dynamics .NET Business Connector 5.0

Attempt to clear pointerMap when it still contains objects


EventID 110

Source: Dynamics .NET Business Connector 5.0

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

at BCLogon(LOGON_INFO* , SesPblk_t** , Char** )

at Microsoft.Dynamics.BusinessConnectorNet.Axapta.Logon(BC_PROXY_ACCOUNT_INFO* pBCProxyAccountInfo, String company, String

If the function is executed in AX with the same information the result is OK.

What could it be?

Thank you.

Ben responded on 4 Mar 2011 3:18 AM


I have similar symptoms (same error events) with an Enterprise Portal based add-on; a main difference though is that while the trigger of your issue seems to be identified (string length), ours is irregular and time/activity dependant (everything ok after an IIS restart, gets worse with time afterwards).

FYI I just opened an MS incident about it; our first action was to set the recycling options for the application pool (Regular Time Interval) to a duration smaller than the regular crashes, e.g. a few hours - too early to draw conclusions though.

May I ask if you found out anything about your own problem?

Thanks in advance


Jonas Bergman responded on 6 Mar 2011 11:27 PM

I have had similar problems. They disappeared when I installed the latest kernel.


I did not find a corresponding KB Article, but since I had some problems, I installed the Kernel rollup 6 after reading the following in the Rolllup description:

Assume that you try to access values in the Web session. However, if the LogonAs call is not logged off immediately, when the build-in webSession function is called from the .Net Business Connector, you receive an error message in the event viewer.

The different problems that I had disappeared after installing this version.



Larse responded on 15 Mar 2011 5:43 AM

"AX Attempted to read or write protected memory" is a general error for many possible issues.  

1. Mixing kernel versions or builds in a single machine or between the AOS and .NET BC

2. Promoting code to the AOS but not restarting applications using the .Net BC

3. Problems in coding of the .NET BC

You need to understand changes to code or environment while the .NET BC has been running, has the AOS been restarted while the .NET BC has been running.  Review the AOS and application event logs from both server and understand the sequence of events in time.

MaartenDM responded on 27 Feb 2013 3:35 AM

I had received same error in AX2012 - CU3 environment. But we don't use the business connector.

Satyanarayan Sahoo responded on 12 Mar 2014 4:36 AM

Hi Leonardo,

Exactly the same i am getting the exception in Eventvwr in PRODUCTION.And production is having AX 2009 RU7.

Is it required to install RU8 to fix this ?

Marek Novotný responded on 19 Oct 2015 6:17 AM

Hi all,

just fast info. I got same error - "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." - when setup was not launched with Run as Administrator. No depend on that I was logged on machine as local admin.

Stupid, but may help. ;)