Recently I was testing a new BizTalk solution version with a couple of new features when I came across with the following error:

Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘MyService(4dfd3eeb-5cb2-9ca5-2e15-59dd321e72ed)’.
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: b8b6c570-516c-4e40-a07a-96632f7e8506
Shape name:
ShapeId:
Exception thrown from: segment -1, progress -1
Inner exception: Could not load type ‘type name’ from assembly ‘assembly name, Version=1.0.0.0, Culture=neutral, PublicKeyToken=…’.
Exception type: TypeLoadException
Source: …
Target Site: Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions)

This error occurs after invoke the service or after dropping a file to the receive location.

CAUSE

  • You didn’t install the assembly specified in the error.
  • Your DLL depend on other DLL’s to get its job done and if you didn’t copy or install those too, you’d indeed get this error message.
  • Or you have installed an older version of the assembly.

This error occurs often when we use C# HelperClass to support the orchestrations, but can occur in other situations.

SOLUTION

Make sure that you have the last version of the assembly installed.

  • Rebuild the solution.
  • Deploy the correct solution.

Tags: BizTalk | Errors and Warnings, Causes and Solutions

A few months ago I wrote a post where I explained how the services should be configured and why, I also show how you can configure them manually, but… it would be interesting to be able to create a script or run a command that allow us to automatically configure them.

To accomplish that you need to start Windows PowerShell from the Start menu, click Start, click All Programs, click Accessories, click the Windows PowerShell folder, and then click the Windows PowerShell item and type:

get-service BTSSvc* | foreach-object -process { SC.EXE config $_.Name start= delayed-auto}

Result:

configure-biztalk-services-automatic

Tags: BizTalk | PowerShell | Hosts

I was interviewed by Steef-Jan Wiggers for the Monday series, "Interview with a Wiki Ninja!" on TechNet Wiki Blog, and let me say what a great honor!

You can find his questions and my answers here. Where I talk a little about myself, about TeckNet Wiki and give some suggestions for other community members who hope to eventually become MVPs. This was the first time I was interviewed J, hope you like it!

interview-sandro

Thanks Steef-Jan for inviting me to this interview, and congratulations for the great job that you have been doing for the BizTalk community.

Tags: TechNet | BizTalk Community

It’s very common to use .NET code for orchestration support and also to log errors, warnings or information in Event Viewer. I have as a principle, not to register this type of information on Application Event Log. For me this log is to be use by system applications like BizTalk, SharePoint and others, so if we register all custom information in this log, we can infest the log with unnecessary information and lose or difficult the visualization of important information. I advise the creation of one or more custom logs and for that I use this code:

if (!System.Diagnostics.EventLog.SourceExists(sourceName))
{
System.Diagnostics.EventLog.CreateEventSource(sourceName, logName);
}
System.Diagnostics.EventLog.WriteEntry(sourceName, genericString.ToString(), logType);

However when I installed one BizTalk Application in a brand new environment I caught this error:

xlang/s engine event log entry: Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘My.Orchestrations.Orch(f0b8a3ff-15cd-03db-2c20-4530bda13468)’.
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: a69409e2-094c-4f5b-9dd6-f448eec3bd3c
Shape name: Response Error Construct Msg
ShapeId: 95ffeaaa-dd23-4c09-8e3e-7fcd07342a11
Exception thrown from: segment 3, progress 3
Inner exception: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.

Another typical error is: You receive the “Requested registry access is not allowed” error message when you try to create a custom event log

CAUSE

This problem occurs because the user account that you used to log on does not have sufficient permissions.
The first time that you call the EventLog.CreateEventSource() method to create a custom event log, the custom event log entry is created under the following registry subkey:

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog

To create this subkey entry, you must have permission to write. However, the regular user account does not have permission to write.

So, the user that runs the application must have administrative rights to create a new event log source or a new custom log.

SOLUTION

You need to grant permission to create a custom event log:

  • Log on to the computer as an administrator.
  • Click Start, click Run, type regedit in the Open box, and then click OK. The Registry Editor window appears.
  • Locate the following registry subkey:
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog
  • Right-click Eventlog, and then click Permissions. The Permissions for Eventlog dialog box appears.

eventviewer-permissions

  • Click Add, add the user account or group that you want and set the following permissions: “Full Control”

eventviewer-permissions-options

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

Recently after installing a new version of one BizTalk Application, in order to provide a new service and after having validated all the normal steps of an installation:

  • Check the correctly installation (in BizTalk Management Console and in the Global Assembly Cache (GAC))
  • Correctly Application Binding
  • Restart Host instances

I keep getting this error:

There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "IN_PORT" URI: "/MyService.WS/WebService_Provisioning.asmx" Reason: The document specification <Project.Schemas.MyRequest> from assembly <Project, Version=1.0.0.0, Culture=neutral, PublicKeyToken=776eb620b83c3d30> failed to load. Verify the schema for this document specification is deployed and is in the Global Assembly Cache.

CAUSE

This error can happen for several reasons!!

  • Your DLL was not correctly installed (not installed or missing from GAC).
  • Misunderstanding in framework version that you used.
  • Forgetting to restart services so that it reflects the new changes

SOLUTION

Because this error can happen for several reasons you may have many solutions to this problem. These are some steps that you should take to resolve the issue:

  • Verify if the Assembly is correctly deployed (check if your DLL is in the BizTalk Management Console and in the Global Assembly Cache (GAC)). If the assembly was not found, you need to redeploy correctly the BizTalk Project or run gacutil to install the DLL in GAC.
  • Verify if the Application Pool (in case of Service) is running and correctly configured.
  • Verify the .NET Framework version of the Application Pool. If the application pool is running .NET Framework 2.0 and BizTalk solution is using other version of .NET Framework, at runtime it will not find the Assembly in GAC (.NET Framework version needs to be consistent.). In this case you need to change the .NET Framework version used in the BizTalk projects or change the Framework used in the App Pool.
  • Restart host instances

However, there is another step which usually is not referenced!

If you are using a Request-Response Port, normally using WCF or SOAP adapter, making restart only to Host Instances is not enough. This type of port is running over BizTalkServerIsolatedHost so you need to also restart App Pool associated with your services.

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

This part of the article will focus on configuring TCP setting on BizTalk server and the SQL server machines that can impact BizTalk Server and that can prevent from occurring general network errors.

When I was analyzing my BizTalk environment with BizTalk Server Best Practice Analyser tool, has appeared a warning that caught my attention:

Privilege Attribute Certificate (PAC) Signature Validation is Enabled on Server BTS2010LAB01.
On server BTS2010LAB01, Privilege Attribute Certificate (PAC) signature is enabled, which may cause some user-authentication delay

And led me to go deeper in trying to see what was causing this strange issue and I found a number of TCP settings that needs to be done (or is recommended) which can also prevent from occurring general network errors on BizTalk Server Environments.

In the scenario described in this series of articles we should apply the following TCP/IP settings:

  • Disable the Scalable Networking Pack (SNP) features
    • This needs to be done on the BizTalk Server and the SQL Server
  • Disable Privilege Attribute Certificate (PAC)
    • This needs to be done on the BizTalk Server and the SQL Server
  • Check and if necessary increase the ephemeral ports and reduce the TCP re-use timeout setting
    • This needs to be done only on the BizTalk Server
How to Disable the Scalable Networking Pack (SNP) features

Scalable Networking Pack (SNP) be used, under specific circumstances, to improve network performance, however, most environments do not have SNP capable network adapters/drivers. This can result in unexpected network problem which is why it is recommended to disable SNP unless a server can benefit from it.

To disable SNP features we need to:

  • Disable TCP Chimney Offload in the operating system
    • Use administrative credentials to open a command prompt.
    • At the command prompt, type the following command, and then press ENTER:
    • netsh int tcp set global chimney=disabled
  • Disable RSS in the operating system
    • Use administrative credentials to open a command prompt.
    • At the command prompt, type the following command, and then press ENTER:
      • netsh int tcp set global rss=disabled
  • Disable NetDMA in the operating system
    • Click Start, click Run, type regedit, and then click OK.
    • Locate the following registry subkey, and then click it:
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
    • Double-click the EnableTCPA registry entry.
      • Note: If this registry entry does not exist, right-click Parameters, point to New, click DWORD Value, type EnableTCPA, and then press ENTER.
    • To disable NetDMA, type 0 in the Value data box, and then click OK.

To determine the current status of SNP features, follow these steps:

  • Use administrative credentials to open a command prompt.
  • At the command prompt, type the following command, and then press ENTER:
    • netsh int tcp show global

Note: you need to restart the computer first.

How to Disable Privilege Attribute Certificate (PAC)

The Privilege Attribute Certificate (PAC) is a function invoked within the Windows security system when you log on to a system utilizing Kerberos. It is a network authentication protocol.

The Kerberos Privilege Attribute Certificate (PAC) contains all of the group memberships for the security principal requesting access to a resource. PAC validation means a more secure environment so why should be disabled?

When you run a high-volume server program on a domain member that uses Kerberos to authenticate users, you experience a delay in the user-authentication process. Additionally, you notice an increase in the remote procedure call (RPC) traffic between the domain controller that uses the Net Logon RPC interface and the server. This problem occurs because the Kerberos client verifies the Privilege Attribute Certificate (PAC) signature in the Kerberos ticket by using the domain controller. The Kerberos client performs this verification to prevent PAC spoofing. The increased network traffic is generated by the RPC requests that are part of this verification process.

To disable PAC we need to:

  • Click Start, click Run, type regedit, and then click OK.
  • Locate the following registry subkey, and then click it:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Parameters
  • Add the following registry entry
    • Right-click Parameters, point to New, click DWORD Value, type ValidateKdcPacSignature, and then press ENTER.
  • To disable PAC, double-click the ValidateKdcPacSignature registry entry and type 0 in the Value data box, and then click OK
How to Check and if necessary increase the ephemeral ports and reduce the TCP re-use timeout setting

When a client initiates a TCP/IP socket connection to a server, the client typically connects to a specific port on the server and requests that the server responds to the client over an ephemeral, or short lived, TCP or UDP port.

Under certain conditions it is possible that the available ports in the default range will be exhausted. If this occurs the following symptoms may be observed:

  • Client applications may fail to connect to the BizTalk Server.
  • The BizTalk Application service may fail to connect to a remote SQL Server.
  • BizTalk Server adapters may fail to connect to a remote server.

To verify that one or more client applications are not generating excessive TCP/IP socket connections perform the following on the BizTalk servers in the group:

  • From a command prompt window execute “netstat -ano -p tcp”.
  • Count the number of unique Local Address TCP ports open above 1024 for each IP address.

If less than 3000 ephemeral ports are currently in use then it’s fine. (Original source: Recommended Platform Configuration for BizTalk Server by Abdul Rafay)

You can check or modify these settings at the HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters registry key. The recommended values are:

  • Registry name: MaxUserPort
    • Value: 0xFFFE (65534)
    • Comment: Prevents port exhaustion
  • Registry name: TcpTimedWaitDelay
    • Value: 0x1E (30)
    • Comment: Release unused ports as quickly as possible

Or you can view the dynamic port range by using the following netsh commands:

  • netsh int ipv4 show dynamicport tcp
  • netsh int ipv4 show dynamicport udp

On all BizTalk servers running on Windows Server 2008, Microsoft recommend not modifying the dynamic port range. However, if you determine that additional dynamic ports are needed you can also use netsh command to modify these settings, as follows:

  • netsh int <ipv4|ipv6> set dynamic <tcp|udp> start=number num=range

This command sets the dynamic port range for TCP. The start port is number, and the total number of ports is range. Example:

  • netsh int ipv4 set dynamicport tcp start=10000 num=1000

These sample commands set the dynamic port range to start at port 10000 and to end at port 11000 (1000 ports).

Important notes:

  • The minimum range of ports that can be set is 255.
  • The minimum starting port that can be set is 1025.
  • The maximum end port (based on the range being configured) cannot exceed 65535.

See Microsoft Help and Support

 

At the end you should restart BizTalk and SQL Servers.

Other sources TCP settings that can impact BizTalk Server

Related Links

Tags: BizTalk 2010 | Installation | Configuration

For the BizTalk Portuguese Community, I publish an article call “BizTalk Server – Basics principles of Maps (Part 2)” on the Magazine “Programar” and soon I will translate to English.

Programar-edicao-33

Já está disponível a 33ª edição da Revista PROGRAMAR, uma publicação digital gratuita com diversos artigos relacionados com desenvolvimento de software.

Esta edição contém um artigo da minha autoria sobre o editor de mapas do BizTalk Server e têm como objectivo explicar como os mapas são processados internamente pelo motor do produto à medida que exploramos o editor de mapas do BizTalk Server.

Espero que gostem! E aproveitem para dar a sua opinião votando nos 3 melhores artigos desta edição aqui.

Outros conteúdos desta edição:

    • Tema de capa
      • Kinect Hack
    • A programar
      • Geração de Números Aleatórios – Parte 3
      • Programação Orientada aos Objectos em Pascal
      • Herança com JavaScript
      • CORE DUMP – Ambientes Produtivos
      • Enigmas de C#: Disposable Structs
      • SQL Azure Federations na Pratica
    • Visual (Not) Basic
      • VISUAL (NOT) BASIC -Iterators
    • Comunidades

Tags: BizTalk | Articles

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

As soon I find new errors and solutions, I’ll try to keep this list updated. However I challenge you all to add new content to this topic making it always up to date.

I know that there are still many errors and solutions that are not here….

TechNet-Wiki-Errors

TechNet Articles  >  BizTalk: List of Errors and Warnings, Causes and Solutions

See also BizTalk Server Resources on the TechNet Wiki

Tags: BizTalk | Wiki

For some reason after having migrated a BizTalk 2006/Visual Studio 2005 solution to BizTalk 2010/VS 2010 using VS Conversion Wizard, I got the following error:

"Errors exist for one or more children."

Following for another saying he did not recognize certain message, which honestly was a little strange, I should have a total about 20 “false” errors Sorriso.

CAUSE

Typically this problem is usually associated with problems in Orchestration Designer “refactoring” or “graphical interpretation” and in a certain way it isn’t a “valid error”, ie, it doesn’t describe the real problem.

Usually this error is followed with a red indicator on the shape; however this was not my case, I had no indicator, but had the same error.

SOLUTION

If you have a shape indicator, enter in the shape:

  • Copy and delete the existing code and press ok to leave the shape;
  • Go back to the shape again and put the same code there;
  • Compile the project again;

In my case, I did the same strategy on the first shape where I had code (Message Assignment) that referenced the message that he said that did not recognize.

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

This post is not really about BizTalk… but since I’ve been configuring several environments in my client I decided to take this notes. Basically we have some BizTalk processes that communicate with database in SQL Server that we are moving to SQL Server 2008 R2.

Consideration 1: Change Edit Top 200 Rows and Select Top 1000 Rows

SQL Server Management Studio is configured by default, for performance reasons, with the following options:

  • Select Top 1000 Rows
  • Edit Top 200 Rows

default-options-select-edit-sql

In my opinion I think these quantities a bit exaggerated and I suggest you to always reduce them. In my LAB environment I set the following values:

  • Select Top 100 Rows
  • Edit Top 100 Rows

my-options-select-edit-sql

However in production environment you should reduce more this numbers, maybe 20/10.

To modify these options you should:

  • Run the SQL Management Studio
  • Click in the menu Tools -> Options
  • Select the option “SQL Server Object Explorer” and edit the following properties:
    • “Value for Edit Top Rows Command”
    • “Value for Select Top Rows Command”

edit-options-select-edit-sql

Note: If we set these properties: ““Value for Edit Top Rows Command”, “Value for Select Top Rows Command” with the value 0 (zero) it will return all records from the table.

 

Consideration 2: Set a valid owner to database

As I said earlier, we did some database migration and when attempting to create a diagram (New Database Diagram) in one of these databases on SQL Server 2008 R2 I obtained the following error:

TITLE: Microsoft SQL Server Management Studio
——————————

Database diagram support objects cannot be installed because this database does not have a valid owner.  To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.

——————————

This error occurred in two situations:

  • After I performed a database restore from another server
  • Or after making a detached, move the files to a new directory and attached again

CAUSE

This error is being originated because the database does not have a valid owner.

The "no valid owner" issue usually comes up when databases are owned by SQL-authentication logins and are upgraded, detached/attached to another server, or restored from backup to another server.  The SID (a large number) doesn’t match any existing login on the new server, so the owner name remains whatever it was on the old server, but it is marked invalid.  Explicitly setting the owner to a valid principal on the server solves the problem.

SOLUTION

In order to solve this problem we have to:

  • Access database properties (select database, right-click and choose Properties)
  • Select “Files” tab
  • And give a valid user to database owner

valid-owner-sql-database

Note: A good best practice is to change the database owner immediately after creating, restoring or attaching a database. Unless you have a reason to do otherwise, I suggest you to specify “sa” or one SQL service user as the database owner.

Tags: SQL