<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>APACBizTalk</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/apacbiztalk/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/apacbiztalk/feed.xml</link>
    <description>This is team blog for APAC BizTalk support team.</description>
    <lastBuildDate>Tue, 16 Apr 2019 04:41:25 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>How to check if there are a great deal of deferred messages in ServiceBus container DB generated by your workflow</title>
      <link>https://docs.microsoft.com/archive/blogs/apacbiztalk/how-to-check-if-there-are-a-great-deal-of-deferred-messages-in-servicebus-container-generated-by-your-workflow</link>
      <pubDate>Fri, 03 Mar 2017 09:14:35 GMT</pubDate>
      <dc:creator><![CDATA[Wen-Jun Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/apacbiztalk/?p=1245</guid>
      <description><![CDATA[The problem:

Your workflow may stop working with the following exception which usually indicates...]]></description>
      <content:encoded><![CDATA[<strong>The problem:</strong>

Your workflow may stop working with the following exception which usually indicates a great deal of messages accumulated in ServiceBus container database.

<em>Microsoft.Workflow.Client.WorkflowQuotaExceededException: Cannot start more instances because the size of the topic has exceeded the quota limit</em>

&nbsp;

<strong>Troubleshooting:</strong>

First, you should check the number of rows in ServiceBus container database MessageReferencesTable. If there are millions of records in this table, there please further check if most of the records are with State = 2 (i.e: deferered message).

If they are, then execute the following SQL query to figure out those deferred messages belong to which session id and workflow:

<em><span style="font-family: Calibri">SELECT  T2.SessionId,t1.WorkflowName,t1.WorkflowStatus,t2.state, count(*) as  total </span></em>

<em><span style="font-family: Calibri">  FROM [WFInstanceManagementDB].[dbo].[Instances] T1</span></em>

<em><span style="font-family: Calibri">  inner join [SBMessageContainer01].[dbo].[MessageReferencesTable] T2 on T1.[SessionId] = T2.[SessionId] </span></em>

<em><span style="font-family: Calibri">    group by T2.SessionId, t1.WorkflowName,t1.WorkflowStatus,t2.state </span></em>

<em><span style="font-family: Calibri">    having t2.state = 2 order by total desc</span></em>

&nbsp;

<strong>Resolution:</strong>

If it's a SharePoint site, you need to stop the problematic workflow and undeploy it to make sure no more records are generated in the database.

Then:
<ol>
 	<li>Try to remove the scope with Remove-WFScope cmdlet. https://msdn.microsoft.com/en-us/library/azure/jj193255(v=azure.10).aspx</li>
 	<li>If Remove-WFScope fails with timeout error, please contact Microsoft support to purge the messages with MsgCleanup tool(internal only).</li>
 	<li>If MsgCleanup tool also fails with SQL timeout errors because there are too many records in the table, then you may consider manually delete the data in SQL. However please note this is not officially supported by Microsoft. To do a manual cleanup, you can: 1) Use DELETE query to remove the rows belong to problematic session id directly. 2) Create a Temp table, INSERT good records(belong to other session ids) into it. Then TRUNCAT original MessageReferencesTable and INSERT the records in Temp table back to it.</li>
</ol>
Hope the information helps.

WenJun Zhang]]></content:encoded>
    </item>
    <item>
      <title>Additional BOM may be generated for RosettaNet solution with BizTalk 2013 R2 CU2 or higher and BizTalk 2016</title>
      <link>https://docs.microsoft.com/archive/blogs/apacbiztalk/additional-bom-may-be-generated-for-rosettanet-solution-with-biztalk-2013-r2-cu2-or-higher-and-biztalk-2016</link>
      <pubDate>Tue, 21 Feb 2017 09:26:34 GMT</pubDate>
      <dc:creator><![CDATA[Wen-Jun Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/apacbiztalk/?p=1225</guid>
      <description><![CDATA[The problem:

You have RosettaNet solutions deployed on BizTalk 2013 R2. After urpgrading to CU2...]]></description>
      <content:encoded><![CDATA[<strong>The problem:</strong>

You have RosettaNet solutions deployed on BizTalk 2013 R2. After urpgrading to CU2 (or higher) or BizTalk 2016, your trading partner complained that they cannot process the documents sent from you with existing configuration due to an extra unicode Byte Order Mark(BOM) in the beginning of the doc.

<strong>Analysis:</strong>

We debug the issue and found the root cause is because some code change within MIMEEncoder pipeline component(in CU2). Also, setting PreserveBOM to true or false in Pipeline setting doesn't change the behavior.

We've verified that the issue only occurs when content-encoding is set to 8bit or quoted-printable in RosettaNet agreement setting. Using Base64 encoding will not hit the same problem.

The issue has been reported to BizTalk production group for further investigation and judgement about whether a fix is required.

<strong>Solution:</strong>

Please understand BOM isn't unexpected character for unicode encoded content. So normally the partner should be able to configure their application to accept the documents with BOM.

If no luck, currently a work around is to switch to Base64 encoding instead of 8bit or quoted-printable(see below).

<a href="https://msdnshared.blob.core.windows.net/media/2017/02/8bit.jpg"><img width="300" height="148" class="alignnone size-medium wp-image-1235" alt="8bit" src="https://msdnshared.blob.core.windows.net/media/2017/02/8bit-300x148.jpg" /></a>

Best regards,

WenJun Zhang]]></content:encoded>
    </item>
    <item>
      <title>SharePoint WorkflowQuotaExceededException caused by ServiceBus deferred messages</title>
      <link>https://docs.microsoft.com/archive/blogs/apacbiztalk/sharepoint-workflowquotaexceededexception-caused-by-servicebus-deferred-messages</link>
      <pubDate>Wed, 01 Feb 2017 07:29:51 GMT</pubDate>
      <dc:creator><![CDATA[Wen-Jun Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/apacbiztalk/?p=1205</guid>
      <description><![CDATA[The problem:

SharePoint 2013 with workflow manager 1.0 stopped working with the...]]></description>
      <content:encoded><![CDATA[<strong>The problem:</strong>

<span style="margin: 0px;line-height: 105%;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">SharePoint 2013 with workflow manager 1.0 stopped working with the following  <span><span style="font-family: Calibri">Microsoft.Workflow.Client.WorkflowQuotaExceededException</span></span> failure in ULS log:</span></span>

<em><span style="margin: 0px;line-height: 105%;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">w3wp.exe         0x4AFC SharePoint Server              Workflow Services               Exception              </span><span style="color: #000000">Microsoft.Workflow.Client.WorkflowQuotaExceededException: Cannot start more instances because the size of the topic has exceeded the quota limit.</span><span style="color: #000000"> HTTP headers received from the server - ActivityId: 895a6d56-92c1-4ce7-bb17-33b40607c372. NodeId: . </span><span style="color: #000000">Scope: /SharePoint/default/a67eb351-30b5-43f8-9be4-1ed1faf6647a/87c9068b-6ccc-4033-9102-5d27c43a476a</span><span style="color: #000000">. Client ActivityId : d9deb79d-724d-10a7-6483-11ea093bdd49. ---&gt; System.Net.WebException: The remote server returned an error: (403) Forbidden.     at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)     at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)     at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)     --- End of inner exception stack trace ---     at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)     at Microsoft.Workflow.Client.WorkflowManager.StartInternal(String workflowName, WorkflowStartParameters startParameters)     at Microsoft.SharePoint.WorkflowServices.FabricWorkflowManagementClient.StartInstance(String serviceGroupName, String workflowName, String monitoringParam, String activationKey, IDictionary`2 payload)     at Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider.StartWorkflow(WorkflowSubscription subscription, IDictionary`2 payload) StackTrace:  at Microsoft.Office.Server.Native.dll: (sig=678c0f87-966f-4d99-9c94-b49e788d2672|2|microsoft.office.server.native.pdb, offset=131CE) at Microsoft.Office.Server.Native.dll: (offset=21BE5)            d9deb79d-724d-10a7-6483-11ea093bdd49</span></span></em>

<b>Analysis:</b>

<span style="font-family: Calibri">By running the following SQL query against ServiceBus message container database, we found there were more than 1 million records of deferred messages. </span>

<em><span style="font-family: Calibri">Select count(*) as totalDeferred from [MessageReferencesTable] where state = 2</span></em>

<span style="font-family: Calibri">This is reason why WFM reports topic quota has been used up. To move on, use the following query to find which problematic workflow generates so many deferred messages.</span>

<span style="font-family: Calibri"><i>SELECT  T2.SessionId,t1.WorkflowName,t1.WorkflowStatus,t2.state, count(*) as  total
FROM [WFInstanceManagementDB].[dbo].[Instances] T1
inner join [SBMessageContainer01].[dbo].[MessageReferencesTable] T2 on T1.[SessionId] = T2.[SessionId]
group by T2.SessionId, t1.WorkflowName,t1.WorkflowStatus,t2.state
having t2.state = 2 order by total desc</i></span>

<b>Solution:</b>
<ol>
 	<li><span style="font-family: Calibri">Undeploy the problematic workflow.</span></li>
 	<li><span style="font-family: Calibri">Contact Microsoft support to cleanup these deferred messages with our internal CleanupDeferredMessages tool. </span></li>
 	<li><span style="font-family: Calibri">Make sure both WFM and SharePoint have been updated with the latest patch. Otherwise, deferred messages cannot be 100% avoided.</span></li>
</ol>
<span style="font-family: Calibri">Best regards,</span>

<span style="font-family: Calibri">WenJun Zhang</span>]]></content:encoded>
    </item>
    <item>
      <title>Workflow farm may not work expectedly if your load balancer is not set to sticky session mode</title>
      <link>https://docs.microsoft.com/archive/blogs/apacbiztalk/workflow-farm-may-not-work-expectedly-if-your-load-balancer-is-not-set-to-sticky-session-mode</link>
      <pubDate>Wed, 25 Jan 2017 07:20:23 GMT</pubDate>
      <dc:creator><![CDATA[Wen-Jun Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/apacbiztalk/?p=1196</guid>
      <description><![CDATA[The problem: 

 

There is a SharePoint 2013 farm with 3 nodes Workflow/ServiceBus farm. A F5...]]></description>
      <content:encoded><![CDATA[<b><span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 11pt">The problem: </span></b>

<b><span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 11pt"> </span></b>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif">There is a SharePoint 2013 farm with 3 nodes Workflow/ServiceBus farm. A F5 load balancer is in the middle between SharePoint and WF farm. </span>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif"> </span>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif">When using one of the WF endpoints’ FQDN to register SharePoint workflow, everything was working well. But we lost high availability when this specified endpoint was down: <a href="https://blog.bugrapostaci.com/2015/05/15/do-we-really-need-a-load-balancer-between-workflow-manager-farm-and-sharepoint/"><span style="color: #0563c1">https://blog.bugrapostaci.com/2015/05/15/do-we-really-need-a-load-balancer-between-workflow-manager-farm-and-sharepoint/</span></a></span>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif"> </span>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif">When using load balanced url without sticky session, we met an intermittent 403 error with Sharepoint and WFMQuickTest tool:</span>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif"> </span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 10pt"><span style="color: #000000">HTTP/1.1 403 </span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 10pt"><span style="color: #000000">&lt;Error xmlns:i="</span><a href="https://www.w3.org/2001/XMLSchema-instance"><span style="color: #0563c1">https://www.w3.org/2001/XMLSchema-instance</span></a><span style="color: #000000">"&gt;&lt;Code&gt;UnexpectedError&lt;/Code&gt;&lt;Message&gt;Exception thrown from the messaging layer. For more details, please see the server logs.&lt;/Message&gt;&lt;/Error&gt;</span></span>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 11pt"> </span>

<b><span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 11pt">Analysis: </span></b>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 11pt"> </span>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif">We captured memory dumps to check and found a HTTP 403 error occurred when a correlated request went to a different node.</span>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif"> </span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">0:014&gt; !wselect m_Uri.m_String,m_StatusCode from 02433230</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">[System.Net.HttpWebResponse]</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(string)System.String m_Uri.m_String = </span><a href="https://workflow.prg-dc.dhl.com:12290/WFMQuickTest"><span style="color: #0563c1">https://workflow.</span><span>server</span><span style="color: #0563c1">.com:12290/WFMQuickTest</span></a></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(int32)System.Net.HttpStatusCode m_StatusCode = 191 (0n401) Unauthorized                                                                                                           </span><span>//NodeId:</span></span><span style="margin: 0px;font-family: 'Calibri',sans-serif"><span style="color: #000000"> </span></span><span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 9pt">WFNODE</span><span style="margin: 0px;color: #70ad47;font-family: 'Calibri',sans-serif;font-size: 9pt">4354</span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">0:014&gt; !wselect m_Uri.m_String,m_StatusCode from 0246b468</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">[System.Net.HttpWebResponse]</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(string)System.String m_Uri.m_String = </span><a href="https://workflow.prg-dc.dhl.com:12290/WFMQuickTest"><span style="color: #0563c1">https://workflow.</span><span>server</span><span style="color: #0563c1">.com:12290/WFMQuickTest</span></a></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(int32)System.Net.HttpStatusCode m_StatusCode = 191 (0n401) Unauthorized</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">0:014&gt; !wselect m_Uri.m_String,m_StatusCode from 024ad06c</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">[System.Net.HttpWebResponse]</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(string)System.String m_Uri.m_String = </span><a href="https://workflow.prg-dc.dhl.com:12290/WFMQuickTest"><span style="color: #0563c1">https://workflow.</span><span>server</span><span style="color: #0563c1">.com:12290/WFMQuickTest</span></a></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(int32)System.Net.HttpStatusCode m_StatusCode = c9 (0n201) Created</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">0:014&gt; !wselect m_Uri.m_String,m_StatusCode from 024c10c4</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">[System.Net.HttpWebResponse]</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(string)System.String m_Uri.m_String = </span><a href="https://workflow.prg-dc.dhl.com:12290/WFMQuickTest/$Activities/WFMQuickTest"><span style="color: #0563c1">https://workflow.</span><span>server</span><span style="color: #0563c1">.com:12290/WFMQuickTest/$Activities/WFMQuickTest</span></a></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(int32)System.Net.HttpStatusCode m_StatusCode = 191 (0n401) Unauthorized                                                                                                           </span><span>//NodeId:</span></span><span style="margin: 0px;font-family: 'Calibri',sans-serif"><span style="color: #000000"> </span></span><span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 9pt">WFNODE</span><span style="margin: 0px;color: #70ad47;font-family: 'Calibri',sans-serif;font-size: 9pt">4354</span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">0:014&gt; !wselect m_Uri.m_String,m_StatusCode from 024f7594</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">[System.Net.HttpWebResponse]</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(string)System.String m_Uri.m_String = </span><a href="https://workflow.prg-dc.dhl.com:12290/WFMQuickTest/$Activities/WFMQuickTest"><span style="color: #0563c1">https://workflow.</span><span>server</span><span style="color: #0563c1">.com:12290/WFMQuickTest/$Activities/WFMQuickTest</span></a></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(int32)System.Net.HttpStatusCode m_StatusCode = 191 (0n401) Unauthorized</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">0:014&gt; !wselect m_Uri.m_String,m_StatusCode from 0250c190</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">[System.Net.HttpWebResponse]</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(string)System.String m_Uri.m_String = </span><a href="https://workflow.prg-dc.dhl.com:12290/WFMQuickTest/$Activities/WFMQuickTest"><span style="color: #0563c1">https://workflow.</span><span>server</span><span style="color: #0563c1">.com:12290/WFMQuickTest/$Activities/WFMQuickTest</span></a></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(int32)System.Net.HttpStatusCode m_StatusCode = c9 (0n201) Created</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">0:014&gt; !wselect m_Uri.m_String,m_StatusCode from 0250de8c</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">[System.Net.HttpWebResponse]</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(string)System.String m_Uri.m_String = </span><a href="https://workflow.prg-dc.dhl.com:12290/WFMQuickTest/$Workflows/WFMQuickTest"><span style="color: #0563c1">https://workflow.</span><span>server</span><span style="color: #0563c1">.com:12290/WFMQuickTest/$Workflows/WFMQuickTest</span></a></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(int32)System.Net.HttpStatusCode m_StatusCode = 191 (0n401) Unauthorized                                                                                                           </span><span>//NodeId:</span></span><span style="margin: 0px;font-family: 'Calibri',sans-serif"><span style="color: #000000"> </span></span><span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 9pt">WFNODE</span><span style="margin: 0px;color: #70ad47;font-family: 'Calibri',sans-serif;font-size: 9pt">4354</span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">0:014&gt; !wselect m_Uri.m_String,m_StatusCode from 02547ba8</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">[System.Net.HttpWebResponse]</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(string)System.String m_Uri.m_String = </span><a href="https://workflow.prg-dc.dhl.com:12290/WFMQuickTest/$Workflows/WFMQuickTest"><span style="color: #0563c1">https://workflow.</span><span>server</span><span style="color: #0563c1">.com:12290/WFMQuickTest/$Workflows/WFMQuickTest</span></a></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(int32)System.Net.HttpStatusCode m_StatusCode = 191 (0n401) Unauthorized</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">0:014&gt; !wselect m_Uri.m_String,m_StatusCode from 025589e4</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">[System.Net.HttpWebResponse]</span></span>

<span style="background: yellow;margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(string)System.String m_Uri.m_String = </span><a href="https://workflow.prg-dc.dhl.com:12290/WFMQuickTest/$Workflows/WFMQuickTest"><span style="color: #0563c1">https://workflow.</span><span>server</span><span style="color: #0563c1">.com:12290/WFMQuickTest/$Workflows/WFMQuickTest</span></a></span>

<span style="background: yellow;margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">(int32)System.Net.HttpStatusCode m_StatusCode = 193 (0n403) Forbidden</span></span><span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 9pt"><span style="color: #000000">                                                                                                                  </span><span>//NodeId:</span></span><span style="margin: 0px;color: red;font-family: 'Calibri',sans-serif"> </span><span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 9pt">WFNODE</span><span style="margin: 0px;color: red;font-family: 'Calibri',sans-serif;font-size: 9pt">4352 . This is the 403 error mentioned above.</span>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 11pt"> </span>

<b><span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 11pt">Resolution: </span></b>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif;font-size: 11pt"> </span>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif">Set F5 load balancer to sticky session mode. </span>

&nbsp;

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif">Best regards, </span>

<span style="margin: 0px;color: #1f4e79;font-family: 'Calibri',sans-serif">WenJun Zhang</span>]]></content:encoded>
    </item>
    <item>
      <title>ServiceBus 1.1 stops responding when TLS 1.0 is disabled.</title>
      <link>https://docs.microsoft.com/archive/blogs/apacbiztalk/servicebus-1-1-stops-responding-when-tls-1-0-is-disabled</link>
      <pubDate>Thu, 12 Jan 2017 12:33:57 GMT</pubDate>
      <dc:creator><![CDATA[Wen-Jun Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/apacbiztalk/?p=1185</guid>
      <description><![CDATA[Symptom:

After applying a recent Windows Security patch, you may find that Service Bus for...]]></description>
      <content:encoded><![CDATA[<strong>Symptom:</strong>

After applying a recent Windows Security patch, you may find that Service Bus for Windows Server 1.1 is unresponsive. The services may not start. Or if the services do start, they do not respond to client requests.

<strong>Analysis:</strong>

ServiceBus 1.1 utilizes Windows Fabric Service 1.0 internally. We found the failure is on activating fabric runtime through debugging.

Debug log:
======================
0:008&gt; !pe
Exception object: 0000001f3a901870
Exception type:   System.InvalidOperationException
Message:          The operation is invalid.
InnerException:   System.Runtime.InteropServices.COMException, Use !PrintException 0000001f3a8fa4b0 to see more.
StackTrace (generated):

StackTraceString: 
HResult: 80131509
0:008&gt; !PrintException /d 0000001f3a8fa4b0
Exception object: 0000001f3a8fa4b0
Exception type:   System.Runtime.InteropServices.COMException
Message:          Exception from HRESULT: 0x80071BFD
InnerException:   
StackTrace (generated):
    SP               IP               Function
    0000002160ECEDC0 0000000000000000 UNKNOWN!System.Fabric.Interop.NativeRuntime.FabricGetActivationContext(System.Guid ByRef)+0x1
    0000002160ECEEB0 00007FF9EB80AA1B UNKNOWN!System.Fabric.FabricRuntime+NativeFabricRuntimeFactory.GetCodePackageActivationContextHelper()+0x3b
    0000002160ECEF00 00007FF9EB8071FD UNKNOWN!System.Fabric.Interop.Utility.WrapNativeSyncInvoke[[System.__Canon, mscorlib]](System.Func`1, System.String)+0x7d


Also, we found TLS 1.0 is disabled by the Windows security patch under the following registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols

<strong>Conclusion:</strong>

After discussing with Windows Fabric production group, they do confirm that Windows Fabric 1.0 depends on TLS 1.0 but the new Fabric 2.0 has removed this dependency. Hence ServiceBus 1.1 won't work with TLS 1.0 disabled. Since Workflow Manager 1.0 utilizes ServiceBus 1.1 as well, WFM will also be impacted.

The solution is to re-enable TLS 1.0 in registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols

Best regards,
WenJun Zhang
]]></content:encoded>
    </item>
    <item>
      <title>Sample code to save as MSMQ messages from outgoing queues to files</title>
      <link>https://docs.microsoft.com/archive/blogs/apacbiztalk/code-to-save-as-msmq-messages-from-outgoing-queues-to-files</link>
      <pubDate>Fri, 21 Oct 2016 08:13:05 GMT</pubDate>
      <dc:creator><![CDATA[Wen-Jun Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/apacbiztalk/?p=1165</guid>
      <description><![CDATA[The following code will read messages from outoging queues and then create folder structure as...]]></description>
      <content:encoded><![CDATA[The following code will read messages from outoging queues and then create folder structure as \domain or server name or IP\private$ or (public)\queue name to save the messages as .xml files.

The reference is the sample from codeproject: <a href="https://www.codeproject.com/Articles/22847/Accessing-Outgoing-Message-Queues-MSMQ">https://www.codeproject.com/Articles/22847/Accessing-Outgoing-Message-Queues-MSMQ </a>

<code> private void SaveMessages(string queueFormatName, int numOfMessagesToRead) {

MSMQ.MSMQQueueInfo info = new MSMQ.MSMQQueueInfo();
info.FormatName = queueFormatName;

MSMQ.MSMQQueue mq = info.Open((int)(MSMQ.MQACCESS.MQ_ADMIN_ACCESS | MSMQ.MQACCESS.MQ_PEEK_ACCESS), (int)MSMQ.MQSHARE.MQ_DENY_NONE);

for (int i = 0; i &lt; numOfMessagesToRead; i++)
{

object wantdest = false;
object tr = true;
object num = 0;

MSMQ.MSMQMessage msg = null;

try{

if (i == 0)
msg = mq.PeekCurrent(ref wantdest, ref tr, ref num, ref wantdest); //Peek(ref wantdest, ref tr, ref num, ref wantdest);
else
msg = mq.PeekNext(ref wantdest, ref tr, ref num, ref wantdest);
}
catch (Exception ee)
{
//MessageBox.Show(ee.ToString());
}

if (msg == null) {

WriteLine("Number of Messages to read:" + (numOfMessagesToRead - i).ToString() + " msg is null.");

continue; }

//ASCIIEncoding encoding = new ASCIIEncoding();
UTF8Encoding utf8encoding = new UTF8Encoding();

string queuePathName = queueFormatName.Substring(queueFormatName.IndexOf(":")+1);

string path = Directory.GetCurrentDirectory();
path += "\\SavedMessages\\" + queuePathName;

//MessageBox.Show(path);

if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}

byte[] guid = new byte[16];
byte[] seq = new byte[4];

Array.Copy((byte[])msg.Id, 0, guid, 0, 16);
Array.Copy((byte[])msg.Id, 16, seq, 0, 4);

int seqNumber = BitConverter.ToInt32(seq, 0);

Guid msgId = new Guid(guid);

path += "\\" + msgId.ToString() + "_" + seqNumber.ToString() + ".xml";

//MessageBox.Show(path);

try {
File.WriteAllText(path, utf8encoding.GetString((byte[])msg.Body));
}
catch (Exception ee)
{
File.WriteAllText(path, (string)msg.Body);
//MessageBox.Show(ee.ToString());
}

}
}
</code>

Best regards,
WenJun Zhang]]></content:encoded>
    </item>
    <item>
      <title>Biztalk job MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxDb displays failure.</title>
      <link>https://docs.microsoft.com/archive/blogs/apacbiztalk/biztalk-job-messagebox_message_managerefcountlog_biztalkmsgboxdb-displays-failure</link>
      <pubDate>Thu, 13 Oct 2016 11:13:25 GMT</pubDate>
      <dc:creator><![CDATA[Wen-Jun Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/apacbiztalk/?p=1105</guid>
      <description><![CDATA[Biztalk job MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxDb displays...]]></description>
      <content:encoded><![CDATA[Biztalk job MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxDb displays failure.<strong> </strong>

<strong>Problem</strong><strong>:</strong>

The job MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxDb shows failure but all is completing in the job as being successful:

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/0011.png"><img width="300" height="141" class="alignnone size-medium wp-image-1115" alt="001" src="https://msdnshared.blob.core.windows.net/media/2016/10/0011-300x141.png" /></a>

&nbsp;

As per the link <a href="https://support.microsoft.com/en-nz/kb/919776">https://support.microsoft.com/en-nz/kb/919776</a>, the job <strong>MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxDb</strong> calls on the Job: <strong>MessageBox_Message_Cleanup_BizTalkMsgBoxDb job</strong>

The below table show that this Job MessageBox_Message_Cleanup_BizTalkMsgBoxDb does run and complete:

<strong> <a href="https://msdnshared.blob.core.windows.net/media/2016/10/002.png"><img width="300" height="106" class="alignnone size-medium wp-image-1125" alt="002" src="https://msdnshared.blob.core.windows.net/media/2016/10/002-300x106.png" /></a></strong>

So our Biztalk user had a question:

Is the job <strong>MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxD </strong>actually completing OK?

==============================

<strong>Solution</strong>

Let’s see this job description:

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/003.png"><img width="300" height="108" class="alignnone size-medium wp-image-1135" alt="003" src="https://msdnshared.blob.core.windows.net/media/2016/10/003-300x108.png" /></a>

This job will always display a status of Failure after the first failure, but it doesn’t mean that job is failing. It runs every one mins and calls on job <strong>MessageBox_Message_Cleanup_BizTalkMsgBoxDb job</strong>, we can check job history for <strong>MessageBox_Message_Cleanup_BizTalkMsgBoxDb job</strong>, if this job working well, and the MessageBox size doesn’t always increase, then we consider the job<strong> MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxD </strong>is completing ok as well.

&nbsp;

<strong>Additional information</strong>

I conducted in-depth research to see why the job <strong>MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxD </strong>display <strong>Failure</strong>.

Let’s look at the source code below,

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/004.png"><img width="300" height="89" class="alignnone size-medium wp-image-1145" alt="004" src="https://msdnshared.blob.core.windows.net/media/2016/10/004-300x89.png" /></a>

When the job unable to acquire applock on MessageRefCountLog, the job will return. Basically, in a concurrent environment, due to other job is processing data, this job can’t get applock is quite normal, after returning, this job will restart in next 1 minute. The job <strong>MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxD failure </strong>can be ignored when<strong> job MessageBox_Message_Cleanup_BizTalkMsgBoxDb </strong>works well.

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>How to get the total number of outgoing messages from a remote MSMQ server?</title>
      <link>https://docs.microsoft.com/archive/blogs/apacbiztalk/how-to-get-the-total-number-of-outgoing-messages-from-a-remote-msmq-server</link>
      <pubDate>Thu, 05 Nov 2015 04:24:03 GMT</pubDate>
      <dc:creator><![CDATA[Wen-Jun Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/apacbiztalk/2015/11/05/how-to-get-the-total-number-of-outgoing-messages-from-a-remote-msmq-server/</guid>
      <description><![CDATA[We have to use the COM interface of MSMQ to enumerate every outgoing queue's message count and sum...]]></description>
      <content:encoded><![CDATA[<p>We have to use the COM interface of MSMQ to enumerate every outgoing queue's message count and sum up them to get the number. To get started, add <span>mqoa30.tlb under system32 folder as reference in your VS project. Below is the code.</span></p>
<pre class="scroll"><code class="csharp">using System;<br /> using System.Messaging;<br /> using System.Collections;<br /> <br /> namespace MSMQOutgoingMsgCount<br /> {<br /> class Program<br /> {<br /> static void Main(string[] args)<br /> { <br /> <br /> int MsgCount = 0;<br /> <br /> //Set the string to the remote MSMQ server's name<br /> string ServerName = "yinlin";<br /> ArrayList OutgoingQueuenames = new ArrayList();<br /> <br /> Console.WriteLine("Outgoing Queue List:");<br /> Console.WriteLine("====================================");<br /> <br /> try<br /> {<br /> MSMQ.MSMQApplication mq = new MSMQ.MSMQApplication();<br /> <br /> //Set the remote server<br /> mq.Machine = ServerName;<br /> object obj = mq.ActiveQueues;<br /> <br /> Object[] oArray = (Object[])obj;<br /> for (int i = 0; i &lt; oArray.Length; i++)<br /> {<br /> if (oArray[i] == null)<br /> continue;<br /> <br /> //For an Outgoing queue, its queue name should include "DIRECT=" and doesn't contain the servername.<br /> if (oArray[i].ToString().IndexOf("DIRECT=") &gt;= 0 &amp;&amp; !oArray[i].ToString().Contains(ServerName)) <br /> {<br /> OutgoingQueuenames.Add(oArray[i].ToString()); <br /> }<br /> }<br /> <br /> for (int i = 0; i &lt; OutgoingQueuenames.Count; i++)<br /> {<br /> MSMQ.MSMQManagement mgmt = new MSMQ.MSMQManagement();<br /> MSMQ.MSMQOutgoingQueueManagement outgoingMgmt = null;<br /> <br /> //Set the remote MSMQ server<br /> object Server = ServerName;<br /> object Path = string.Empty;<br /> object Mode = OutgoingQueuenames[i];<br /> <br /> //Use the name of outgoing queue as the first parameter to call MSMQManagement.Init() method to get the MSMQOutgoingQueueManagement object<br /> mgmt.Init(ref Server, ref Path, ref Mode); <br /> outgoingMgmt = (MSMQ.MSMQOutgoingQueueManagement)mgmt;<br /> <br /> //Use MSMQManagement.MessageCount to get the message count<br /> MsgCount += outgoingMgmt.MessageCount;<br /> <br /> Console.WriteLine(OutgoingQueuenames[i] + ": " + outgoingMgmt.MessageCount);<br /> <br /> }<br /> <br /> <br /> }<br /> catch (Exception ee)<br /> {<br /> Console.WriteLine(ee.ToString());<br /> }<br /> <br /> Console.WriteLine();<br /> Console.WriteLine("=======================");<br /> Console.WriteLine("Total Messages: " + MsgCount.ToString());<br /> Console.ReadLine();<br /> <br /> }<br /> }<br /> }<br /> </code></pre>
<p>&nbsp;</p>
<p>Best regards,</p>
<p>WenJun Zhang<span><br /></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Error &lt;No BizTalk Configuration database(s) found on server ''.&gt; when deploy BizTalk application in VS if your account is removed from sysadmin role in SQL.</title>
      <link>https://docs.microsoft.com/archive/blogs/apacbiztalk/error-no-biztalk-configuration-databases-found-on-server-when-deploy-biztalk-application-in-vs-if-your-account-is-removed-from-sysadmin-role-in-sql</link>
      <pubDate>Mon, 02 Nov 2015 01:34:46 GMT</pubDate>
      <dc:creator><![CDATA[Wen-Jun Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/apacbiztalk/2015/11/02/error-no-biztalk-configuration-databases-found-on-server-when-deploy-biztalk-application-in-vs-if-your-account-is-removed-from-sysadmin-role-in-sql/</guid>
      <description><![CDATA[&nbsp;The problem:
===========================
When a user account&rsquo;s SQL sysadmin role is...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;The problem:</p>
<p>===========================</p>
<p>When a user account&rsquo;s SQL <strong>sysadmin</strong> role is removed and only leaves it with <strong>public</strong>, the user cannot use Visual Studio to deploy BizTalk application after you edit the server name, even if the account is in <strong>BizTalk Server Administrators</strong> group. An Error &lt;No BizTalk Configuration database(s) found on server ''.&gt; is displayed in VS.</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/0871.v1.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/0871.v1.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/0871.v1.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/0871.v1.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/8463.v2.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/8463.v2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/8463.v2.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/8463.v2.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>According to SQL profiler trace captured when the error occurs, the stored procedure <strong>sp_databases </strong>will be called to retrieve the list of databases on the SQL server.</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/0576.v3.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/0576.v3.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/0576.v3.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/0576.v3.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>On SQL server 2012, when I manually execute this stored procedure with only <strong>public</strong> role(<strong>sysadmin</strong> removed), the sp returns a blank result even if my account is in <strong>BizTalk Server Administrators</strong> group which has access to BizTalk databases.</p>
<p>&nbsp;</p>
<p>exec sp_databases</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/7411.v4.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/7411.v4.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/7411.v4.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/7411.v4.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>On SQL server 2008 R2, the same sp properly returns databases with <strong>public </strong>only.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/7024.v5.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/7024.v5.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/7024.v5.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/7024.v5.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>If we check the code of this sp, looks like it should at least return the databases which the account has permission to access.</p>
<p>&nbsp;</p>
<p>select</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATABASE_NAME&nbsp;&nbsp; = db_name(s_mf.database_id),</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATABASE_SIZE&nbsp;&nbsp; = convert(int,</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case -- more than 2TB(maxint) worth of pages (by 8K each) can not fit an int...</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when sum(convert(bigint,s_mf.size)) &gt;= 268435456</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then null</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else sum(convert(bigint,s_mf.size))*8 -- Convert from 8192 byte pages to Kb</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end),</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REMARKS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = convert(varchar(254),null)</p>
<p>&nbsp;&nbsp;&nbsp; from</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.master_files s_mf</p>
<p>&nbsp;&nbsp;&nbsp; where</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s_mf.state = 0 and -- ONLINE</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; has_dbaccess(db_name(s_mf.database_id)) = 1 -- Only look at databases to which we have access</p>
<p>&nbsp;&nbsp;&nbsp; group by s_mf.database_id</p>
<p>&nbsp;&nbsp;&nbsp; order by 1</p>
<p>&nbsp;</p>
<p>Workaround:</p>
<p>===========================</p>
<p>According to MSDN, the sp_databases stored procedure requires the following permissions</p>
<p><a href="https://msdn.microsoft.com/en-us/library/ms176070.aspx?f=255&amp;MSPPError=-2147217396"><span style="color: #0563c1; font-family: Calibri;">https://msdn.microsoft.com/en-us/library/ms176070.aspx?f=255&amp;MSPPError=-2147217396</span></a></p>
<p>Permissions</p>
<p>Requires CREATE DATABASE, or ALTER ANY DATABASE, or VIEW ANY DEFINITION permission, and must have access permission to the database. Cannot be denied VIEW ANY DEFINITION permission.</p>
<p>===========================</p>
<p>Therefore, we can grant view any definition permission&nbsp;to specific user which needs to deploy BizTalk application in VS.</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="575">
<p>USE&nbsp;master&nbsp;<br /> GO&nbsp;<br /> GRANT&nbsp;VIEW&nbsp;ANY&nbsp;DEFINITION&nbsp;TO&nbsp;"SQLUser"</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Best regards,</p>
<p>WenJun</p>]]></content:encoded>
    </item>
    <item>
      <title>“Large message size” setting can impact the execution of map</title>
      <link>https://docs.microsoft.com/archive/blogs/apacbiztalk/large-message-size-setting-can-impact-the-execution-of-map</link>
      <pubDate>Fri, 09 Oct 2015 03:49:00 GMT</pubDate>
      <dc:creator><![CDATA[Wen-Jun Zhang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/apacbiztalk/2015/10/09/large-message-size-setting-can-impact-the-execution-of-map/</guid>
      <description><![CDATA[&nbsp;
We recently got a problem reported by our customer that the "large message size"...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p><span>We recently got a problem reported by our customer that the "large message size" configuration(in BizTalk group property settings)</span></p>
<p>&nbsp;</p>
<p>&nbsp;<strong><span style="font-family: Calibri; font-size: small;">Problem:</span></strong></p>
<p>&nbsp;<span style="font-family: Calibri; font-size: small;">&ldquo;Large message size&rdquo; setting can impact the execution of map.</span></p>
<p>&nbsp;&nbsp;</p>
<p><strong><span style="font-family: Calibri; font-size: small;">The scenario:</span></strong></p>
<p><span style="font-family: Calibri; font-size: small;">In the orchestration, the customer uses&nbsp;a&nbsp;mapping&nbsp;can split 1 input message into 2 output message, based on the value a node.</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">Illustration:</span></p>
<p>&nbsp;&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/6082.b1.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/6082.b1.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/6082.b1.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/6082.b1.jpg" alt="" border="0" /></a></span>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/0676.b2.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/0676.b2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/0676.b2.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/0676.b2.jpg" alt="" border="0" /></a></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">They define the mapping transform config like this, with destination as a inline schema of 2 message parts </span></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/0118.b3.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/0118.b3.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/0118.b3.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/0118.b3.jpg" alt="" border="0" /></a></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/7750.b4.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/7750.b4.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/7750.b4.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/7750.b4.jpg" alt="" border="0" /></a></span></p>
<p>&nbsp;</p>
<p><strong><span style="font-family: Calibri; font-size: small;">Issue:</span></strong></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">They encounter XLANG/s error (Invalid input/out document into/from the transform. Does not have a single root node.) at the Mapping, when the following test condition is reached:</span></p>
<p>&nbsp;</p>
<ol>
<li>
<p>The input message contain only 1 type of records, (e.g only A records, but no B records), AND</p>
</li>
<li>
<p>The input message size is larger than 100KB (e.g. we put a 102KB file)</p>
</li>
</ol>
<p>&nbsp;&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">And for message size condition, we found that it seems to be related to the &ldquo;Large message size&rdquo; setting at the BizTalk Group (Current is 100KB default). </span></p>
<p>&nbsp;<span style="font-family: Calibri; font-size: small;">e.g. If we change &ldquo;Large message size&rdquo; setting to 102KB, the 102KB file can be processed without error. However, a larger file e.g. 104KB cannot.</span></p>
<p>&nbsp;<span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Calibri; font-size: small;">Currently a workaround is implementing the splitting operation by 2 separate Maps instead one single map. Then we did not hit issue for the same larger files after that.</span></p>
<p>&nbsp;&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">XLANG error:</span></p>
<p>&nbsp;&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/2630.b5.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/2630.b5.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/57/76/2630.b5.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-57-76/2630.b5.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p>&nbsp;</p>
<p>Log Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Application</p>
<p>&nbsp;</p>
<p>Source:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XLANG/s</p>
<p>&nbsp;</p>
<p>Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24/06/2015 16:55:25</p>
<p>&nbsp;</p>
<p>Event ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10030</p>
<p>&nbsp;</p>
<p>Task Category: None</p>
<p>&nbsp;</p>
<p>Level:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Error</p>
<p>&nbsp;</p>
<p>Keywords:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Classic</p>
<p>&nbsp;</p>
<p>User:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; N/A</p>
<p>&nbsp;</p>
<p>Computer:&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>Description:</p>
<p>&nbsp;</p>
<p>xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'TestMapping.Orchestration.InlineSchemaMappingOrchestration(ebc6996c-4e09-9fd4-a153-a7b6d594756c)'.</p>
<p>&nbsp;</p>
<p>The service instance will remain suspended until administratively resumed or terminated.</p>
<p>&nbsp;</p>
<p>If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.</p>
<p>&nbsp;</p>
<p>InstanceId: 8524a1f6-32be-4335-8ba9-be6b2e3a56e3</p>
<p>&nbsp;</p>
<p>Shape name: ConstructMessage_1</p>
<p>&nbsp;</p>
<p>ShapeId: 9fb18f5f-0d34-4026-9135-b86cb96ff424</p>
<p>&nbsp;</p>
<p>Exception thrown from: segment 1, progress 6</p>
<p>&nbsp;</p>
<p>Inner exception: Error encountered while executing the transform TestMapping.Orchestration.InlineSchemaMapping.InlineMapping. Error:Invalid input/output document into/from the transform. Does not have a single root node..</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p>Exception type: XTransformationFailureException</p>
<p>&nbsp;</p>
<p>Source: Microsoft.XLANGs.Engine</p>
<p>&nbsp;</p>
<p>Target Site: Void ShredXmlDocumentStream(System.IO.Stream, System.Object[], System.String, System.Xml.XmlDeclaration)</p>
<p>&nbsp;</p>
<p>The following is a stack trace that identifies the location where the exception occured</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; at Microsoft.XLANGs.Core.Service.Transform.ShredXmlDocumentStream(Stream inputStream, Object[] outParams, String mapName, XmlDeclaration xmlDecl)</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; at Microsoft.XLANGs.Core.Service.ApplyStreamingTransform(Type mapRef, TransformMetaData trfMetaData, Object[] outParams, Stream[] inStreams, Boolean whitespaceCorrect)</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; at Microsoft.XLANGs.Core.Service.ApplyTransform(Type mapRef, Object[] outParams, Object[] inParams)</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; at TestMapping.Orchestration.InlineSchemaMappingOrchestration.segment1(StopConditions stopOn)</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception&amp; exp)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p>Event Xml:</p>
<p>&nbsp;</p>
<p>&lt;Event xmlns="<a href="https://schemas.microsoft.com/win/2004/08/events/event">https://schemas.microsoft.com/win/2004/08/events/event</a>"&gt;</p>
<p>&nbsp;</p>
<p>&nbsp; &lt;System&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;Provider Name="XLANG/s" /&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;EventID Qualifiers="0"&gt;10030&lt;/EventID&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;Level&gt;2&lt;/Level&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;Task&gt;0&lt;/Task&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;Keywords&gt;0x80000000000000&lt;/Keywords&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;TimeCreated SystemTime="2015-06-24T08:55:25.000000000Z" /&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;EventRecordID&gt;102400&lt;/EventRecordID&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;Channel&gt;Application&lt;/Channel&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;Computer&gt;ITDMWO86A.heh.net&lt;/Computer&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;Security /&gt;</p>
<p>&nbsp;</p>
<p>&nbsp; &lt;/System&gt;</p>
<p>&nbsp;</p>
<p>&nbsp; &lt;EventData&gt;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;Data&gt;xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'TestMapping.Orchestration.InlineSchemaMappingOrchestration(ebc6996c-4e09-9fd4-a153-a7b6d594756c)'.</p>
<p>&nbsp;</p>
<p>The service instance will remain suspended until administratively resumed or terminated.</p>
<p>&nbsp;</p>
<p>If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.</p>
<p>&nbsp;</p>
<p>InstanceId: 8524a1f6-32be-4335-8ba9-be6b2e3a56e3</p>
<p>&nbsp;</p>
<p>Shape name: ConstructMessage_1</p>
<p>&nbsp;</p>
<p>ShapeId: 9fb18f5f-0d34-4026-9135-b86cb96ff424</p>
<p>&nbsp;</p>
<p>Exception thrown from: segment 1, progress 6</p>
<p>&nbsp;</p>
<p>Inner exception: Error encountered while executing the transform TestMapping.Orchestration.InlineSchemaMapping.InlineMapping. Error:Invalid input/output document into/from the transform. Does not have a single root node..</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p>Exception type: XTransformationFailureException</p>
<p>&nbsp;</p>
<p>Source: Microsoft.XLANGs.Engine</p>
<p>&nbsp;</p>
<p>Target Site: Void ShredXmlDocumentStream(System.IO.Stream, System.Object[], System.String, System.Xml.XmlDeclaration)</p>
<p>&nbsp;</p>
<p>The following is a stack trace that identifies the location where the exception occured</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; at Microsoft.XLANGs.Core.Service.Transform.ShredXmlDocumentStream(Stream inputStream, Object[] outParams, String mapName, XmlDeclaration xmlDecl)</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; at Microsoft.XLANGs.Core.Service.ApplyStreamingTransform(Type mapRef, TransformMetaData trfMetaData, Object[] outParams, Stream[] inStreams, Boolean whitespaceCorrect)</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; at Microsoft.XLANGs.Core.Service.ApplyTransform(Type mapRef, Object[] outParams, Object[] inParams)</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; at TestMapping.Orchestration.InlineSchemaMappingOrchestration.segment1(StopConditions stopOn)</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception&amp;amp; exp)</p>
<p>&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Data&gt;</p>
<p>&nbsp;</p>
<p>&nbsp; &lt;/EventData&gt;</p>
<p>&nbsp;</p>
<p>&lt;/Event&gt;</p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span><strong><span style="font-family: Calibri; font-size: small;">Analysis:</span></strong></p>
<p>&nbsp;<span style="font-family: Calibri; font-size: small;">Based on research results so far, the problem seems to be&nbsp;related to different behavior between in-mempry transform and&nbsp;stream based&nbsp;transform.&nbsp;Also, the same type of splitting mapping is well used in old BizTalk 2006 R2.</span></p>
<p>&nbsp;</p>
<p>If you meet the same issue, please consider the workaround by increasing "Large message size"/use separate maps. Or you can contact Microsoft for assistance.&nbsp;</p>
<p>&nbsp;</p>
<p>Best regards,</p>
<p>WenJun Zhang</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>