November 14, 2009
I received an error (in the windows event log) the other day when trying to configure a BizTalk receive location using the WCF LOB SAP adapter. The error looked like this:
The Messaging Engine failed to add a receive location "" with URL "" to the adapter "WCF-Custom".
Reason: "Microsoft.Adapters.SAP.RFCException: Details: ErrorCode=RFC_OK. ErrorGroup=RFC_ERROR_COMMUNICATION. SapErrorMessage=Connect to SAP gateway failed
Connect_PM TPNAME=, GWHOST=, GWSERV=
One solution (as suggested by MSDN) is to install the SAP client.
This solution works, but what is it about the SAP client install that is required by the WCF LOB SAP adapter? Why should you have to install the SAP client on a production server?
It turns out the SAP client modifies the following file: c:\windows\system32\drivers\etc\services, by making entries to resolving the SAP gateway host’s name (as used in BizTalk WCF SAP receive location’s URI) to the gateways address.
Once you manually modify this file to contain these entries the WCF SAP BizTalk receive location will work without having to install the SAP client.
1 Comment |
BizTalk Server 2006 | Tagged: biztalk, errors, adapters, configuration, sap |
Permalink
Posted by Jason
November 5, 2009
Great tip from Michael. Use the command line to query the Task List of running processes to find which BizTalk PID to attach to.
Simply type the following command into a DOS command window:
tasklist /svc /fi "imagename eq btsntsvc.exe"
This is a handy tip for BizTalk developers working in environments which use more than one host instance.
Leave a Comment » |
BizTalk Server 2006, General, How do I |
Permalink
Posted by Jason
October 28, 2009
A great tip on how to include passwords when saving binding files. Not recommended for security reasons, however useful when you need to pre-configure many send/receive ports.
Check out the details -> here.
Leave a Comment » |
BizTalk Server 2006 | Tagged: adapters, biztalk, configuration |
Permalink
Posted by Jason
October 12, 2009
As part of a recent deployment there were a number of WCF Web Services which were required to be deployed onto our target server.
We encounted a problem where the deployment seem to have installed correctly, but did not work when tested.
Checking the configuration settings validated our assesment of a correcly configured install so what went wrong?
Answer: URL matching is case-sensitive!
For what ever reason (which I am yet to determine) the BizTalk msi package which I had created, when run, created a virtual directory which did not preserve the same casing for the AppRoot address.
Upon researching this issue it seems to have two options to solve this issue:
- Change the AppRoot address in the c:\windows\system32\inetsrv\metabase.xml (in Windows Server 2003)
- Removing the virtual directory, clearing the ASP.NET Temporary Files cache, manuall re-creating the virtual directory again.
More information on this issue can be found here.
Leave a Comment » |
BizTalk Server 2006 | Tagged: biztalk iis |
Permalink
Posted by Jason
September 22, 2009
Using a Database Lookup Function can be useful in certain situations where you are required to retrieve a record set from a Database. Configuring this functoid with your map is as easy as providing the following input parameters:
- Value:
A value for which to search in the specified database, table, and column.
- Connection string:
An ActiveX Data Objects .NET (ADO.NET) connection string for a compliant data source in which to search. ODBC data sources (including DSN sources) are not supported. You can reference an OLE DB Universal Data Link file to specify the connection string by using the File Name parameter to specify the full path and file name of the UDL file that contains the connection string information.
- Table name:
The name of the table in the database in which to search.
- Column name:
The name of the column in the table in which to search.
One important piece of information to be mindful of is that the connection string is for an OLE DB connection, and as such can not be shared with helper classes which may use the .NET data provider for SQL Server.
Leave a Comment » |
.NET, BizTalk Server 2006 |
Permalink
Posted by Jason
September 18, 2009
I encountered a trap the other day when publishing a WCF Service using the BizTalk WCF Publishing wizard. After following the steps presented by the wizard and configuring my WCF service successfully, when I proceeded to test my service by opening the service address in my browser I received a 404 “Page not found” error.
As I later found out this error was caused by the wizard’s default behaviour of configuring the service to use the ASP.NET version 1.1.4322.

Simply changing this setting to use ASP.NET 2.0.50727 solved this problem.
Hopefully this post will save someone some time and some head scratching.
Leave a Comment » |
General |
Permalink
Posted by Jason
September 18, 2009
I was experiencing a problem today when sending messages to a non windows MQ Series server as every message that was send included an unidentified invalid character. This problem had me stumped!

I tried a number of things to try and resolve this issue:
- Using the PassThrouhTransmit pipeline
- Using the XMLTransmit pipeling
- Inspecting the message using a unicode enable text editor
It wasn’t until I received some advice from a fellow BizTalker (thanks Thaigo) that I should look at the pipeline properties.
As it turns out these unidentified invalid characters were the unicode byte order mark, and that this can be surpressed when sending messages from this pipeline.

So there you go mystery solved!
Leave a Comment » |
BizTalk Server 2006 | Tagged: mqseries, mqsc, adapter |
Permalink
Posted by Jason
September 14, 2009
A great tip for limiting the maximum memory used by SQL Server 2005 when you are hard pressed for resources is to limit the maximum memory threshold of SQL server of your SQL server instance.
This can be acheived easily by setting the “Maximum Server Memory” setting in your SQL Server instances properties.

This improved performance for me within my development virtual machine.
Leave a Comment » |
SQL Server 2005 | Tagged: performance, SQL2005 |
Permalink
Posted by Jason
September 12, 2009
Following on from a previous post, this post will focus on the SharePoint content migration object model.
For content migration scenarios that require you to export only selected content, or that require you to automate or customize migration operations, there is only one approach: you must write a custom solution that uses the APIs in the Microsoft.SharePoint.Deployment namespace.
It is important that before you choose to use selective migration that you have performed a full content migration first, so that the destination is a mirror image of the source.
Selective migration applies, typically, to content that needs to be migrated from server to server based on factors such as content version (current versus future), time stamp, and content state (approved versus in review, for example). Selection criteria provides a high degree of granularity from the scope of the site collection down; that is, you have selection control at the scope of the Web, the list, folder, and list item.
You can have any number of content management packages (.cmp) files in a migration operation, and you can also have multiple destinations. However, the objects contained in a given .cmp file must originate from a single site collection.
Had enough of the pre-amble? Lets move on to how you can start using the SharePoint contnect migration object model.
- Reference Microsoft.SharePoint.dll
This can normally be located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI\Microsoft.SharePoint.dll
- Include the following Microsoft.Sharepoint.dll namespaces
Add these using statements to the top of your class:
using Microsoft.SharePoint;
using Microsoft.SharePoint.Deployment;
- To export data to a content management package, adapt the following code to your requirements
static void Export()
{
// Full content migration
string siteURL = “<Your SharePoint site URL>”
string baseFileName = “<Your content package name>.cmp”;
string dataFileLocation = @”c:\”;
string logFileLocation = @”c:\<Your export log file name>.log”;
SPExportSettings exportSettings = new SPExportSettings();
exportSettings.SiteUrl = siteURL;
exportSettings.ExportMethod = SPExportMethodType.ExportAll;
exportSettings.BaseFileName = baseFileName;
exportSettings.FileLocation = dataFileLocation;
exportSettings.LogFilePath = logFileLocation;
exportSettings.OverwriteExistingDataFile = true;
exportSettings.CommandLineVerbose = true;
SPExport export = new SPExport(exportSettings);
export.Run();
}
- Export selective content
To export selective content add as many SPExportObjects to the SPExportSettings’ collection.
As SharePoint objects are identified by GUID on the source server. You will need to find out the GUID of the object you wish to export first.
Using a SPList as an example:
string siteURL = “<Your SharePoint site URL>”
SPSite systalkSite = new SPSite(siteURL);
SPList mySelectiveContent= systalkSite.AllWebs[0].Lists[<Your selected list name>];
SPExportObject exportObject = new SPExportObject();
exportObject.Id = mySelectiveContent.ID;
exportObject.Type = SPDeploymentObjectType.List;
exportSettings.ExportObjects.Add(exportObject);
-
To import data from a content management package, adapt the following code to your requirements
static void Import()
{
// Package import
System.Uri siteURL = new Uri(“”<Your SharePoint site URL>”");
string baseDataFileName = “<Your content package name>.cmp”;
string dataFileLocation = @”c:\”;
string logFileLocation = @”c:\<Your export log file name>.log”;
SPImportSettings importSettings = new SPImportSettings(siteURL, dataFileLocation, baseDataFileName);
importSettings.RetainObjectIdentity = true;
importSettings.CommandLineVerbose = true;
importSettings.LogFilePath = logFileLocation;
SPImport import = new SPImport(importSettings);
import.Run();
}
Theres a lot of scope for customisation using this approach, but these examples should be enough to get you started.
Further reading:
Key Concepts in Selective Migration
Selective Content Migration in Windows SharePoint Services 3.0
Leave a Comment » |
SharePoint Server 2007, WSS | Tagged: SharePoint, WSS |
Permalink
Posted by Jason