Quantcast
Channel: Errors and Warnings Causes and Solutions – SANDRO PEREIRA BIZTALK BLOG
Viewing all 95 articles
Browse latest View live

Installation of instance of host BizTalkSoapApplication on server … failed. Permission is denied. The current user does not have sufficient permissions to perform this operation.

$
0
0

Normally we tend to inherit BizTalk environments already installed and preconfigured, is not every day that we create an environment from scratch, this is one of these situations. It was given BizTalk Administrator permission to my user, i.e., my user was added to BizTalk Server Administrators group.

My first operations was to create some BizTalk Hosts, which went smoothly (for more information about this topic see Managing BizTalk Hosts and Host Instances)

However when I was creating the Host Instances associated with BizTalk Hosts created previous, I obtained the following error:

TITLE: BizTalk Server Administration
——————————
Installation of instance of host BizTalkSoapApplication on server … failed.
For help, click: http://go.microsoft.com/fwlink/?LinkId=47400&ProdName=Microsoft+BizTalk+Server+2010&ProdVer=3.9.469.0&EvtSrc= Microsoft.BizTalk.Administration.SnapIn.Properties.Errors&EvtID=HostInstance_CreateFailed&EvtChain= BTSAdminMsg+%2c10294
——————————
ADDITIONAL INFORMATION:
Permission is denied. The current user does not have sufficient permissions to perform this operation. (WinMgmt)
For help, click: http://go.microsoft.com/fwlink/?LinkId=47400&ProdName=Microsoft+BizTalk+Server+2010&ProdVer=3.9.469.0&EvtSrc=BTSAdminMsg&EvtID=10294

error-creating-host-instance

CAUSE

The additional information is explicit, this problem occurs because the user account that you’re using to configure BizTalk doesn’t have sufficient permissions.

SOLUTION

  • When you install a host instance, you must have the privileges to create a Windows service, and to grant SQL Server logon and access rights for the BizTalk databases to the Host Windows user group.

I usually say: “To be able to install and configure BizTalk Server 2010 without problems, you have to log on the server using a Domain User who is member of BizTalk Server Administrators group and this group have Administrator rights on both the SQL Server and the BizTalk Server.”

In my case, my user was member of BizTalk Server Administrators group, but this group didn’t have Administrator rights in BizTalk Server machine.

To add BizTalk Server Administrators group to the Local Administrators Group in both machines:

  • Click ‘Start’, ‘Control Panel’, ‘Administrator Tools’, ‘Computer Management’, ‘Local Users and Groups, ‘Groups’
  • Add you user account and BizTalk Server Administrators group to the ‘Administrators’ group

Note: as I had no administrator rights in machine, I had to request to the system administrators to carry out this operation.

By default the Windows Builtin\Administrators group has the sysadmin SQL role on the SQL Server, however, we need to ensure that this group have access to the BizTalk databases. In my case the group is db_ower of all BizTalk databases, have permission to connect to database engine and the login is enable.

error-creating-host-instance-sql-user-permission

References

Tags: BizTalk | Configuration | Hosts | Errors and Warnings, Causes and Solutions



Project build results in the error "you must specify at least one already-initialized correlation set for a non-activation receive that is on a non-selfcorrelating port"

$
0
0

When you compile your BizTalk project, you receive the error:

"you must specify at least one already-initialized correlation set for a non-activation receive that is on a non-selfcorrelating port".

error-you-must-specify-at-least-one-already-initialized-correlation

This is a very basic mistake, and usually occurs due to developer forgetfulness.

CAUSE

This error can occur if your orchestration has no activating Receive shapes (Activate = true) or has no activating Receive shapes and is not called directly by another orchestration.

SOLUTION

If your orchestration is not called by another orchestration, you must configure one of the Receive shapes to be an activated receive. For more information about configuring the Receive shape, including links to correlation, see How to Configure the Receive Shape.

receive-port-activate-true

Tags: BizTalk | Orchestration | Errors and Warnings, Causes and Solutions


Error when trying to validate EDI message against the schema: [71] Transaction Set or Group Control Number Mismatch

$
0
0

When we are in the development phase of a BizTalk project is normal to validate test instances of messages that are provided with respective schemas before we make final tests, the same happens when we are dealing with EDI messages.

When we perform this validation, we can detect if some enumerators in the existing EDI Schema contain all admissible values, or if your partner has some values customized and we have to reflect them in the schema, a good example is:

Data Element ID: FTX01
Data Value: ZZZ
12: Invalid value in data element

To solve this problem you must add this code to the list of the FTX01 element in the schema

The last week when I was trying to validate EDI message, provided by my partner, against the schema using Visual Studio, I kept getting this error:

” Invoking component…
C:\TestFiles\myEDIsample.txt: error BEC2004: Non Segment level : [71] Transaction Set or Group Control Number Mismatch

This is a very basic mistake, and usually occurs when dummy messages are delivered to us for testing.

Sample message:

UNH+1000100+ORDERS:D:93A:UN:EAN007'
BGM+220+01521710'
DTM+137:120530:101'
DTM+64:120604:101'
DTM+63:120004:101'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
NAD+BY+8000000001164::9'
NAD+DP+8000000009463::9'
NAD+IV+8000000013002::9'
NAD+SU+8000001459008::9'
NAD+PR+8000000016003::9'
LIN+1++4001518722937:EN'
PIA+1+00:PV+14001518722937:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:52'
LIN+2++5000014010034:EN'
PIA+1+00:PV+15701014010031:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:152'
LIN+3++5000014016142:EN'
PIA+1+00:PV+15701014016149:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:304'
LIN+4++5006879009752:EN'
PIA+1+00:PV+15776879009759:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:720'
UNS+S'
UNT+31+1000101'

CAUSE

This error is a notification that there is a mismatch with the transaction set or group control numbers. That’s nothing wrong with your project, the problem is actually in the message that you are using and if you look carefully at UNH and UNT segments, you will find the problema.

UNH Segment: This is the Message Header segment of an EDIFACT document. The UNH segment elements provide information about the message type, and the agency responsible for maintaining the publication of the message type. This segment indicates the start of a document in an interchange and the type of document that follows.

The firs element of UNH segment is:

  • Message Reference Number: This element contains a unique reference number for the message assigned by the sender. This number must be unique to the functional group, and must match the Message Reference Number in the UNT Segment.

o In the sample message this value is: 1000100

UNT Segment: UNT is the Message Trailer segment of an EDIFACT document. The UNT segment elements provide information about the number of segments in a message and the reference number for the message. This segment indicates the end of a document.

The following table lists the mandatory elements that the UNT segment contains:

  • Number of Segments in the Message: This element contains the total number of segments in the message.
  • Message Reference Number: This element contains a unique reference number for the message assigned by the sender. This number must be unique to the functional group, and must match the Message Reference Number in the UNH Segment.
    • In the sample message this value is: 1000101

So the problem is that in the sample message the Message Reference Number in UNH segment is different from that exists in UNT segment.

SOLUTION

Message Reference Number in UNH segment must be equal to the existing in the UNT segment. Therefore change one of them to become equal and the problem will be solved.

Other interesting resources:


Error when trying to validate EDI message against the schema: [29] Invalid count specified at interchange, group or message level

$
0
0

As I mentioned in my last post, when we are in the development phase of a BizTalk project is normal to validate test instances of messages that are provided with respective schemas before we make final tests, the same happens when we are dealing with EDI (EDIFACT) messages.

When we perform this validation, we can detect if some enumerators in the existing EDI Schema contain all admissible values, or if your partner has some values customized and we have to reflect them in the schema.

Another common problem when we are trying to validate dummy EDI message, provided by our partners, against the schema using Visual Studio is:

” Invoking component…
C:\TestFiles\myEDIsample.txt: error BEC2004: Non Segment level : [29] Invalid count specified at interchange, group or message level“.

This is a very basic mistake, and usually occurs when dummy messages are delivered to us for testing.

Sample message:

UNA:+,?*'
UNB+UNOB:1+UNB2.1+UNB3.1+012301:0123+UNB5'
UNH+1000100+ORDERS:D:93A:UN:EAN007'
BGM+220+01521710'
DTM+137:120530:101'
DTM+64:120604:101'
DTM+63:120004:101'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
NAD+BY+8000000001164::9'
NAD+DP+8000000009463::9'
NAD+IV+8000000013002::9'
NAD+SU+8000001459008::9'
NAD+PR+8000000016003::9'
LIN+1++4001518722937:EN'
PIA+1+00:PV+14001518722937:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:52'
LIN+2++5000014010034:EN'
PIA+1+00:PV+15701014010031:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:152'
LIN+3++5000014016142:EN'
PIA+1+00:PV+15701014016149:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:304'
LIN+4++5006879009752:EN'
PIA+1+00:PV+15776879009759:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:720'
UNS+S'
UNT+30+1000100'
UNZ+1+UNB5'

CAUSE

This error is a notification that the number of groups, messages, or segments does not match the number given in the UNZ, UNE, UNT, or UST segment; or that the length of an object or the length of encrypted data is not equal to the length stated in the UNO, UNP, USD, or USU segment, i.e., the control count does not match number of instances received.

UNT Segment: UNT is the Message Trailer segment of an EDIFACT document. The UNT segment elements provide information about the number of segments in a message and the reference number for the message. This segment indicates the end of a document.

The following table lists the mandatory elements that the UNT segment contains:

  • Number of Segments in the Message: This element contains the total number of segments in the message.
  • Message Reference Number: This element contains a unique reference number for the message assigned by the sender. This number must be unique to the functional group, and must match the Message Reference Number in the UNH Segment.

So the problem is that in the sample message the Number of Segments in the Message in UNH segment is 30 and the message has in fact 31 (starting count from the UNH segment up to UNT segment).

SOLUTION

You have to change the Number of Segments in the Message element in UNT segment so that contains the correct number of groups, messages, or segments, in this case 31.

Other interesting resources:


There was a failure executing the receive pipeline: Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive Reason: No Disassemble stage components can recognize the data.

$
0
0

In my last two posts I showed two possible errors, and their respective solutions, that can happen when we are validating dummy EDI message, provided by our partners, against the schema using Visual Studio, but these errors could also happen in runtime.

In this post I will show you one common error when we are validating an EDI solution.

After I deploy and correctly configured the solution, I was trying to receive an EDI document from a Receive Port, in order to convert it to XML format using the generic EDI pipeline: “Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive”, but I was always getting this error:

“There was a failure executing the receive pipeline:
“Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive,
Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral,
PublicKeyToken1bf3856ad364e35″ Source: “EDI disassembler” Receive Port: “IN_ORDER_PORT” URI: “E:\PORTS\EDI\IN_ORDER\*.*” Reason: No Disassemble stage components can recognize the data.“.

The message provided by our partner was this:

UNH+1000100+ORDERS:D:93A:UN:EAN007'
BGM+220+01521710'
DTM+137:120530:101'
DTM+64:120604:101'
DTM+63:120004:101'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
NAD+BY+8000000001164::9'
NAD+DP+8000000009463::9'
NAD+IV+8000000013002::9'
NAD+SU+8000001459008::9'
NAD+PR+8000000016003::9'
LIN+1++4001518722937:EN'
PIA+1+00:PV+14001518722937:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:52'
LIN+2++5000014010034:EN'
PIA+1+00:PV+15701014010031:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:152'
LIN+3++5000014016142:EN'
PIA+1+00:PV+15701014016149:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:304'
LIN+4++5006879009752:EN'
PIA+1+00:PV+15776879009759:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:720'
UNS+S'
UNT+31+1000100'

CAUSE

After some time trying to understand the reason of this problem, I realize that’s nothing wrong with my project, the problem is actually in the message that I’m using.

This error occurs because the message does not contain the EDIFACT interchange envelope segments (UNB and UNZ). An EDIFACT interchange begins with a UNB. It contains version release information, syntax information, and partner information. An interchange ends with a UNZ.

UNA Segment: The UNA segment is optional in an EDIFACT interchange. The specifications in the UNA segment define the characters used as separators and indicators for the interchange. Use this segment only if the interchange contains non-standard separator characters. (More information here)

UNB Segment: The UNB segment is compulsory to an EDIFACT interchange. This segment acts as the interchange header for a set of EDIFACT documents. The UNB segment elements identify the sender and recipient of the interchange, together with the date and time that the interchange was prepared and the agency controlling the syntax of the interchange. (More information here)

UNZ Segment: This segment is the Interchange Trailer segment of an EDIFACT document. This segment indicates the end of an interchange and checks the interchange reference and number of documents in the interchange. (More information here)

SOLUTION

Add this segment to your message: UNA (optional), UNB and UNZ and the message will be processed correctly.

Correct message:

UNA:+,?*'
UNB+UNOB:1+UNB2.1+UNB3.1+012301:0123+UNB5'
UNH+1000100+ORDERS:D:93A:UN:EAN007'
BGM+220+01521710'
DTM+137:120530:101'
DTM+64:120604:101'
DTM+63:120004:101'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
NAD+BY+8000000001164::9'
NAD+DP+8000000009463::9'
NAD+IV+8000000013002::9'
NAD+SU+8000001459008::9'
NAD+PR+8000000016003::9'
LIN+1++4001518722937:EN'
PIA+1+00:PV+14001518722937:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:52'
LIN+2++5000014010034:EN'
PIA+1+00:PV+15701014010031:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:152'
LIN+3++5000014016142:EN'
PIA+1+00:PV+15701014016149:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:304'
LIN+4++5006879009752:EN'
PIA+1+00:PV+15776879009759:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:720'
UNS+S'
UNT+31+1000100'
UNZ+1+UNB5'

Schema item missing from Visual Studio BizTalk Project items

$
0
0

This week I encountered a curious situation while I was developing a new BizTalk solution. After creating my new project, I tried to add a new schema to the solution, and to my astonishment, the item "Schema" had disappeared from the Visual Studio window "Add new item" in the "BizTalk Project items –> Schema Files" options, as you can see in the picture bellow:

Shema-missing

Even if I choose the option "BizTalk Project items", that gives all BizTalk item, the Schema item was not there. By the way, this problem appeared from one day to another.

CAUSE

Well, unfortunately, I don’t know exactly why this problem occurred, but I believe that some dependence has become corrupted.

SOLUTION

To fix this issue, or similar problems, you need to repair Visual Studio 2010.

To repair Visual Studio:

  • Click Start, click Control Panel, and then click Programs.
  • Click Programs and Features and then select the Visual Studio Edition you installed.
  • Click Uninstall/Change.
  • In the setup wizard, select Repair or Reinstall and then click Next.
  • Follow the remaining instructions in the installation wizard to finish.

After repairing Visual Studio, The "Schema" item was once again available:

Shema-missing-item-solution


Failed to add resource(s). Resource (…) is already in store and is either associated with another application or with another type.

$
0
0

One of my team members that is making some changes to a project that I started, called me saying that he was having problems in deploying the project. Whenever he tried to deploy the project he was stuck in the following error:

Failed to add resource(s). Resource (…) is already in store and is either associated with another application or with another type.

Failed-to-add-resource-associated-with-another-application-or-type

First we have to understand this type of error message…

CAUSE

When this message occurs, usually means that the resource we are trying to deploy is already deployed.

Before you can deploy a solution from Visual Studio (2005, 2008, 2010 …) into a BizTalk application, you must first set project properties. If a solution in Visual Studio contains multiple projects, you must separately configure properties for each project:

  • In Visual Studio Solution Explorer right-click a project for which you want to configure properties, and then click Properties.
  • Click the Deployment tab in Project Designer.
  • and configuring at least the following properties:
    • Application Name: Name of the BizTalk application to which to deploy the assemblies in this project. If the application already exists, the assemblies will be added to it when you deploy the project. If the application does not exist, the application will be created. If this field is blank, the assemblies will be deployed to the default BizTalk application in the current group. Names that include spaces must be enclosed by double quotation marks (").
    • Configuration Database: Name of the BizTalk Management database for the group, BizTalkMgmtDb by default.
    • Server: Name of the SQL Server instance that hosts the BizTalk Management database on the local computer. In a single-computer installation, this is usually the name of the local computer.

Notice: If “Application Name” property is blank, the assemblies will be deployed to the default BizTalk application, i.e., “BizTalk Application 1”.

So if you have this problem, you may:

  • Inadvertently deployed it to another application, most likely to the default “BizTalk Application 1”;
  • Someone have probably removed the previously existing name in “Application Name” property from the project properties.

SOLUTION

If “Application Name” property by mistake is blank, then this resource is already deployed in another application than the default: “BizTalk Application 1”, so we need to:

  • In the BizTalk Administration Console the <All Artifacts> view will tell you in which application the resource is deployed, we need to find were this resource is deployed.
  • We need to fix the "Application Name" property.
  • Redeploy the project

If “Application Name” property isn’t blank, then the resource may inadvertently been deployed in to another application, so we need to:

  • In the BizTalk Administration Console the <All Artifacts> view will tell you in which application the resource is deployed, we need to find were this resource is deployed.
  • When found resource delete it.
  • Redeploy the project
Working with Team Foundation Server 2010

In my case, it was really weird why this error was happening because I had been working on it a few days before and I knew that all settings were correct.

So to help my teammate and to see what was happening, I open Visual Studio get the last version of the project from TFS, because he had changed the solution, and I try to deploy the solution and to my astonishment, or not… everything worked fine, everything deployed successfully!

However my colleague was still unable to properly deploy the solution… and it wasn’t permission problems.

So what happened?

Even though I have added the solution to TFS with the correct settings for Deployment… when another member open this solution for the first time to work on it… the “Application Name” property is set to…. blank!!!!

Deployment-options

We must go to all the projects in the solution and fix this property.


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

$
0
0

I decided to put the name of the error in the post title … but this post also could be called “Why you shouldn’t delete Active Directory accounts (if you don’t know where it is being used!)”… but before I tell you why, let me try to explain the problem and put some context on it.

Last week I had a funny surprised when I tried to access my BAM Portal in my BizTalk Server 2006 environment

An unspecified error has occured.
Use the navigation bar on the left to access Business Activity Monitoring views.
If the problem persist, contact you System Administrator.

BAM-portal-error

I just love this type of errors! Because I’m also one of the System Administrator, meaning that I was f*$#%& Sorriso.

My first reaction is that it could have been some connectivity problem, and as the error indicates, I tried to navigate the remaining views to see if the problem remained… and surprisingly this problem occurred only in certain views!

BAM-portal

PROBLEM

So at this point I knew it was happening some problem. Of course the first thing we should do is to check the Event Viewer to see if we can find more details about the error and I found three errors related between themselves and associated with BAM:

BAM-Portal-Errors-Event-Viewer

Starting from below:

  • The first error was:

Current User: DOMAIN\sandro
EXCEPTION:
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)

Observation: Impossible, I’m BizTalk Administrator but most important my user is the owner of this views!!!

  • The second error was:

Current User: DOMAIN\sandro
EXCEPTION: System.Web.Services.Protocols.SoapException: Internal Server Error.

Observation: says absolutely nothing … trash!

  • And finally the third error was:

(BAMPortal.PortalApplication) Void LogAllErrors(System.Exception[]): System.Web.HttpException: Error executing child request for /BAM/Pages/Search.aspx. —> System.Web.HttpUnhandledException: Exception of type ‘System.Web.HttpUnhandledException’ was thrown. —> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Internal Server Error.
at Microsoft.BizTalk.Bam.WebServices.Management.BamManagementService.GetViewDetailsAsXml(String viewName)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.BizTalk.Bam.WebServices.ManagementService.BamManagementService.GetViewDetailsAsXml(String viewName)
at Microsoft.BizTalk.Bam.Portal.DataAccess.BamDefinitionCache.FetchViewDefinition(String viewName)
at Microsoft.BizTalk.Bam.Portal.DataAccess.BamDefinitionCache.GetBamDefinition(String viewName)
at Microsoft.BizTalk.Bam.Portal.DataAccess.Activity.BuildColumnsCollection()
at Microsoft.BizTalk.Bam.Portal.DataAccess.Activity.EnsureColumnsCollection()
at Microsoft.BizTalk.Bam.Portal.DataAccess.Activity.ColumnsOfType(ColumnTypes type)
at Microsoft.BizTalk.Bam.Portal.DataAccess.Activity.EnsureInstanceColumns()
at Microsoft.BizTalk.Bam.Portal.DataAccess.Activity.get_InstanceColumns()
at BAMPortal.ColumnsChooser_ascx.GetColumns()
at BAMPortal.ColumnsChooser_ascx.GetAvailableColumns()
at BAMPortal.ColumnsChooser_ascx.ReconcileColumns()
at BAMPortal.ColumnsChooser_ascx.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
— End of inner exception stack trace —
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.pages_search_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
— End of inner exception stack trace —
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
at System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm)
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at System.Web.HttpServerUtility.Transfer(String path)
at BAMPortal.navbar_ascx.TreeViewNav_NodeClicked(Object sender, TreeNodeEventArgs eventArgs)
at Microsoft.BizTalk.Bam.Portal.ClickableTreeView.OnTreeNodeClicked(TreeNode node)
at Microsoft.BizTalk.Bam.Portal.ClickableTreeView.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.TreeView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.pages_view_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Observation: much information … yet without giving me many tips on the problem that was happening.

Actually the first error is what brings us a better sense of the error… it’s a permission problem to access the view… but why? and what was really causing this problem?

CAUSE
  • BAM Management Utility (BM.exe) doesn’t provide the capability to grant group permissions to BAM views instead you need to use user’s accounts. So these issues may occur if the user account which was granted permission to BAM objects are deleted from Active Directory or from Local Computers.

When you access to a certain view in BAM Portal the services invoked by the Portal will try to check the permission for ALL the users associated to this specific view and not only my user, so if a user was deleted from AD or from the local computer without first removing it from the view, the services will fail while attempting to map the account name with Security ID and you will get with this annoying problem: “Data is Null. This method or property cannot be called on Null values.”

You may experience any one or more of the following symptoms:

  • When you access to certain views in the BAM Portal
  • When you try to execute any kind of operation using BM.exe tool against certain views, like “bm.exe get-accounts”; “bm.exe remove-account” or “bm.exe remove-view”
SOLUTION
  • You have to manually delete those user accounts from SQL Server.
How can I really solved this problem?

So now I know the problem, the cause and the solution… but is it that simple?
… NO of course!

First problem: How can I really know with account(s) is causing the problem?

You can have many users in your organization associated with the view and may have passed months or years since the last time we associate the users account to this view… so it is really a problem to find with user is causing the problem.

  • Option 1: you can ask!
    • I know that if I ask who was deleting accounts in the AD or which accounts have been deleted, I will get the typical response… no one or no account has been deleted!!! Don’t go there is an endless road.
  • Option 2: You can use BM.exe!
    • Unfortunately we also can’t use BM tool to ask with account have permission to this view (bm.exe get-accounts), we get the following error:
      • ERROR: Failed to list permissions for BAM view.
        Data is Null. This method or property cannot be called on Null values.
  • Option 3: See in the documentation
    • Another endless road Sorriso. This type of documentation should exist, but few companies actually have them!

I finally decided to try to make a query directly in the BAM Primary Import database (BAMPrimaryImport) to attempt to get a list of all the account that were associated with this view in order to validate with my system administrators if they all existed in AD, this was the result:

WITH Query AS (
SELECT
    [UserName] = CASE princ.[type]
                    WHEN 'S' THEN princ.[name]
                    WHEN 'U' THEN ulogin.[name] COLLATE Latin1_General_CI_AI
                 END,
    [UserType] = CASE princ.[type]
                    WHEN 'S' THEN 'SQL User'
                    WHEN 'U' THEN 'Windows User'
                 END,
    [DatabaseUserName] = princ.[name],
    [Role] = null,
    [PermissionType] = perm.[permission_name],
    [PermissionState] = perm.[state_desc],
    [ObjectType] = obj.type_desc,--perm.[class_desc],
    [ObjectName] = OBJECT_NAME(perm.major_id),
    [ColumnName] = col.[name]
FROM
    --database user
    sys.database_principals princ
LEFT JOIN
    --Login accounts
    sys.login_token ulogin on princ.[sid] = ulogin.[sid]
LEFT JOIN
    --Permissions
    sys.database_permissions perm ON perm.[grantee_principal_id] = princ.[principal_id]
LEFT JOIN
    --Table columns
    sys.columns col ON col.[object_id] = perm.major_id
                    AND col.[column_id] = perm.[minor_id]
LEFT JOIN
    sys.objects obj ON perm.[major_id] = obj.[object_id]
WHERE
    princ.[type] in ('S','U')
UNION
--List all access provisioned to a sql user or windows user/group through a database or application role
SELECT
    [UserName] = CASE memberprinc.[type]
                    WHEN 'S' THEN memberprinc.[name]
                    WHEN 'U' THEN ulogin.[name] COLLATE Latin1_General_CI_AI
                 END,
    [UserType] = CASE memberprinc.[type]
                    WHEN 'S' THEN 'SQL User'
                    WHEN 'U' THEN 'Windows User'
                 END,
    [DatabaseUserName] = memberprinc.[name],
    [Role] = roleprinc.[name],
    [PermissionType] = perm.[permission_name],
    [PermissionState] = perm.[state_desc],
    [ObjectType] = obj.type_desc,--perm.[class_desc],
    [ObjectName] = OBJECT_NAME(perm.major_id),
    [ColumnName] = col.[name]
FROM
    --Role/member associations
    sys.database_role_members members
JOIN
    --Roles
    sys.database_principals roleprinc ON roleprinc.[principal_id] = members.[role_principal_id]
JOIN
    --Role members (database users)
    sys.database_principals memberprinc ON memberprinc.[principal_id] = members.[member_principal_id]
LEFT JOIN
    --Login accounts
    sys.login_token ulogin on memberprinc.[sid] = ulogin.[sid]
LEFT JOIN
    --Permissions
    sys.database_permissions perm ON perm.[grantee_principal_id] = roleprinc.[principal_id]
LEFT JOIN
    --Table columns
    sys.columns col on col.[object_id] = perm.major_id
                    AND col.[column_id] = perm.[minor_id]
LEFT JOIN
    sys.objects obj ON perm.[major_id] = obj.[object_id]
UNION
--List all access provisioned to the public role, which everyone gets by default
SELECT
    [UserName] = '{All Users}',
    [UserType] = '{All Users}',
    [DatabaseUserName] = '{All Users}',
    [Role] = roleprinc.[name],
    [PermissionType] = perm.[permission_name],
    [PermissionState] = perm.[state_desc],
    [ObjectType] = obj.type_desc,--perm.[class_desc],
    [ObjectName] = OBJECT_NAME(perm.major_id),
    [ColumnName] = col.[name]
FROM
    --Roles
    sys.database_principals roleprinc
LEFT JOIN
    --Role permissions
    sys.database_permissions perm ON perm.[grantee_principal_id] = roleprinc.[principal_id]
LEFT JOIN
    --Table columns
    sys.columns col on col.[object_id] = perm.major_id
                    AND col.[column_id] = perm.[minor_id]
JOIN
    --All objects
    sys.objects obj ON obj.[object_id] = perm.[major_id]
WHERE
    --Only roles
    roleprinc.[type] = 'R' AND
    --Only public role
    roleprinc.[name] = 'public' AND
    --Only objects of ours, not the MS objects
    obj.is_ms_shipped = 0
)
SELECT * From  Query
WHERE Role like '%name_of_the_view%' AND ObjectType like 'View'

BAM-query-result

It may not be sophisticated or the best way but it served my purposes and was much easier and effective than be looking one by one in the SQL Server management Studio.

Now that I had a list of users, it was easy to validate with the system administrators which account had been deleted.

After so much effort and work trying to find the user that was causing the problem I found a simple and more effective solution to this problem in this post on MSDN Blogs: BizTalk Error: BAM Management Utility Errors, using this query:

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

In the result for the DB roles, the third column for Windows users (and groups) should display the User Name (or group name) and can’t be null.

So if you execute the above query it will give the user(s) account(s) which was deleted from Domain Controller or Local Computer.

Second problem: How can I manually delete the account?

Yep … this question may seem a bit ridiculous … but the truth is, manually delete the account was not so simple after all… at least for me it wasn’t.

You can’t just delete that account from SQL Server. To do that you need to follow the steps:

  • Go to SQL Management Studio, expand the BAMPrimaryImport Database
  • Go to Security –> Roles –> Database Roles –> BAM_ManagementWS
  • Right click BAM_ManagementWS and go to properties option which will open a new window (Database Role Properties – BAM_ManagementWS)

BAM-ManagementWS

  • In that window go to Securables, choose the NT User account which needs to be deleted.

BAM-ManagementWS-properties-Securables

  • In the bottom portion you will see that NT User Account having “View Definition” Permission. Uncheck that option then click OK.
  • Now you should able to delete the user from Security –> User –> <NT User Account>

BAM-User-delete

However if you try to delete the user without following these steps, like I did :) , you get stuck in another huge problem:

TITLE: Microsoft SQL Server Management Studio
——————————
Drop failed for User ‘domain\user’.  (Microsoft.SqlServer.Smo)
——————————
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
——————————
The database principal has granted or denied permissions to objects in the database and cannot be dropped. (Microsoft SQL Server, Error: 15284)

So we need now to manual revoke the Grant access to BAM_ManagementWS by execute the following query:

REVOKE VIEW DEFINITION ON USER::[domain\user] TO [BAM_ManagementWS] AS [domain\user]
GO
Security Considerations for the BAM Portal

Using the principle of least privilege, user accounts should have restrictive permissions to perform routine tasks in the BAM portal. Keep the following points in mind as you set up your user accounts for BAM to balance security with appropriate access for users.

User accounts

User accounts with minimum permissions are not able to use the BAM portal distributed navigation feature. To be able to use this feature, these accounts must have sufficient permissions to allow access to the Web services on the remote computer as well as on the local computer.

User accounts for the BAM Web services must have permissions to access all referenced databases and must be a member of the BAM_ManagementWS role in the referenced databases.

For the following user types, you should be aware of these considerations:

  • Domain Users: These users must have access permissions on remote computers that host BAM Primary Import databases that are being accessed.
  • Local User: Users who are assigned this role cannot use distributed navigation.
Administrator accounts

Administrators must be members of the securityadmin or sysadmin groups to grant permissions to domain users.

To run the BAM Management utility, you must be at least a database operator for the BAM databases.

Final Notes

I would like to thank Nino Crudele for the help that he gave me to solve this problem and to my coworker and friend José Barbosa who helped me creating these SQL scripts and as result solving the problem.

And a final note for all system administrator… please don’t delete Active Directory accounts… instead disable them!!



BizTalk Host Instance stuck in “Stop pending” state when trying to restart the instance

$
0
0

Last week I have encountered an unusual situation in my BizTalk Server 2010 production environment… when I was trying to restart BizTalk Host Instance after publishing a small change in one of my applications, one of the host instances got stuck in “Stop pending” state.

host-instance-state

The major problem of this stage is that we cannot perform any kind of operations on it through BizTalk Server Administration Console or Service window

services-windows

CAUSE

Well, unfortunately, I don’t know exactly why this problem has occurred, but I came across with these posts:

And I believe that this problem was due to the deploy, unfortunately and against my suggestions, the client had not installed the latest CU (I think that the last CU installed, was the CU2)

SOLUTION

First of all I suggest that you install the latest CPU available.

But because this was a production environment and I needed to solve the problem quickly the solution to solve this problem is to kill the process via Windows Task Manager! Is not an elegant solution, I know and please avoid doing it.

Then go to BizTalk Server Administration Console or Service window and start the process.

Another precaution that you must have, if you have multiple Host Instances, is to know what is the process id of the host instance in order to terminate the correct one, you can accomplish this following the steps in this post:

Related links:


Error while building a BizTalk 2006 solution on Visual Studio 2005: The key container name ‘key.snk’ does not exist

$
0
0

Today while I was playing with BizTalk Server 2006, yes I know very old stuff, but sometimes is needed… and for those who are accustomed to developer BizTalk solutions knows that we need to sign the project with a strong name assembly key file before we deploy them… nothing new.

The funniest part came when I tried to build the solution in Visual Studio, and I ended up getting this odd error:

Cryptographic failure while signing assembly ‘Myproject.dll’ — ‘The key container name ‘MyKey.snk’ does not exist’

At first I thought I had set the path to the key wrong, but I quickly realized that was not the case, and if that was the case, we would have received a different error message:

Cryptographic failure while signing assembly ‘Myproject.dll’ – ‘Error reading key file ‘MyKey.snk’ — The system cannot find the file specified’

CAUSE

You have incorrectly defined a strong name key file!

The process to sign the project in Visual Studio 2010 is very different than in Visual Studio 2005. In 2005 we have 3 properties:

  • Assembly Delay Sign
  • Assembly Key File
  • and Assembly Key Name

And we normally only need to configure the “Assembly Key File”… however, in my case I copied and configure the wrong property without intention which led to me to receive this error message, hehehe

assembly-sign-strong-name

SOLUTION

That easy, you have to properly configure the property "Assembly Key File"

Hehehe… Everyone make mistakes, hehehe lesson learned.


TechNet Wiki Article: List of BizTalk Errors and Warnings, Causes and Solutions

$
0
0

I know that in the past I already wrote about this article but I just love it… The “List of BizTalk Errors and Warnings, Causes and Solutions” article is intended to be a knowledge base of all Errors and Warnings, Causes and Solutions documented in all stages/components of BizTalk: different stages of development, deployment, adapters, runtime, setup and configuration… and this list can prove to be very useful for BizTalk developers and administrators.

And did you know he already have 160 reviews and more than 140 errors or warnings documented!

The article started with 6 different topics: “Visual Studio Orchestration Design Issues”, “Visual Studio Schema Design Issues”, “Visual Studio Mapper Design Issues”, “BizTalk Deploy Issues”, “BizTalk Adapters Issues”, “BizTalk Runtime Issues”. But he grew in his first year of life, thanks also to the support of some members of the community (I won’t mention any names to avoid the mistake of forgetting someone) and now it have 16 different topics covering errors since BizTalk Server 2006 to the most recent version: BizTalk Server 2013!

BizTalk-List-Errors-Warnings-Causes-Solutions-techNet-Wiki-Article

Why TechNet Wiki?

For me TechNet wiki is a best place to compile such a list because is open to all community for them to add, modify and update his content, making it always up to date.

Call for action

As soon I find new errors and solutions, I’ll try to keep this list updated and I know that there are still many errors and solutions that are not here… So what you are waiting for! I challenge you all to help improve this amazing knowledge base list by adding new content.

You can find the TechNet Wiki article here: BizTalk: List of Errors and Warnings, Causes and Solutions


BizTalk BAM Portal URL authorization failed for the request (Event code 4007)

$
0
0

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)…

When I try to access to BAM Portal with the user that made ​​the deploy of this BAM Definition, if you don’t know, the user that makes the deploy have necessarily access to this particular view in the 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.


BAM: The cube "MyView" was not processed. Please run the cube DTS to process the cube

$
0
0

After I deploy a BAM activity to a new BizTalk Server 2010 environment I create a job called “BAM Generic Import data” to import all BAM data information to OLAP Cubes that will be presented on Aggregations tab in the BAM Portal.

However when I try to manual execute the job I got an error messages saying:

“The cube “MyView” was not processed. Please run the cube DTS to process the cube”

When I went to the event viewer I saw several Bam Event Provider warning messages with the following details:

Bam-Event-Provider-warning-messages

Log                Job History (BAM Generic Import data)
Step ID                0

Server                MyServer\BIZTALK
Job Name                BAM Generic Import data
Step Name                (Job outcome)
Duration                00:00:00
Sql Severity                0
Sql Message ID                0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted                0

Message

The job failed. Unable to determine if the owner (Domain\User) of job BAM Generic Import data has server access (reason: Could not obtain information about Windows NT group/user ‘Domain\User’, error code 0×2. [SQLSTATE 42000] (Error 15404)).

CAUSE

This error most likely when the machine account that runs the job (BAM Generic Import data) doesn’t have permission to query the AD.

Job-BAM-Generic-Import-Data-ower

SOLUTION 1

I would recommend requesting to the AD administrator access to this user or change owner that runs this job to a low-privileged domain account that has proper permissions on the AD – Members of the Domain should be enough.

SOLUTION 2

However in my case the AD administrator was in vacation and the other unavailable and my user account indeed didn’t have permission to query the AD (don’t ask me why) so the only solution that I found to try to solve the problem was to change the owner to the SQL Login System administrator (sa) that, lucky, wasn’t locked.

Job-BAM-Generic-Import-Data-ower-fixed

And problem solved … at least momentarily until we can apply the solution 1


The file ‘…’ cannot be copied to the run directory. The process cannot access the file because it is being used by another process.

$
0
0

I’ve been working on a BizTalk Server 2004 project that had (not any more) between 6 or 8 visual studio solutions each one with a BizTalk Project inside. After a few minutes swapping from a solution to another I decided to add all the project in a single solution.

I notice that all the solution are configure to build the assemblies to a common reference folder shared by all projects:

Visual-studio-2003-build-options

And the other project are referring the assemblies from that folder.

However when trying to compile the project I was getting the following error:

The file ‘MyDLLProject.dll’ cannot be copied to the run directory. The process cannot access the file because it is being used by another process.

But when I open that project isolated from the others projects I could successfully compile.

CAUSE

The cause is easy… the Visual Studio has a lock on the file.

Note: That this lock could be from the Visual Studio instance that you are working on or another Visual Studio instance in another session.

SOLUTION 1

The easy solution to avoid further problems is to change the “Output path” to another location for example the default “bin\Development\”

And then instead of referring the assembly from a folder, chose Add reference from Projects

Visual-studio-2003-add-reference-from-project

Work like a charm!

SOLUTION 2

Close all the Visual Studio solution that reference this assembly or assemblies and build the project.


An error occurred while attempting to install the BizTalk application: World Wide Web service (W3SVC) on host "localhost" not available

$
0
0

Today I encountered the following issue when I was trying to install an application into a new BizTalk Server environment:

An error occurred while attempting to install the BizTalk application: World Wide Web service (W3SVC) on host “localhost” not available.

The following Windows component may not be installed: Application Server -> Internet Information Services (IIS) -> Common Files.
Unknown error (0×80005000)
Unknown error (0×80005000)”

World-Wide-Web-service-not-available

Note: This error occurred either if I try to install the application by or the MSI or by the BTSTask tool and this error is also followed by other two errors with no particular or interest information.

CAUSE

On a particular note, when I’m installing or configuring a new BizTalk environment I really prefer to install all features that BizTalk provides like BAM, BRE, … even though I don’t need them , at least for now, since we do not know the challenges of tomorrow and I try to follow all the guidelines provided by Microsoft or community members.

However we sometimes find clients that don’t install all components simply because they don’t need them for now, or even worse, they don’t install all the features necessary like IIS 6 Management Compatibility role services because for them it makes no sense

The problem this time was that IIS 6 Management Compatibility role services was not installed.

The Deployment Framework for BizTalk includes support for deploying application pools and virtual directories in IIS.  Virtual directory and application pool deployment is fully active for server deployments.

Due to IIS 7.0/7.5 includes significant change on the configuration system, on Windows Server 2008 and above, we need to enable IIS 6 Management Compatibility role services: IIS Metabase and IIS 6 configuration compatibility, IIS 6 WMI Compatibility and IIS 6 Scripting Tools to allow System.DirectoryServices code work on modifying IIS configurations on IIS7.x.

This topic is clearly documented in BizTalk 2010 installation guides.

SOLUTION 1

To solve this problem you must enable IIS 6 Management Compatibility role services by following the steps below:

  • Go to Administrative Tools à Server Manager
  • Select “Roles” and under “Web Server (IIS)” select “Add Role Services”
  • On the “Select Role Services” window, check the box next to “IIS 6 Management Compatibility”. Make sure you checked all four options below it.

IIS-Select-Roles-Services

Note: After this steps you need to restart the ISS.

SOLUTION 2

In alternative you can install these features by using PowerShell:

Import-Module ServerManager
@("Web-Server",
"Web-Http-Errors",
"Web-App-Dev",
"Web-Asp-Net",
"Web-Net-Ext",
"Web-ASP",
"Web-CGI",
"Web-ISAPI-Ext",
"Web-ISAPI-Filter",
"Web-Includes",
"Web-Basic-Auth",
"Web-Windows-Auth",
"Web-Mgmt-Compat",
"Web-Metabase",
"Web-WMI",
"Web-Lgcy-Scripting",
"Web-Lgcy-Mgmt-Console"
)| Add-WindowsFeature

You can download this PowerShell script from:

Enable all the requires IIS features for BizTalk Server with PowerShell
Microsoft | TechNet Gallery



Could not create SSOCSTX. To fix the problem, reinstall SSO or install SSOCSTX.dll into a COM+ library application.

$
0
0

First of all let me apologies for my long absence, almost passed a month since I wrote the last time on my blog and for me is a long time but I’m back… and I assure you that I haven’t been standing doing nothing, on the contrary, I’m working in several white papers, reviewing others, speaking in events, a lot of work and so on… so I still will publish a lot content this year.

Today after installing .NET Framework 4.0 in my BizTalk Server 2006 Lab environment and of course restart the machine, the Enterprise Single Sign-On Service stopped working.

The first error that I found was:

“Could not create SSOSQL. To fix the problem, reinstall SSO or try ‘regasm SSOSQL.dll’ from a Visual Studio command prompt.
Error Code: 0×80131700”

This was an error that I already blogged in the past and you can find more information here. But basically you need to fix the Enterprise Single Sign-On by running the following command: regasm SSOSQL.dll.

After solving this problem I tried to start it manually the SSO Service but surprisingly, I got two new errors in the event viewer:

“Could not create SSOCSTX. To fix the problem, reinstall SSO or install SSOCSTX.dll into a COM+ library application.
Additional Data: 93
Error Code: 0x8004E00F, COM+ was unable to talk to the Microsoft Distributed Transaction Coordinator”

Could-not-create-SSOCSTX-error

Followed by:

“The SSO service failed to start.
Error Code: 0x8004E00F, COM+ was unable to talk to the Microsoft Distributed Transaction Coordinator”

The-SSO-service-failed-to-start-error

At this point for me it was clear I have issues with MSDTC.

After searching a little I found the first possible solution that basically told me to u reinstall the Microsoft Distributed Transaction Coordinator (MSDTC) to resolve the issue, of course this was a solution that I was trying to avoid.

SOLUTION

The first thing you must do is to check if the MSDTC is running and make sure the MSDTC security settings are configured correctly:

  • Network DTC Access – Checked
  • Client and Administration
    • Allow Remote Clients – Checked
  • Transaction Manager Communication
    • Allow Inbound – checked
    • Allow Outbound – Checked
    • No authentication required – checked

In my case everything was properly configured so next step:

  • Why not try to restart the Microsoft Distributed Transaction Coordinator (MSDTC) service?

Since that is the cause of the current problems… that seams a good idea, better this that reinstall the MSDTC J

Wow! Bingo! Found the solution to all my problems! After restarted successfully the MSDTS Service I was able to start the Enterprise Single Sign-On Service and of course the BizTalk Services with success.


Enterprise Single Sign-On Event ID 10589: The master secret has not been backed up

$
0
0

In my case this error occurred when I was recovering an old BizTalk Server 2004 development environment:

The master secret has not been backed up. If you lose the master secret all the information stored in the SSO system will be lost permanently and your systems may fail to work correctly. Please use the SSO admin tools to back up your master secret.

Event-ID-10589-the-master-secret-has-not-been-backed-up

And this is actually a well know error and that can occurs is all the versions of BizTalk Server and not only in 2004 version and also very easy to solved.

CAUSE

The reason for this error is that the master secret has not yet been backed up. And you need to be very careful because if you lose the master secret all the information stored in the SSO system will be lost permanently and your systems may fail to work correctly.

SOLUTION

As I mentioned earlier, this error is extremely easy to solve and for this we only need to:

  • On the “Start” menu, click “Run” and type “cmd” to open the Command Prompt.
  • At the Command Prompt window, go to the Enterprise Single Sign-On installation directory.
    • The default installation directory is “C:\Program Files\Common Files\Enterprise Single Sign-On”
  • And type the following command to backup your master secret key:
    • ssoconfig -backupsecret <full path to the backup file>
  • This command will ask you to provide a password and a reminder as you can see in the picture bellow:

ssoconfig-backupsecret-command

After that you master secret will be backed up and the error will be solved.

the-master-secrets-were-successfully-backed-up

Other references:


Receiving a time out error while trying to invoke a BizTalk Orchestration exposed as a service (WCF)

$
0
0

Today I want to talk about a very common problem that can occur when we are invoking BizTalk Orchestrations exposed as a synchronous services (Request-Response Receive ports):

"System.Net.WebException: The operation has timed out"

System-Net-WebException-The-operation-has-timed-out-BizTalk-Orchestration

In my case I was trying to invoke an orchestration exposed as a WCF service. And of course this can be very straightforward problem, most of the times easy to detect and probably also to fix… but sometimes BizTalk tries to play with us and throw a few good surprises…

TYPICAL CAUSES AND SOLUTIONS

Typically this problem is usually associated with network problems or lack of Error Handling inside Orchestrations:

  • You are trying to invoke an external system inside the orchestration and it take too much time to respond and naturally we get a time out error.
    • The SOAP.ClientConnectionTimeout property can be used on a Web service that take a long time to return a response to try to solve or address this problem. See more here.
  • You can have a High Volume of request and you can overload the external service with too many concurrent calls or you can have limits of max connections to a certain address and will naturally this can cause affect the performance and provably will take too much time to respond.
  • This error can also occur when the BizTalk performance get degraded and it start responding slow. If the BizTalk jobs are not well configured and running the size of BizTalk Databases can grow extremely and responding very slow and we get stuck with this error.
    • You need to validate the jobs and the database and if necessary you need to configure the jobs and clean the databases with the Terminator tool and provably shrinking also the databases to resolve the problem.
  • Also you can get this error because you don’t want to handler errors inside orchestrations, so for example if you don’t handler WCF Fault messages from your external service or you are invoking a C# code and it raise an exception, and you are note handling this situations in your orchestration, the orchestration will be suspended an you will get a timed out exception.
Nothing fit in the problem. What can it be?

But … and when all this is checked and doesn’t fit in the problem that is happening. What can it be? Before explain let me describe my scenario:

  • I have a simple demo service that receive a small message, invoke an external service and return the message to the source system.
  • Because of API limitation I decide to invoke this external services with C# and control Exception inside orchestrations.
  • I know by using HAT and debugging in DEV environment that the external service was giving me a known error that I was controlling and throwing the error in order to create a response with the error description, inside the orchestration, to be returned to the original system.

So nothing to fancy and very simple stuff. However every time I tried to test the orchestration the orchestration was stuck in the message box in suspended state… the external service was invoked, the error was catch in the code, logged and the exception was raised for the orchestration and after that nothing … the engine seemed unaware and did not understand what was happening, crazy I know.

0XC0C01B52-Orchestration-Engine-Error

When I investigated the Event Viewer to try to find more information I found this description:

xlang/s engine event log entry: Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘MyOrchestration(728766c9-9df2-609b-004e-fa2e7c3079c4)’.
The service instance will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 4dfd6041-d52f-4110-8d0d-92efc48f0c38
Shape name: InvokeExternalService Shape
ShapeId: eff276fd-f289-4778-ba47-ff66309ae8c6
Exception thrown from: segment 2, progress 8
Inner exception: Fault Response: My Error Description

The first thing I thought was that I incorrectly published some resource (DLL) … but after validating and publishing the solution again, the problem prevailed.

CAUSE

The Orchestration Designer can play some tricks to developers. And be very careful when you copy shapes from one orchestration to others!

What I did was open a similar solution and copy the main scope (body of the orchestration) to a new solution that I had created. This will also copy all the shapes inside the scope… and of course I change the shapes to fit my new requirements, by deleting some shapes and change the code inside others… Why? To be faster and not lose much time creating the main sketch of the orchestration.

But be aware that the Orchestration design don’t like some of this operations (for me it’s a bug inside Orchestration design), and for some reason the designer doesn’t interpret well the shapes (“refactoring” or the “graphical interpretation”). He compile when the solution but in runtime we get stuck with the error “The service instance will remain suspended until administratively resumed or terminated. If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.”

I don’t know if some also detect this behavior before but I already experience this twice.

SOLUTION

To solve this strange behavior you need to redesign the same Orchestration flow by:

  • Dragging new shapes to the Orchestration design and copy the exact same code inside the existing shapes to the new ones… you can also give the same names!
  • At the end delete the existing shapes (which had been copied).
  • Compile and deploy the project again.

Without doing anything more this solved my problem.


BizTalk Adapter 2.0 for mySAP Business Suite: Error in Check Transaction Failed to load the runtime

$
0
0

This weekend after installing .NET Framework 4.0 in a BizTalk Server 2006 R2 environment, the BizTalk Adapter 2.0 for mySAP Business Suite started to throw the following error when he tried to receive data from the SAP system.

“Event Source: BizTalk Adapter v2.0 for mySAP Business Suite
Description: Error in Check Transaction: Failed to load the runtime.
(Exception from HRESULT: 0×80131700)”

BizTalk-Adapter-mySAP-Business-Suite-Transaction-Failed-to-load-the-runtime

CAUSE

This issue occurs after installing .NET Framework 4.0. The registration of the assembly used by mySAP Business Suite does not specify the correct version of the .NET Framework. When .NET Framework 4.0 is installed, the assembly will try to use the newer framework and then raise this error.

SOLUTION

You need to manually reregister the sapreceiver.dll (this DLL is usually in this folder: “C:\Program Files\Microsoft BizTalk Adapter v2.0 for mySAP Business Suite\”). To accomplish that you need to:

  • Execute cmd (Start → cmd)
  • Type “cd C:\Windows\Microsoft.NET\Framework\v1.1.4322”
  • And execute the following command to fixed the problem:
    • regasm.exe “C:\Program Files\Microsoft BizTalk Adapter v2.0 for mySAP Business Suite\sapreceiver.dll”

Note: When you install .NET Framework 4.0 in older versions of BizTalk Server like BizTalk Server 2006 or 2006 R2, normally, you will also have problems with the Enterprise Single Sign-On Service for the exact same reasons and the solution is also to manually reregister the DLL but this time the SSOSQL.dll. To find more about this error check: Fixing BizTalk ENTSSO – Could not create SSOSQL. To fix the problem, reinstall SSO or try ‘regasm SSOSQL.dll’ from a Visual Studio command prompt.

References:


Backup BizTalk Server job failed: The last step to run was step 2 (BackupFull). The job was requested to start at step 1 (Set Compression Option)

$
0
0

For several years I’ve been setting up dozens of times the Backup BizTalk Server job without any kind of problems… but there’s a first time for everything and when I was trying to help remotely a friend configuring this job, we got stuck with this error when we try to start it:

Log Job History (Backup BizTalk Server (BizTalkMgmtDb))
Step ID 0
Job Name Backup BizTalk Server (BizTalkMgmtDb)
Step Name (Job outcome)
Message
The job failed. The Job was invoked by User domain\user. The last step to run was step 2 (BackupFull). The job was requested to start at step 1 (Set Compression Option).

Backup-BizTalk-Server-job-error-message

I knew that the job was configured correctly but unfortunately I didn’t have access to the SQL Server in order to see if I could find out more information about what was happening… Well, according to the error message we know that the job started in the first task “Set Compression Option” but failed in the second “BackupFull”. Beyond that the error message doesn’t help us much.

By going to the job history (right click in “Backup BizTalk Server (BizTalkMgmtDb)” job and select “View History” option)) we can validate that the problem in the BackupFull task but again the message described there doesn’t help us much.

Backup-BizTalk-Server-job-error-history

CAUSE

Unfortunately this error can happen for several reasons and we need to check what the best option for us is::

  • In Microsoft BizTalk Server 2004 and later, the Backup BizTalk Server job fails, and problems occur that relate to limited disk space. This happens when the backup files accumulate over time. This fills up the disk that houses the backup files.
    • This issue occurs because the SQL Server Agent job that is named “Backup BizTalk Server” does not provide functionality for deleting backup files that have accumulated over time. See: The “Backup BizTalk Server” job fails when backup files accumulate over time in the Microsoft BizTalk Server database server
    • Or you can create a Maintenance Plan to delete BizTalk Database Backups files see more here
    • I found also this great suggestion by Tord Glad Nordahl: “Verify that the compression option for the database is correct, after this open the management database located the table called “adm_BackupSettings” update this column “ForceFull” and set the value to 1. Then manually run the backup job again.” In this forum question.

But none of these suggestions work for me, in fact this was the first time that we were trying to run the job.

However sometimes solutions are simpler than it seems. If you check the parameters of the BackupFull step you will see that the third parameter is the location of backup files and this location must exist in the file system… so because I didn’t have access to the SQL Server machine, I asked to my friend to:

  1. Validate if the folder exist in the file system;
  2. See in the event viewer of the SQL Server if there was more information about the error;

The result was:

  1. The folder didn’t exist… never a good sign
  2. In the event viewer of the SQL Server Machine there was an entry saying the exact problem:

BackupDiskFile::CreateMedia: Backup device ‘K:\Backups\BizTalk Database\Full\BTS2013LAB01_BAMAlertsApplication_Full_BTS_2013_11_11_16_45_25_870.bak’ failed to create. Operating system error 3(The system cannot find the path specified.).

SOLUTION

You must remember that you need to ensure that all the paths specified in the BizTalk jobs must exist in the file system. In my case, we create the folder on the file system and run the job again with success.

Backup-BizTalk-Server-job-success


Viewing all 95 articles
Browse latest View live