Skip to main content

Notifications

Microsoft Dynamics AX (Archived)
Suggested answer

I have the error "AX Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

(0) ShareShare
ReportReport
Posted on by

Hi.

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

And

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.

*This post is locked for comments

  • Suggested answer
    sgoldyaev Profile Picture
    sgoldyaev 5 on at
    RE: I have the error "AX Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

    Some of our clients also has this error. After some research we rebuild our app with Prefer 32-bit and exception is gone.

    We are using Business Connector 5

    WinForm, .Net 4.7.1 

    x64 platform

  • Murugan.p Profile Picture
    Murugan.p 20 on at
    RE: I have the error "AX Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

    Thanks Marek.. My issue resolved by running the installer as admin..

  • PilgrimCZ Profile Picture
    PilgrimCZ 572 on at
    RE: I have the error "AX Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

    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. ;)

    Marek

  • Satyanarayan Sahoo Profile Picture
    Satyanarayan Sahoo 230 on at
    RE: I have the error "AX Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

    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 ?

  • MaartenDM Profile Picture
    MaartenDM 15 on at
    RE: I have the error "AX Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

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

  • Larry Reski Profile Picture
    Larry Reski on at
    Re: I have the error "AX Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

    "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.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: I have the error "AX Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

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

    UPDATE:

    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.

     

     

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: I have the error "AX Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

    Hi,

    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

    Ben

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans