I spent an hour or so this morning working with a college to debug a strange error he was getting when he tried to use on of the Exception Management Framework samples that are in the ESB guidance for BizTalk.  He was intentionally creating exceptions and he expected to see them routed into the ESB exception database. However, every time the  ALL.Exception SQL Send port tried to route the message to the SQL Server, he got the following error.


The adapter failed to transmit message going to send port “ALL.Exceptions” with URL “SQL://VBROKERSERVER7/EsbExceptionDb/”. It will be retransmitted after the retry interval specified for this Send Port. Details:”HRESULT=”0x80040e07″ Description=”Error converting data type nvarchar to datetime.”


Now we both expected that he had made a mistake during the installation and configuration phase, but after we spent a fair bit of time comparing his installation to my installation (which worked by the way!) we realized that we had identical configurations.  We finally realized that the only difference between the environments was that I had configured my Windows server to work with a regional setting of “English (United States)” while he was using “English (Canada)”. The problem was occurring because the two countries store the day/month data in reversed order.  Once we changed his system so that the user account that BizTalk ran under used “English (United States)” his system was fine.


I’ve since seen someone with a near similar problem using the Dutch regional settings. He found a code level work around that can be used to fix the problem and allow any country’s setting to be used. Details are at http://www.codeplex.com/esb/workitem/view.aspx?workitemid=4430


Cheers and keep on BizTalk