Posts Tagged ‘BAM Portal’

Today while doing a BAM POC to one of my clients, I found a number of problems/errors, some of them unexpected and uncommon, while trying to deploy my BAM definition file.

In order to contextualize the problem, for this POC we are using only one BizTalk Server machine with BAM Portal, one dedicated SQL Server and Analysis Server and Integration Server in another dedicated server. So, more or less a simple Multi-Computer Environment.

In this post I will address the most unusual of them:

Deploying Activity… Done.
Deploying View… ERROR: The BAM deployment failed.
Could not load file or assembly ‘Microsoft.SqlServer.ASTasks, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified.

CAUSE

Well, the cause the cause is quite obvious by its description. Microsoft.SqlServer.ASTasks assembly is missing or some of its dependencies, although, the environment has been installed, configured and functioning correctly, i.e., everything was working properly with exception of BAM deployment.

My first suspicion (which ultimately turned out to be right), and because, as I told before, SQL Server is remote was that not all the SQL Server Client Tools components were installed in the BizTalk Server machine.

This suspicion was confirmed when I open the SQL Server 2014 Management Studio console. Because the machine only had the “Management Tools – Basic” feature installed.

SQL-Server-Management-Tools-Basic-feature

The “differences” between basic and complete are:

  • Management Tools – Basic: includes support for the Database Engine and SQL Server Express, SQL Server command-line utility (SQLCMD) and SQL Server PowerShell provider
  • Management Tools – Complete:  as the name implies, you get it all. It adds support Reporting Services, Analysis Services and Integration Services technologies.

Because support for Analysis Services is required in BizTalk Server machines while deploying the view definition, this error occurs.

SOLUTION

To solve this problem, you must install also, on BizTalk Server machine, the “Management Tools – Complete” shared feature. To do that you need:

  • Clicking in the “Compatibility View” button that appears in the Address bar to display the site in Compatibility View.
  • Run SQL Server 2014 setup program.
  • On the SQL Server Installation Center, click Installation.
  • Click New Installation or Add Features to an Existing Installation.
  • Review the information on the Setup Support Rules screen, and then click OK.
  • On the Product Key screen, enter your product key and click Next.
  • On the License Terms screen, select I accept the license terms, and then click Next.
  • On the Setup Support Files screen, click Install.
  • On the Feature Selection screen, select the following features, and then click Next.
    • Shared Features
      • Management Tools – Basic
      • Management Tools – Complete

Once “Management Tools – Complete” is installed, you will be able to deploy your BAM definition file.

In my last post I wrote about BAM Portal running in Internet Explorer 11, the browser we normally have in the BizTalk Server machine. However BAM Portal can and should be remotely accessed by the users and not directly from the server.

But this can leads us to other problems. Each user has his own preference regarding to browsers, some of them like Google Chrome, others Firefox and other IE. As recently I upgrade my laptop to Windows 10, I took this opportunity to validate the BAM Portal behavior in different browsers, including the new browser from Microsoft – Microsoft Edge

Microsoft Edge

As I expected BAM Portal does not perform well with the new Microsoft Edge browser. It ask the authentication credentials with a nice window, with a very clean layout

BAM-Portal-Microsoft-Edge-authentication

But after that you still have the same compatibility problem between Internet Explorer and the site: the menu have problems and you cannot select the columns to perform the queries

BAM-Portal-Microsoft-Edge-compatibility-problems

But unfortunately for us Microsoft Edge doesn’t have the compatibility view option, instead you have to use the option “Open with Internet Explorer”

BAM-Portal-Microsoft-Edge-open-with-IE

Conclusion: BAM Portal is not supported on Microsoft Edge.

Internet Explorer 11

Again BAM Portal does not perform well with IE11 as I described in my last post: Running BAM Portal in Internet Explorer 11: Enable Compatibility view and to fix all the problems you need to add this site to the “Compatibility View Settings”

Once you turn on Compatibility View, Internet Explorer will automatically show the BAM Portal in Compatibility View each time you visit fixing all the previous behaviors problems.

BAM-Portal-IE11-compatibility-problems-fixed

Conclusion: IE is the best browser to run BAM Portal

Google Chrome

I did not have much hope that Google Chrome will be any different. And again when we try to access BAM Portal a popup asking the authentication credentials is presented

BAM-Portal-Google-Chrome-authentication

But after that you still have the same compatibility problem, again the menu have problems and you cannot select the columns to perform the queries

BAM-Portal-Google-Chrome-compatibility-problems

Google chrome doesn’t have the “Compatibility View Settings” option that exists in IE however there are some extension that you will find in chrome web store like “IE Tab” that will display web pages using IE within Chrome

BAM-Portal-Google-Chrome-IE-Extension

After installing this extension you will have an option in the right corner of the browser to display BAM Portal using IE within Chrome

BAM-Portal-Google-Chrome-IE-Tab-Extension

And using this technique you will be able to run BAM Portal in chrome

BAM-Portal-Google-Chrome-compatibility-problems-fixed

Mozilla Firefox

The exact same behavior happens in Firefox, the authentication popup is presented but after that you still have the same compatibility problem, again the menu have problems and you cannot select the columns to perform the queries

BAM-Portal-Firefox-authentication

BAM-Portal-Firefox-compatibility-problems

As with Chrome, Firefox also does not have the “Compatibility View Settings” option and also relies in extensions like “IE Tab” to render the page using IE

BAM-Portal-Firefox-IE-Extension

After installing this extension, by right click over the BAM Portal you can find the option “View Page in IE Tab” and this will do the trick for you

BAM-Portal-Firefox-IE-Tab-Extension

A new windows asking credentials is shown and after that you will have BAM Portal running fine in Firefox

BAM-Portal-Firefox-compatibility-problems-fixed

In short, Microsoft Edge does not support BAM Portal. IE is the best browser to run BAM Portal and you can run BAM Portal in Chrome of Firefox using extensions to emulate IE.

Sometimes websites don’t look like you expect them to. Images might not appear, menus might be out of place, and text could be jumbled together. This might be caused by a compatibility problem between Internet Explorer and the site you’re on and most of the times this behavior can be fixed by adding the site to your Compatibility View list.

Compatibility View was introduced in Windows Internet Explorer 8 to help existing content continue to work with Windows Internet Explorer 7, while developers updated their content to support modern interoperable web standards. Well, unfortunately for us, BAM Portal never was updated and continues to have problems of compatibility.

BizTalk-Server-2013-R2-BAM-Portal-IE11-compatibility-problems

As always one of the downsides of dealing with a new versions of products like IE and so on… is figuring out where some features/options have moved in this new release. And this exactly one of this cases…

“Starting with IE11, document modes are considered deprecated and should no longer be used. Webpages that require legacy document modes to display properly should be rewritten to use features defined by modern standards.”  – Source: Specifying legacy document modes

For this reason, in Internet Explorer 11, the compatibility view button is removed from the address bar. Microsoft felt that the button had outlived his purpose because it’s been many years now since Microsoft introduced X-UA-Compatible tags. Web developers were supposed to add these X-UA-Compatible meta tags to their website’s HTML header to indicate web page compatibility and not leave it to the user to depend on the button to correctly render the page.

However, and fortunately for us BizTalkers, the compatibility view feature still remains in the browser.

You can turn it on or off by:

  • Click on the Settings icon in the top right corner of IE11 and select the “Compatibility View Settings” item in the drop-down menu

IE11-compatibility-view-settings

  • In the “Compatibility View Settings” box, add the problematic website URL – aka BAM Portal – and then click Add.
    • Compatibility View is turned on for this single website, for this specific computer.
  • Enable both check box “Display intranet sites in Compatibility View” and “Use Microsoft compatibility lists”, and then click Close.

IE11-compatibility-view-settings-add-website

Once you turn on Compatibility View, Internet Explorer will automatically show the BAM Portal in Compatibility View each time you visit fixing all the previous behaviors problems.

BizTalk-Server-2013-R2-BAM-Portal-IE11-compatibility-problems-fixed

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 tracking 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 information’s!

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.

CAUSE

The BizTalk Server Configuration Tool is trying to add the “BAM Management Web Service user” that was specify 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 issue in the BizTalk Server 2013 release that was fixed in the Cumulative Update 1 specially 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
CREATE ROLE NSSubscriberAdmin AUTHORIZATION dbo
GO

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.

After installing some upgrades in the BizTalk Server machine, in this particular case after installing Internet Explorer 10 I started to receive the following error message when I try to access BAM Portal:

“Failed to get data. If available, errors returned from the provider are listed below”

BAM-Portal-Failed-to-get-data

However without no error was listing… so what’s the problem and how can I solve it?

Additional I also get this error messages and bad behaviors:

BAM-Portal-Pivot-Table-Provider-MSOLAP-error

BAM-Portal-Pivot-Table-Provider-MSOLAP-error-2

CAUSE

Sometimes a website you’re visiting, in this case BAM Portal, doesn’t look like you expect it to. Images might not show up, menus might be out of place, and text boxes could be jumbled together. This can be caused by a compatibility problem between Internet Explorer and the site you’re on. When a site is incompatible with Internet Explorer, you’ll see the Compatibility View button in the Address bar.

Note: Not all website display problems are caused by browser incompatibility. Interrupted Internet connections, heavy traffic or network connections can also affect how a page is displayed.

SOLUTION

To solve this problem you must turn on Compatibility View for BAM Portal in the IE10. You can do this by:

  • Clicking in the “Compatibility View” button that appears in the Address bar to display the site in Compatibility View.

BAM-Portal-tap-Compatibility-View

Note: If you don’t see the button, there’s no need to turn on Compatibility View.

Once you turn on Compatibility View, Internet Explorer will automatically show that site in Compatibility View each time you visit. You can turn it off by tapping or clicking the button again. Or, you can clear the entire list of sites using Compatibility View by deleting your browsing history.

When we try to access BAM Portal, sometimes Office Web Components Display Cross-Domain warning messages such as:

“This Web site uses a data provider that may be unsafe. If you trust the Web site, click OK, otherwise click Cancel.”

This-website-uses-data-provider-that-may-be-unsafe

Or this other common warning messages

“This page accesses data on another domain. Do you want to allow this?”

Or even:

“Failed to get data. If available, errors returned from the provider are listed below… Safety settings on this machine prohibit accessing a data source on another domain.”

CAUSE

This are some of the normal warning message that the Microsoft Office 2003 Web Components displays when a user try to accesses to BAM Portal, some because a scripted Web page tries to run ADO code from an untrusted provider (accessing data from a domain other than the one from which the Web page originates)

For ADO 2.7 and earlier you may receive: “This page accesses data on another domain. Do you want to allow this?”

However, for ADO 2.8 and later, the preceding message no longer appears. Instead, the following message appears in this context: “This Web site uses a data provider that may be unsafe. If you trust the Web site, click OK, otherwise click Cancel.”

The purpose for the alert is to prevent a Web page author from directing users to a potentially malicious page that uses the security context of the user to access data for which the author does not have access.

SOLUTION

To avoid this messages in Microsoft Internet Explorer, you can add a secure Web site to your Trusted Sites zone on the Security tab of the Internet Options dialog box:

  • In the Internet Explorer window, click “Tools”, then click “Internet Options”.
  • Click the “Security” tab, and then select the “Trusted sites” zone.

Add-BAM-Portal-Trusted-Sites-Zone-Security-tab

  • Click “Sites” button, and then “Add” the BAM Portal to the Trusted sites zone

Add-BAM-Portal-Trusted-Sites-Zone

It´s a common factor that before users can view data from a BAM model in the BAM Portal website, they must be granted access to the views. However, and contrary to what I thought, the user that makes the deploy of the BAM Definition don’t necessarily have access to this particular view in the BAM Portal! (I was being misled because usually I am the owner… hehe)

BAM-Portal-Missing-View

Instead the only user that always has access to the view and cannot be added to or removed from the view(s) is the Database Owner (BAMPrimaryImport)!

You can check who the database owner is by running the following query:

SELECT SUSER_SNAME(owner_sid),name
FROM sys.DATABASES

So after I run this query I realize that another user was the owner and to solve this “problem” I had to give permissions to my user to access this View in BAM Portal by running the following BAM Management Utility command:

bm.exe add-account -AccountName:DOMAIN\USER -View:MyView

BAM-Portal-With-View

Mystery solved Sorriso

Last day I was able to convince my client to use, for the first time, BAM for tracking and monitoring of specific processes. As I anticipated, 1-hour work resulted in a major impact (for better) on the people responsible for these tasks in the organization.

However after I deploy my BAM Definition and tracking profile in production environment and everything was working well, i.e., processes were running successfully and data was being tracking (I was able to see the tracking data in database)…

If you don’t know, and contrary to what I thought also, the only user that always has access to the view and cannot be added to or removed from the view(s) is the Database Owner (BAMPrimaryImport). So the user that made the deploy of this BAM Definition don’t necessarily have access to this particular view in the BAM Portal!

In this particular case I’m also the Database Owner, but when I try to access to BAM Portal the access was constantly being denied me and always asking to enter my credentials when browsing to it… even when I gave access to another domain user to this view and tested with these credentials the problem remained.

After examining the logs in event I found this information message:

BAM-Web-Event-Information

With the following details:

Event code: 4007
Event message: URL authorization failed for the request.
Event time: 23-04-2013 15:55:52
Event time (UTC): 23-04-2013 14:55:52
Event ID: 053c6e752b6a4de8ae400a9a9d7d26b1
Event sequence: 10
Event occurrence: 9
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/ROOT/BAM-1-130112015742350508
Trust level: BAMPortal_Minimal
Application Virtual Path: /BAM
Application Path: D:\Program Files (x86)\Microsoft BizTalk Server 2010\BAMPortal\
Machine name: MyMachine

Process information:
Process ID: 9560
Process name: w3wp.exe
Account name: DOMAIN\bts-bam-ap

Request information:
Request URL: http://localhost/BAM
Request path: /BAM
User host address: 192.168.***.***
User: DOMAIN\MYUSER
Is authenticated: True
Authentication Type: Negotiate
Thread account name: DOMAIN\MYUSER

Custom event details:

CAUSE

Well, unfortunately, this problem or similar problems can happen for many reasons:

Fortunately for me I have an E2E test environment which is an almost exact replica of PROD with which I could compare to see what was the problem and that was working well Sorriso.

One thing I was sure: I had permission problems!

The first thing was to analyze the basic settings of the application pool like: credentials or .net version and so on… however everything was properly configured and equal to the test environment.

After a few minutes I remembered the basics… if you remember the BizTalk Configuration experience, you use the BizTalk Server configuration tool to specify whether BAM is enabled, and to specify the Web service accounts, the Windows groups that can view portal, and the Web site that will host the portal.

BAM-Portal-Configuration

That you also can see in “.Net Authorization Rules” under BAM website:

BAM-IIS-Net-Authorization-Rules

Using the principle of least privilege, user accounts should have restrictive permissions to perform routine tasks in the BAM portal. BizTalk BAM Portal Users is the group, at least for me but this may change according to your configurations, where you defined the users or groups that can access to BAM Portal Web site.

SOLUTION

In my case, after checking in AD, there was no one configured to have access to BAM Portal.

To solve this problem you have to configure the users or groups that you want to have access to BAM Portal under the “BizTalk BAM Portal Users” in your Active Directory.

After this operation everything work fine! Exactly as it should.