BAM Portal configuration error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Configuration)

  • Sandro Pereira
  • Feb 5, 2014
  • 3 min read

Last week, while making a simple BizTalk Server 2013 multi-computer environment (1 SQL Server and 1 BizTalk Server, both running Windows Server 2012) configuration, I faced several issues to properly configure the BAM Portal; this was the first one.

I was able to properly configure all the features: Enterprise SSO, Group, BizTalk Runtime, Business Rules Engine, BizTalk EDI/AS2 Runtime, and even BAM Tools without any kind of problem; however, every time I tried to configure BAM Portal, I was getting the following error:

BAM Portal: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Configuration)

Unexpected exception occurred while configuring BAM Portal

When checking the BizTalk Server Configuration log file, we were able to see something like the following message:

[datetime … Error Configuration Framework] Feature: [BAM Portal] Failed to configure with error message [<Exception Message=”Unexpected exception occurred while configuring [BAM Portal].” Source=”” HelpID=””><Exception Message=”Attempted to read or write protected memory. This is often an indication that other memory is corrupt.” Source=”Configuration” HelpID=”” /></Exception>]

However, this is the generic message and doesn’t give us the real cause, nor does it help us track the problem.

Suggestion: When this appends, don’t get stuck in that line, you should continue to read the log file because you will find useful and valid pieces of information!

In this case, the real problem was:

[datetime … Error ConfigHelper] Cannot alter the role ‘NSSubscriberAdmin’, because it does not exist or you do not have permission.

📝 One-Minute Brief

When configuring the BAM Portal in BizTalk Server 2013, you might encounter a misleading “protected memory” error. This is often caused by a missing SQL role, NSSubscriberAdmin, in the BAMAlertsApplication database. The solution involves manually creating this role or applying the latest BizTalk Cumulative Updates to fix the underlying configuration logic.

Cause

The BizTalk Server Configuration Tool is trying to add the “BAM Management Web Service user” that was specified in the BAM Portal section into a database role called “NSSubscriberAdmin”, which doesn’t exist in the BAM Alert Application Database (BAMAlertsApplication), and for that reason, it raises this exception.

Solution

There are some known issues in the BizTalk Server 2013 release that were fixed in the Cumulative Update 1, especially this one regarding BAM Tools: KB article 2832137 – FIX: BAM tools cannot be configured in a multi-node BizTalk Server 2013 environment. I know it’s not exactly the same error; nevertheless, I advise that before you try to configure BizTalk Server 2013, you should apply the CU’s available.

However, in my case, to solve the problem, you must manually add NSSubscriberAdmin Database Role to BAM Alert Application Database (BAMAlertsApplication) by:

  • Expand a server group, and then expand a server.
  • Expand Databases, and then expand the BAMAlertsApplication database.
  • Expand Roles. Right-click over Roles and select the New Database Role option.
Add SQL NSSubscriberAdmin Database Role
  • In the Name box, enter the following name: NSSubscriberAdmin.
  • Click OK.

Alternative you can use the following SQL Query:

USE BAMAlertsApplication
CREATE ROLE NSSubscriberAdmin AUTHORIZATION dbo
GO

Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son. 

Thanks for Buying me a coffe

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top