Thursday, June 4, 2009

User account issues while accessing BAM

BAM Web Services and SQL Server mixed mode authentication
This is an issue I see every once in while so let's see what causes it and how to diagnose and fix it.
You have created and deployed a BAM definition with some BAM views in it but when you hit the BAM Portal with IE all you see in the "My Views" pane on the left is an error message "Views or Activites may be missing because one or more database(s) could not be contacted." followed by "No view to display" message. Now what?
Your first step to troubleshooting such issues is the Windows Event Log on the machine hosting the IIS server running the BAM Portal and the BAM web services. The BAM event log entries will be in the Application event log. You can filter on event source equal to "BAM Portal" or "BAM Web Service". I will usually look at the last few errors from "BAM Web Service".
So you open the Windows Event Viewer and you see one error from "BAM Web Service" with event ID 12033. Double-click on it and the description says:
Referenced database 'BAMPrimaryImport' on server 'SERVERNAME' is not accessible. The error is:
System.NullReferenceException: Object reference not set to an instance of an object.at Microsoft.BizTalk.Bam.WebServices.AsyncResult.End(AsyncResult asyncResult)at Microsoft.BizTalk.Bam.WebServices.Management.GetViewSummaryAsyncResult.End(IAsyncResult result)at Microsoft.BizTalk.Bam.WebServices.Management.BamManagementService.EndGetViewSummaryForDatabase(IAsyncResult result)at Microsoft.BizTalk.Bam.WebServices.Management.BamManagementService.GetViewSummaryForCurrentUser().
Now what?
The second step to troubleshooting BAM Web Services issues is to... enable tracing. To turn on tracing go to the "Program Files\Microsoft BizTalk Server 2006\BAMPortal\BAMManagementService" directory (or "...\BAMQueryService") and open the web.config file with notepad. Uncomment the element towards the end of the file. By default the traces will be saved in "C:\temp\BamManagementServiceTrace.log" or "C:\temp\BamQueryServiceTrace.log". Make sure that the IIS worker process user account (usually Network Service or ASPNET) and the BAM web service user have write permissions for the trace log file directory (C:\temp by default).
Turn on tracing for the BAM Management Web Service and refresh the BAM Portal home page in IE. Now open the trace file "C:\temp\BamManagementServiceTrace.log" and search for the string "Error" from the top of the file to find the first error. In this case the first error is:
06/13/2006 17:00:36 6 Microsoft.BizTalk.Bam.WebServices.TraceHelper ThrowHelperSoapException Error 11007 Cannot determine the SID for the user.
Bingo! This is the root cause of the problem.
Now some history behind this problem. The BAM Web Services authenticate all users using Windows authentication and authorize them based on their Windows identity. But there is a special case - DBO. DBO is a special account which has permissions to all BAM views. So the BAM Web Services will try to find the Windows identity for the DBO user for the BAM Primary Import database and they will fail if this is a SQL account.
BAM does not support anything other than Windows authentication for SQL Server. If everything else seems to work, there is no guarantee that it actually does and it will continue to work in the future. True, the error is not intuitive but it is correct.
How to resolve the problem now that we have identified it? It is really easy indeed. Just change the DBO accounts for all BAM databases to Windows accounts. You can do this using the sp_changedbowner system stored procedure.
To set DBO to the "domain\user" account run:
use BAMPrimaryImportgosp_changedbowner 'domain\user'go
Navigate to the BAM Portal and verify that you see all BAM views and no errors in the left pane on the home page.
There is a pretty nice BizTalk Installation Guide, which you can use the next time you setup BizTalk Server to avoid such issues.
Filed under:

Saturday, September 13, 2008

SQL server 2005 installation issues

SQL server 2005 installation issues.Menu options in Start Programs not being dispalyed for SQL server 2005 after installation.

Solution.

Client components are not installed properly. You may need to uninstall workstation components and reinstall them from Disk1.
Follow the article http://support.microsoft.com/default.aspx?scid=kb;EN-US;909953

Saturday, March 22, 2008

Could not configure BAM Portal in BizTalk 2006

When configuring BAM Portal you may come across a situation where in you cannot select users and groups in the BAP Portal configuration page in BizTalk configuration window.
This may happen due to various reasons and one of them is as below.
- If you have already configured BAM Portal but removed the portal from the website. Hence the configuration information remained in the BAM Config tables and is not removed from there.

To clear the config information stored earlier, use the BM.EXE and export the config file into a xml and removed the http://ServerName:80/BAM and reimport the config file using BM.EXE.
Now you should be able to configure the BAM portal from BizTalk Configuration window.

Wednesday, March 5, 2008

Wireless over DSL with fixed IP

First connect the DSL modem directly to the computer using which you are configuring the DSL connection. Setup the internet connection by using the login /password and the fixed IP given. Remember to notedown the details are these are required while configuring the wireless. Also notedown the Primary DNS. Once the internet connection is established using a wired connection between DSL and Computer then just open the browser and by default the DSL modem home page should appear. And now go to connection setting page and change the connection PPPOE to bridge connection save and exit which will restart the DSL modem. Now connect the wireless router to DSL modem and login to the home page of wireless router where you can set the configuration setting and select PPPOE and enter the details (like login, pswd, IP address given by ISP and the DNS) properties of WAN. Now save these settings and you are good to go.

Friday, February 29, 2008

Removing SourceSafe dependencies from a solution/project

Situation:Your buddy has created a cool VB.NET application that you want to use. He sends you the source code and it consists of a solution (MySolution) containing a single project (MyProject). You attempt to open the solution and find that it has SourceSafe dependencies. You need to remove all the VSS stuff from the solution/project files.
Solution:
1 - Go to the folder containing the solution files and delete the following: mssccprj.scc MyProject.vssscc vssver.scc
2 - Open MyProject.sln in your favorite text editor and remove the following section: GlobalSection(SourceCodeControl) = preSolution ... EndGlobalSection
3 - Go to the folder containing the project files and delete the following: MyProject.vbproj.vspscc mssccprj.scc vssver.scc
4 - Open MyProject.vbproj in your text editor and remove the following lines: SccProjectName = "SAK" SccLocalPath = "SAK" SccAuxPath = "SAK" SccProvider = "SAK"
Now you can open the solution/project with no source control errors.

Thursday, October 4, 2007

Configuring IIS for BTSHTTPReceive.dll

How to configure IIS for a BizTalk 2006 HTTP Receive Location
First thing you need to do is to make sure that IIS's security is not going to be blocking your calls to the BTSHTTPReceive.dll. To do this goto your IIS manager and click on the Web Service Extension node and right click it and 'Add a new Web Service Extension'. Now browse to the location of BTSHTTPReceive.dll (by default installation its in :\Program Files\Microsoft BizTalk Server 2006\HttpReceive\ folder). Also remember to check the 'Set extension status to Allowed' checkbox. It is also a good idea to create a new application pool for your application to run in. When creating one make sure that the user account used is a member of the BizTalk Isolated Hosts group and the IIS_WPG group.
Now your going to create a new virtual directory in IIS under Default Web Site. Make sure you link the location of BTSHTTPReceive.dll in the content directory. Also make sure you use the new application pool you just setup. Make sure that both Read and Execute permissions are selected, and that Execute permissions are set to Scripts and Executables. After this you should be all set to start setting up your HTTP Receive Location within BizTalk Explorer
Note: Make sure websites are refreshed.

Friday, September 21, 2007

Zombie identification in Biztalk 2006

Zombies can be identified in Biztalk server 2006 by using the following query in the messagebox database.

SELECT * FROM HostNameQ_Suspended where nErrorCategory = 4


In the above query HostName should be replaced with corresponding host name in which you want to identify the Zombies. If the above query return any rows then it indicates that there are Zombies present.