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

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 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 and doesn’t 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.


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.


There are some known issues in the BizTalk Server 2013 release that was 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 is 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 “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

Fortunately, I was able to find this problem in the BizTalk Server: List of Errors and Warnings, Causes, and Solutions TechNet Wiki article which led me to René Brauwers solution.

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 *


Back to Top