BAM Exception (Failed to list permissions for BAM view) and Resolution Document

1. The issue that our one of the client was facing in regards to accessing the BAM portal was that when accessing the portal from a server other than the one where BAM was set up, the following error was encountered:

image

In order to fix this, the first step was to implement the second code snippet above in the web.config file for BAM (in IIS). The other fix for this was to use the IP address of the server instead of the machine name (so xx.xx.xx.xx instead of <HostName> as above).

2. The next problem encountered was that on the PROD server, the BAM portal and the ExceptionsManagement section was accessible as below:

image

However, in QAT, the same was not true – as below:

image

And if the PROD link was modified for QAT, the following error was encountered

image

In QAT (where this problem was being encountered), the user was granted viewing rights using the command:

C:\Program Files\Microsoft BizTalk Server 2006\Tracking>bm.exe add-account -AccountName:<domain>\<username> -View:Exceptions

This resulted us in getting as far as below:

image

We received the following error in

Microsoft.BizTalk.Bam.Management.BamManagerException: Failed to list permissions for BAM view. —> System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
at System.Data.SqlClient.SqlBuffer.get_String()
at System.Data.SqlClient.SqlDataReader.GetString(Int32 i)
at Microsoft.BizTalk.Bam.Management.SecurityModule.ListViewPermissions(String viewName, String& dboUsername)
— End of inner exception stack trace —
at Microsoft.BizTalk.Bam.Management.SecurityModule.ListViewPermissions(String viewName, String& dboUsername)
at Microsoft.BizTalk.Bam.WebServices.SecurityHelper.VerifyViewPermissions(String viewName, IPrincipal user, BamManager bamManager, Boolean throwIfNoPermissions)
at Microsoft.BizTalk.Bam.WebServices.SecurityHelper.VerifyViewPermissions(String viewName, IPrincipal user, BamManager bamManager)
at Microsoft.BizTalk.Bam.WebServices.Management.BamManagementService.GetViewDetailsAsXml(String viewName)

The resolution to the final piece of the above puzzle was found through the blog:

http://sandroaspbiztalkblog.wordpress.com/2012/12/04/bam-portal-errors-failed-to-list-permissions-for-bam-view-system-data-sqltypes-sqlnullvalueexception-data-is-null-this-method-or-property-cannot-be-called-on-null-values/

Put in simple terms, the issue was around the fact that the DB role for accessing the view had a few account entries (user logins) that had been deleted from the AD. To find the accounts that had been deleted, the following SQL command was fun against the BAM Primary Import database:

USE BAMPrimaryImport

GO

Select Name,SID,SUser_SName(SID) as UserAccount from sysusers WHERE ISLogin = 1 AND issqluser = 0 AND isntuser = 1

Once the users that had been deleted from the AD had been determined (because their AD login was set to NULL in the result set), those users were removed from the DB role for accessing the Exceptions view on the BAM Primary Import database.

clip_image001

Finally, the users who required access were added to the role and the issue was resolved.

Hope this helps! If you require more information, please let me know.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s