Ravindar, Biztalk Developer and Administrator

Just another BizTalk blog

Limitations of making dateTime field as distinguished in BizTalk

I came across an issue related to DateTime conversion yesterday. The Datetime was coming 10hours ahead than expected. Although the value was being passed correctly , it was receiving 10hours ahead time and this revealed a strange behaviour of BizTalk while assigning dateTime fields.


The root issue was the DateTime field was a distinguished filed and when the value is being assigned in orchestration, it automatically converts to UTC But the Time zone is lost. In this case, BizTalk does not behave as expected, although you pass local time, when the value is assigned to a distinguished datetime filed.


The behaviour is clearly elaborated  here  http://www.malgreve.net/2012/10/03/datetime-xml-element-converted-to-utc-how-to-read-the-original-time-of-a-different-time-zone/

In c# it will work fine, but in Biztalk Orchestration if we assign value to distinguished dateTime field, the Time zone will be lost.


Ultimately to read the correct value, we had to use the method DateTime.SpecifyKind(param1, DateTimeKind.Local);   to get the correct time.


So firstly it’s good to avoid making the datetime fields as distinguished, otherwise if it is mandatory to make a datetime filed as distinguished, please keep this limitation in mind and use the above method to get the desired output.


August 30, 2017 Posted by | Uncategorized | Leave a comment

System.InvalidOperationException: Text cannot be written outside the root element

I was  working with SOAP UI and i copied text to the mock service response and the Biztalk WCF send port started giving the error “System.InvalidOperationException: Text cannot be written outside the root element”

it’s due to the white spaces in the response message.


the fix for it to continue your work locally is , on the send port set the Body path expression value as “/*” as shown


WCF port ignore white spaces

August 25, 2017 Posted by | Uncategorized | Leave a comment

Biztalk Tracking data not visible

TrackingData table rows count should usually be close to 0.

but if we see huge count here, it means there is an issue with Tracking host.

SELECT COUNT(*) FROM [BizTalkMsgBoxDb].[dbo].[TrackingData]

create a new host, create a corresponding new host instance and remove the old ones. This should fix the issue



August 17, 2017 Posted by | Uncategorized | Leave a comment

Octopus variable not identifying HTML content

You should define your variable in settings file generator like
#{variable name here | HtmlEscape}

so you should add the escaping character

August 10, 2017 Posted by | Uncategorized | Leave a comment