Visual studio/ Biztalk pipeline template error : unable to find transmitpipeline.vstemplate please repair the product to fix this issue

After a fresh Biztalk 2016 installation, i was faced the following problem when trying to create a new send pipeline :


to address the problem , Sandro Pereira blog suggests to repair the BizTalk Server installation. it’s a good solution but not the only one . My workarround is to copy the missed templates without repair install. but how?

1-Copy missed templates from Biztalk ISO install :

BizTalk Server\MSI\Program Files\Developer Tools\BizTalk\Pipeline Files

to  biztalk install folder:

Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates\BizTalk\Pipeline Files

2-reinstall visual studio templates via cmd :

devenv.exe /installvstemplates

hope that will save you time investigating this issue!!



Git : ignore Biztalk « .cs » generated files

Developping Biztalk server atefacts become sometimes a headache to filter real changes files from auto generated ones when building from Visual studio. Building a Biztalk project generate the 4 following files:

*.odx.cs : orchestrations

*.btm.cs : maps

*.xsd.cs : schemas

*.btp.cs : pipelines

to configure Git tracker to ignore these files and not add them to the changes tab, we have to make some extra work.

1-Update the principal branch localy(develop or master depending the branching flow)

2-update the « .gitignore » file to add the previous 4 files extensions

3-delete the already existing files :

-open a cmd windows from the root git repository and execute these commands :

del /S *.odx.cs
del /S *.btm.cs
del /S *.xsd.cs
del /S *.btp.cs

commit the changes from visual studio.

4-update the Git cache to ignore tracking future generated « .cs » files from the same previous cmd window  :

git rm -r --cached *.odx.cs

git rm -r --cached*.btm.cs

git rm -r --cached *.xsd.cs

git rm -r --cached *.btp.cs


Hybrid Integration :Push data from Biztalk to Azure MySQL using Azure Functions

This article presents a solution to integrate a an Azure MySQL Db partner and push data from client’s On-Premise Biztalk  2013 (not R2) App. The big deal was the solution to implements, choices were:

1-No Bbuiltin Adapter for MySQL within Biztalk, so we need to buy one

2-Create a .Net helper to connect to.Not fun of cusomisation  like this, because it’s maybe source of future limitation regarding maintenance.

3-Use a cloude builtin solution and use Azure Functions

we implements the 3rd solution for some reasons :

-My client already has Azure subscriptions (so no extra cost)

-The maintainability of the solution and the haigh availability.

-Solution reuse as the Azure Functions can be used as an elegant REST API to call from other flows

-Adopt an Hybrid solution to prepare a migration of the flows to Windows Azure

-Use a serverless solution to run code on-demand without having to explicitly provision or manage infrastructure


How to achieve this?

Create the Function

First, we have to create a resource group, please refere to the following link :

Steps to create an Azure Function service:


Full steps to achieve that:

for this sample, it will be an http trigger function and C# as a language.

The function contant(run.csx file) maust looks like :

#r « System.Data »
#r « System.Net »
#r « System.Web »
#r « MySql.Data »
#r « Newtonsoft.Json »
using System.Net;
using System.Text;
using System.Web;
using System.Data;
using MySql.Data;
using MySql.Data.MySqlClient;
using System.Configuration;
using System.Data.Odbc;
using Newtonsoft.Json;
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
log.Info(« C# HTTP trigger function processed a request. »);
string data_request = req.Content.ReadAsStringAsync().Result;
string errorCode = «  »;
string errorMessage = string.Empty;
Response response = new Response();
var connStr = System.Configuration.ConfigurationManager
.ConnectionStrings[« MySQLAzureDb »].ConnectionString;
using (MySqlConnection con = new MySqlConnection(connStr))
await con.OpenAsync();
log.Info(« Init sql command. »);
using (MySqlCommand cmd = new MySqlCommand(« sp_UpsertData », connStr ))
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new MySqlParameter(« jDocument », data_request));
log.Info(« ExecuteReader. »);
using (var reader = cmd.ExecuteReader())
errorCode= »1111″;
errorMessage= »no result returned by the stored procedure »;
errorCode = reader.GetString(0);
errorMessage = reader.GetString(1);
log.Info(« errorCode:  » + errorCode);
log.Info(« errorMessage:  » + errorMessage);
response.ErrorCode = errorCode;
response.ErrorMessage = errorMessage;
returnnew HttpResponseMessage(HttpStatusCode.OK)
Content = new StringContent(JsonConvert.SerializeObject(response, Formatting.Indented),
Encoding.UTF8, « application/json »)
public class Response
publicstring ErrorCode { get; set; }
publicstring ErrorMessage { get; set; }
and the file function.json :
« bindings »: [
« authLevel »: « function »,
« name »: « req »,
« type »: « httpTrigger »,
« direction »: « in »,
« methods »: [
« get »,
« post »
« name »: « $return »,
« type »: « http »,
« direction »: « out »
« disabled »: false,
« frameworks »: {
« net46 »: {
« dependencies »: {
« MySql.Data »: « 7.0.7-m61 »
these files are located here:
the called stored procedure takes a parmeter of type JSON.
Note : this article is not focusin on how to generate a json from Biztalk.

How to call the function from Biztalk

Now we need to configure a send port to call the Azure function.
From Biztalk , add a new Wcf-WebHttp send port with the following configuration :
URI : the azure function URL
HTTP Method : POST
Outbound HTTP Headers:
x-functions-key:your key function
to get the function key, click the function name/Manage and show the hidden key :
Send  pipeline : a send json pipeline
Receive pipeline : a receive pipeline with an XML Disassembler pipeline component within Sisassemble stage that accepts the json response schema(the Response class defined within the function).

Security connection between MySQL server and Azure Function

In my case, the MySQL partner secures the acces by an IP white list, so the administrator asks for the Funcnction IP adresse to whitelist.
To determine the Azure Function IP Adresse, follow the steps below :
1-Sign in to the Azure Resource Explorer.
2-Select subscriptions > {your subscription} > providers > Microsoft.Web > sites.
3-In the JSON panel, find the site with an id property that ends in the name of your function app.
See outboundIpAddresses and possibleOutboundIpAddresses.
The set of outboundIpAddresses is currently available to the function app.
The set of possibleOutboundIpAddresses includes IP addresses that will be available only if the function app scales to other pricing tiers.
these steps are described on official MS Docs.
The possibleOutboundIpAddresses contains the list ofoutboundIpAddresses , so  allow access to the whole list of possibleOutboundIpAddresses :
for more details, you can leave a comment and i’ll try to provide the needed infos asap.

JSON null response REST API from Biztalk Server

Calling a a REST API from Biztalk is a straightforward operation with WCF-Webhttp adapter. but when we are facing a scenario where the API is returnin an unexpeted response essentially from non maintained application. To deal with this cenario we have 2 options:

-Create a custom component piepline

-Custom behavior with message inspector

in my case,  the API return a message body containing « null » string with a 200 http status. I choose to create a custom behavior to handle the message too early on the adapter level.

My custom behavior project contains:

-a message inspector implementing IClientMessageInspector interface

the AfterReceiveReply method is fired when the response is returned from the API :

public void AfterReceiveReply(ref Message reply, object correlationState)
var replyMsg = reply.ToString();
var mystr = replyMsg.Substring(replyMsg.IndexOf(‘>’) + 1, 8);
byte[] data = Convert.FromBase64String(mystr);
string decodedString = Encoding.UTF8.GetString(data);

if (decodedString == « null »)

string response = «  »;
Message newReply = Message.CreateMessage(MessageVersion.None, null, new TextBodyWriter(response));
// very important – forces WCF to serialize the message body contents as
// « Raw » which effectively means no serialization
newReply.Properties[WebBodyFormatMessageProperty.Name] = new WebBodyFormatMessageProperty(WebContentFormat.Raw);
var responseProperty = new HttpResponseMessageProperty();
responseProperty.Headers[« Content-Type »] = « text/plain »;
newReply.Properties[HttpResponseMessageProperty.Name] = responseProperty;

reply = newReply;

catch { }

the response is received  in 64 base format : <Binary>xxxxxxxxx</Binary> »

after a converting the content and if the message is « null », with a custom writer I create a new empty message. But why an empty one?  To take benefit of the new JSON decoder « AddMessageBodyForEmptyMessag » property and to create an empty JSON message « {} »

by this way, i can avoid to receive a null reference exception.

-endpoint behavior implementing IEndpointBehavior interface

After build and GAC the dll, we have to configure this new extension:

1-C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config and C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config.


2-JSON receive pipeline conf:


3-add the extension on the send port behavior section



You can find the source code here.

if you liked this tip, please share.

Issue with Schedule adapter in BizTalk 2013 R2 Application deployment

Naga Learnings

Issue: While working on BTS 2010 to 2103 R2 migration, I was getting below error while deploying BizTalk builds crated using BTDF:


error : Could not validate TransportTypeData, Address or Public Address properties for Receive Location ‘******’. Could not load file or assembly ‘Microsoft.BizTalk.Scheduler, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.

I spent good amount of time checking all project files, binding info and btdf settings to identify the dependecy with « » version of schedular dll.

However, actual issue is « Microsoft.BizTalk.Scheduler.dll » was not installed to GAC by default with BTS 2013 R2 installation. Due to this, BizTalk is not able to identify the reference to this dll while tyring to enable schedule adapter locations which internally refers to « Microsoft.BizTalk.Scheduler.dll ».


install « Microsoft.BizTalk.Scheduler.dll » to GAC from « C:Program Files (x86)Microsoft BizTalk Server 2013 R2 » using gacutil. Also, make sure to follow same step in other BTS environments.

Voir l’article original

Read This Before Implementing AlwaysOn for BizTalk Server 2016

Biztalk 2016 consideration of MSDTC between databases on the same SQL instance

Kjetil Tonstad Integration Blog

One of the major news in BizTalk Server 2016 is the full support for SQL AlwaysOn Availability Groups (AGs). When Microsoft announced this, the crowd cheered, and they moved on to the next slide. There are, however, some bits you should be aware of before deciding on your High Availability (HA) architecture for BizTalk.

The Background
SQL Server 2016 is the first (and only) edition to support AlwaysOn for BizTalk Server 2016. The reason is lack of support for MSDTC between BizTalk’s SQL Server databases and other transactional resources. For this reason, High Availability for the database layer in BizTalk scenarios has traditionally been solved by using Windows Server Failover Clusters (WSFC), typically with an active-passive configuration.

The Requirements
First of all, you need to run BizTalk Server 2016 Enterprise, SQL Server 2016 Enterprise, and Windows Server 2016 (or 2012 R2 with KB3090973).

As you may be aware of…

Voir l’article original 450 mots de plus

WCF-WebHttp adapter inound REST API headers

Integrating a partner to my client’s IS, we were faced to access some information in the response headers  to manage a pagination system(page number, http response status code  …).

The API is called within an orchestration via a send port, and the way to access the headers is made following this code within an expression shape :

strHeaders = ResponseMessage(WCF.InboundHttpHeaders);

to display the returned value, you can log to the windows event viewer :

System.Diagnostics.EventLog.WriteEntry(« Application », strHeaders + System.DateTime.Now.ToString());

For http status code :

responseStatus = ResponseMessage(WCF.InboundHttpStatusCode);

strheaders contains all the the headers, you have to split it to access a specifie header value.

Hope this can help!

%d blogueurs aiment cette page :