<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>BizTalk</title>
        <link>http://www.agilior.pt/blogs/bruno.camara/category/39.aspx</link>
        <description>BizTalk</description>
        <language>en-US</language>
        <copyright>BFC</copyright>
        <managingEditor>bruno.camara@agilior.pt</managingEditor>
        <generator>Subtext Version 1.9.0.27</generator>
        <item>
            <title>BizTalk: Delivery Notification in Direct Send Ports</title>
            <link>http://agilior.pt/blogs/bruno.camara/archive/2008/04/17/4344.aspx</link>
            <description>&lt;p align="center"&gt; &lt;/p&gt; &lt;p&gt;When sending a message in BizTalk to a Send Port, we can use the Delivery Notification property to test whether the message was sent with success. However, this feature is not available if we are using Direct Binding. Recently, in one of our projects, we needed to have the acknowledge in a direct send port. Fortunately, there is &lt;a href="http://blogs.microsoft.co.il/blogs/rel/archive/2007/10/20/delivery-notification-with-direct-send-port.aspx"&gt;someone who wrote the solution&lt;/a&gt;. So here is the step by step how to in a visual way.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;First of all, imagine that the there is an orchestration named ProcessMessage, which receives as parameters the message to send, the SendPort to use, and a boolean telling if the send port has delivery notification support.&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_4.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="145" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb_1.png" width="261" border="0" /&gt;&lt;/a&gt;       &lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt; &lt;div align="left"&gt;Next you have to decide if the send port passed as an argument supports delivery notification or not&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p align="left"&gt; &lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="208" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb_3.png" width="655" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p align="left"&gt; &lt;/p&gt; &lt;p align="center"&gt; &lt;/p&gt; &lt;p&gt;where the rule is&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_10.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb_4.png" width="446" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;If the send port supports delivery notification, we will proceed as usual, catching the DeliveryNotificationException, and Suspending the Orchestration manually&lt;/li&gt;&lt;/ul&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_14.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="833" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb_6.png" width="817" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;Now, let's do the hard part, when the send port does not support delivery notification out of the box. In this case, this first thing we must do, is to construct a new XmlDocument message, setting the promoted property of BTS.AckRequired to true, and initializing the BTS.CoorelationToken to new guid.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; &lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_18.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="324" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb_8.png" width="476" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_20.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="311" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb_9.png" width="571" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;Next, we will need to define three correlation types.  &lt;ul&gt; &lt;li&gt;The AckRequiredCorrelationType, which must use the property BTS.AckRequired  &lt;/li&gt;&lt;li&gt;The CorrelationTokenCorrelationType, which must use the property BTS.CorrelationToken  &lt;/li&gt;&lt;li&gt;The MessageCorrelationType, which must use the promoted properties that we will use to filter when the message arrives at the message box. In our case we defined two properties, the Channel and the Direction.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p align="center"&gt; &lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_22.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="104" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb_10.png" width="346" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p align="center"&gt; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;Then, we define three correlation sets respectively&lt;/li&gt;&lt;/ul&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_24.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="122" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb_11.png" width="337" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;Now, we can send the message to the direct send port, initializing the three correlation sets&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; &lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_26.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="188" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb_12.png" width="1070" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;ul&gt; &lt;li&gt; &lt;div align="left"&gt; Now we have to add two receive shapes, which must receive from a Receive Por Direct, and both have to follow de correlation set  . Why two receive shapes? The first receive has a subscription to receive a copy of the original message. In the second receive shape we receive the message that we are searching, which must be a NACK or an ACK. &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p align="left"&gt; &lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_5.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="344" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb.png" width="862" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p align="center"&gt; &lt;/p&gt; &lt;ul&gt; &lt;li&gt; &lt;div align="left"&gt;To decide if we have a NACK, we can inspect the property BTS.AckType&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_32.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="679" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb_13.png" width="519" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p align="left"&gt; &lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_30.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="251" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/bruno.camara/WindowsLiveWriter/BizTalkDeliveryNotificationinDirectSendP_EFDA/image_thumb_7.png" width="483" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p align="left"&gt; &lt;/p&gt; &lt;p align="left"&gt; &lt;/p&gt; &lt;p align="left"&gt;And that's it. When there is a NACK, the message we will receive is something like this.&lt;/p&gt; &lt;p align="left"&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:81233e77-17cc-49e7-b9e2-3030cc8754a2" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;SOAP:Envelope &lt;/span&gt;&lt;span style="color: #FF0000; "&gt;xmlns:SOAP&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;="http://schemas.xmlsoap.org/soap/envelope/"&lt;/span&gt;&lt;span style="color: #FF0000; "&gt;
SOAP:encodingStyle&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;="http://schemas.xmlsoap.org/soap/encoding/"&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
  &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;SOAP:Body&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;SOAP:Fault&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;faultcode&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;Microsoft BizTalk Server Negative Acknowledgment &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;faultcode&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;faultstring&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;An error occurred while processing the message, refer to the details section for more information &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;faultstring&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;faultactor&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;SFTP://127.0.0.1:22/in/%SourceFileName%&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;faultactor&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;detail&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;ns0:NACK &lt;/span&gt;&lt;span style="color: #FF0000; "&gt;Type&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;="NACK"&lt;/span&gt;&lt;span style="color: #FF0000; "&gt; xmlns:ns0&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;="http://schema.microsoft.com/BizTalk/2003/NACKMessage.xsd"&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;NAckID&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;{2EE4D577-313F-4840-8FB2-3DC60CF3B68B}&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;NAckID&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;ErrorCode&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;0xc0c0167a&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;ErrorCode&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;ErrorCategory&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;ErrorCategory&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
          &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;ErrorDescription&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;Server error (2): No such file&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;ErrorDescription&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;ns0:NACK&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;detail&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;SOAP:Fault&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
  &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;SOAP:Body&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;SOAP:Envelope&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;We built an helper class to extract the ErrorCode the FaultActor to log the exception, send and email, and suspend the orchestration with a reason which can be understood by the BizTalk operator. &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Now we have delivery notification in direct send ports.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Until next time.&lt;/p&gt;&lt;img src="http://agilior.pt/blogs/bruno.camara/aggbug/4344.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>BFC</dc:creator>
            <guid>http://agilior.pt/blogs/bruno.camara/archive/2008/04/17/4344.aspx</guid>
            <pubDate>Thu, 17 Apr 2008 15:33:16 GMT</pubDate>
            <wfw:comment>http://agilior.pt/blogs/bruno.camara/comments/4344.aspx</wfw:comment>
            <comments>http://agilior.pt/blogs/bruno.camara/archive/2008/04/17/4344.aspx#feedback</comments>
            <slash:comments>2422</slash:comments>
            <wfw:commentRss>http://agilior.pt/blogs/bruno.camara/comments/commentRss/4344.aspx</wfw:commentRss>
        </item>
        <item>
            <title>BizTalk: SFTP Adapter and SSH Daemon Configuration Troubleshooting</title>
            <link>http://agilior.pt/blogs/bruno.camara/archive/2008/03/05/3825.aspx</link>
            <description>&lt;p&gt;In one of our BizTalk implementations we are using &lt;a href="http://en.wikipedia.org/wiki/SFTP"&gt;SFTP&lt;/a&gt; to transfer files. We are using the SFTP adapter from &lt;a href="http://www.nsoftware.com/"&gt;/n software&lt;/a&gt;. Recently we had a situation where we had too many timeouts written in the event log, and too many messages were retried using the out-of-box retry mechanism of BizTalk. We started to research where the bottleneck was. Our first bet was to think that the limitation was in the destination  server. We talked to the system administrator and he told us that there is no limitation in the simultaneous SSH connections. Then we started to watch to BizTalk  and we increased the &lt;a href="http://msdn2.microsoft.com/en-us/library/fb6y0fyc.aspx"&gt;maxConnection&lt;/a&gt;  in the config file, however nothing changed in terms of the number of timeouts. &lt;/p&gt; &lt;p&gt;We continued to research and we began to watch to unix man pages to see if there is some parameter you could change in the &lt;a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?sshd_config+5"&gt;SSH daemon&lt;/a&gt;. We took special attention to one parameter named MaxStartups. In the documentation it is said&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;pre&gt;             Specifies the maximum number of concurrent unauthenticated con-
	     nections to the sshd daemon.  Additional connections will be
	     dropped until authentication succeeds or the LoginGraceTime
	     expires for a connection.	The default is 10.

	     Alternatively, random early drop can be enabled by specifying the
	     three colon separated values ``start:rate:full'' (e.g.,
	     "10:30:60").  sshd will refuse connection attempts with a proba-
	     bility of ``rate/100'' (30%) if there are currently ``start''
	     (10) unauthenticated connections.	The probability increases lin-
	     early and all connection attempts are refused if the number of
	     unauthenticated connections reaches ``full'' (60).&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;It seems there is a limitation in the number of simultaneous unauthenticated connections. Of course we are using authentication, but there is a delay between the connection is opened and the authentication process. To confirm our feelings we made a simple test: we opened 10 connections without authenticate. When opening the 11th connection we got "Connection Refused".  So the problem is, under peak load, BizTalk starts to open SSH connections and begins the authentication process. It it not hard to imagine that there is a probability to have connections refused, while others are in the authentication process. We expalined the situation to our system administrator and asked him to increase the parameters MaxStartups. He increased to 30 and guess what: the timeouts disappeared (well, in fact we have one or another occasionally). Always learning.&lt;/p&gt;&lt;img src="http://agilior.pt/blogs/bruno.camara/aggbug/3825.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>BFC</dc:creator>
            <guid>http://agilior.pt/blogs/bruno.camara/archive/2008/03/05/3825.aspx</guid>
            <pubDate>Wed, 05 Mar 2008 08:18:19 GMT</pubDate>
            <wfw:comment>http://agilior.pt/blogs/bruno.camara/comments/3825.aspx</wfw:comment>
            <comments>http://agilior.pt/blogs/bruno.camara/archive/2008/03/05/3825.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://agilior.pt/blogs/bruno.camara/comments/commentRss/3825.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>