<?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>Getting started with WCF, WF, .Net 4.0</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/amitbhatia/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/amitbhatia/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:39:56 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Configuration based Service Bus ConnectionStatusBehavior to monitor relay connectivity</title>
      <link>https://docs.microsoft.com/archive/blogs/amitbhatia/configuration-based-service-bus-connectionstatusbehavior-to-monitor-relay-connectivity</link>
      <pubDate>Mon, 01 Feb 2016 08:29:00 GMT</pubDate>
      <dc:creator><![CDATA[AmitBhatia]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/amitbhatia/2016/02/01/configuration-based-service-bus-connectionstatusbehavior-to-monitor-relay-connectivity/</guid>
      <description><![CDATA[Sometime it requires to monitor Service Bus relay connectivity. ConnectionStatusBehavior allows us...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p class="MsoNormal">Sometime it requires to monitor Service Bus relay connectivity. ConnectionStatusBehavior allows us to monitor the same through Connecting, Online and Offline events. However, it requires to modify the code to handle these events if listener doesn&rsquo;t have the same implemented already, and most of the times this is the case. However, when there&rsquo;s situation to monitor the Service Bus connectivity in crisis, there&rsquo;s no option but to modify the code of relay listener.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Many of us know customers&rsquo; concerns when we request them to apply ConnectionStatusBehavior to monitor Service Bus relay connectivity. Their concerns are valid to some extent as we&rsquo;re requesting them to add code in their application to log monitoring events which requires rebuilding and redeploying relay listener in production <span style="font-family: Wingdings;">L</span>.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Thus, many of us have a demand if there&rsquo;s an option to apply Service Bus ConnectionStatusBehavior on relay endpoint through configuration which emits connectivity events.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Good news, we&rsquo;ve created a ConnectionStatusBehavior behavior extension (let&rsquo;s name it ConnectionStatusBehaviorExtention) which allows to apply ConnectionStatusBehavior on endpoint through configuration. Please find the binaries in attached ConnectionStatusElementExtended.zip file.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">ConnectionStatusBehaviorExtention can be applied following below simple steps,</p>
<p class="MsoNormal">a)<span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Copy ConnectionStatusElementExtended.dll (in attached zip file) under WCF Relay service installation folder (bin)</p>
<p class="MsoNormal">b)<span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Open WCF Relay Service configuration (i.e. Web.config),</p>
<p class="MsoNormal"><span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;">&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; </span>I.<span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Add following configuration under &lt;system.serviceModel&gt;\&lt;behaviorExtensions&gt; element to register ConnectionStatusBehaviorExtention,</p>
<p class="MsoListParagraph" style="margin-left: 72pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&lt;</span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">add</span><span style="background: yellow; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">connectionStatusBehaviorExtention</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: red; font-family: Consolas; font-size: 9.5pt;">type</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">ConnectionStatusElementExtended.ConnectionStatusExtendedBehaviorElement, ConnectionStatusElementExtended</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;"> /&gt;</span></p>
<p class="MsoListParagraph"><span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;">&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; </span>II.<span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Then, add following configuration under endpointBehavior used by relay endpoint &nbsp;to apply above defined behavior extension. This is the line which applies &nbsp;our extended ConnectionStatusBehaviorExtension on relay endpoint<br /> <span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&lt;connectionStatusBehaviorExtention /&gt;</span>&nbsp;</p>
<p class="MsoListParagraph"><span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;">&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; </span>III.<span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>I have built ConnectionStatusBehaviorExtention referencing Microsoft.ServiceBus.dll v2.7.00. Considering Microsoft.ServiceBus.dll assembly version changes frequently and assembly is signed, we&rsquo;d need following configuration to be applied to redirect .net runtime to use Microsoft.ServiceBus.dll used by customer&rsquo;s WCF Relay Service. Define Microsoft.ServiceBus.dll version used by WCF relay service (listener) under newVersion configuration (highlighted).</p>
<p class="MsoNormal" style="margin-left: 72pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">runtime</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal" style="margin-left: 72pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">assemblyBinding</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">xmlns</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">urn:schemas-microsoft-com:asm.v1</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal" style="margin-left: 72pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">dependentAssembly</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal" style="margin-left: 72pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">assemblyIdentity</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">Microsoft.ServiceBus</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">publicKeyToken</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">31bf3856ad364e35</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">culture</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">neutral</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;"> /&gt;</span></p>
<p class="MsoNormal" style="margin-left: 72pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--</span><span style="background: white; color: green; font-family: Consolas; font-size: 9.5pt;"> Assembly versions can be redirected in app, publisher policy, or machine configuration files. </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">--&gt;</span></p>
<p class="MsoNormal" style="margin-left: 72pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">bindingRedirect</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">oldVersion</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">2.7.0.0</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: aqua; color: red; font-family: Consolas; font-size: 9.5pt;">newVersion</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">3.0.0.0</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;"> /&gt;</span></p>
<p class="MsoNormal" style="margin-left: 72pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">dependentAssembly</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal" style="margin-left: 72pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">assemblyBinding</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal" style="margin-left: 72pt;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">runtime</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal" style="margin-left: 72pt;"><br /> For example, based on above configuration, my WCF Relay Service on which ConnectionStatusBehaviorExtention is applied seems to be using Microsoft.ServiceBus.dll v3.0.0.0.<span style="background: yellow;"> <br /> <strong>Please note that the version number is to be taken from Microsoft.ServiceBus.dll assembly name, it&rsquo;s not the file version.</strong></span></p>
<p class="MsoListParagraph">&nbsp;</p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;</span></p>
<p class="MsoNormal">That&rsquo;s it! With above simple steps ConnectionStatusBehaviorExtention is applied and ready to log the connection event information.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Where&rsquo;re the logs Written?</p>
<p class="MsoNormal">======================</p>
<p class="MsoNormal">a)<span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ConnectionStatusBehaviorExtention logs the events in Application eventlog with Source: Microsoft.ServiceBus.ConnectStatus. The event ids are between 990-992. You can try filtering the event log to view events based on Source Microsoft.ServiceBus.ConnectStatus or event id range <strong>990 - 992</strong>.</p>
<p class="MsoNormal">b)<span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>I&rsquo;ve also added tracing feature built on top of System.Diagnostics to allow emit trace events using different TraceListeners (Similar like WCF tracing or System.Net tracing). &nbsp;The trace source name is same: <span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">Microsoft.ServiceBus.ConnectStatus</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">.<br /> </span>Capturing these traces should be extremely useful in situations where we need to correlate the connectivity traces with WCF traces or confirm the callstacks responsible for emitting the events i.e. online or offline.<br /> here&rsquo;s the sample configuration which can be used to emit events using XmlWriterTraceListener.</p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">system.diagnostics</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">sources</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">source</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">Microsoft.ServiceBus.ConnectStatus</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">switchValue</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">Information</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">listeners</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">add</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">ConnectStatusTraceListener</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">add</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">listeners</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">source</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">sources</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">sharedListeners</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">add</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">initializeData</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">connection_tracelog.svclog</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">type</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">System.Diagnostics.XmlWriterTraceListener</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">ConnectStatusTraceListener</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">traceOutputOptions</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">Timestamp, ProcessId, ThreadId, Callstack</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">add</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">sharedListeners</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">trace</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">autoflush</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">true</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;"> /&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">system.diagnostics</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Here's a sample WCF Relay listener service configuration which uses extended ConnectionStatusBehavior on relay endpoints (Please see the highlighted text),</p>
<p class="MsoNormal"><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&lt;</span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">runtime</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">assemblyBinding</span><span style="background: yellow; color: red; font-family: Consolas; font-size: 9.5pt;">xmlns</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">urn:schemas-microsoft-com:asm.v1</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">dependentAssembly</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">assemblyIdentity</span><span style="background: yellow; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">Microsoft.ServiceBus</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: red; font-family: Consolas; font-size: 9.5pt;">publicKeyToken</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">31bf3856ad364e35</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: red; font-family: Consolas; font-size: 9.5pt;">culture</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">en-us</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;"> /&gt;</span></p>
<p class="MsoNormal"><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--</span><span style="background: yellow; color: green; font-family: Consolas; font-size: 9.5pt;"> Assembly versions can be redirected in app, publisher policy, or machine configuration files. </span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">--&gt;</span></p>
<p class="MsoNormal"><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">bindingRedirect</span><span style="background: yellow; color: red; font-family: Consolas; font-size: 9.5pt;">oldVersion</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">2.7.0.0</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: red; font-family: Consolas; font-size: 9.5pt;">newVersion</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">3.0.0.0</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;"> /&gt;</span></p>
<p class="MsoNormal"><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">dependentAssembly</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">assemblyBinding</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp; &lt;/</span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">runtime</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal">&nbsp;<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">system.serviceModel</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">services</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">service</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">behaviorConfiguration</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">HelloServiceBus.HelloServiceBus</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">HelloServiceBus.HelloServiceBus</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">endpoint</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">address</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;"><a href="https://xxxx.servicebus.windows.net/netrelay">https://xxxx.servicebus.windows.net/netrelay</a></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: red; font-family: Consolas; font-size: 9.5pt;">behaviorConfiguration</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">sharedSecretClientCredentials</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">binding</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">basicHttpRelayBinding</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">bindingConfiguration</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">HttpRelayEndpointConfig</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">contract</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">HelloServiceBus.IHelloServiceBus</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">/&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">service</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">services</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">bindings</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">basicHttpRelayBinding</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--</span><span style="background: white; color: green; font-family: Consolas; font-size: 9.5pt;">&lt;binding name="HttpRelayEndpointConfig" proxyAddress="sproxy-se.corp.vattenfall.com:8086" useDefaultWebProxy="false" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" transferMode="Streamed" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:05:00" sendTimeout="00:05:00"&gt;</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">--&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">binding</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">HttpRelayEndpointConfig</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">readerQuotas</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">maxDepth</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">2147483647</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">maxStringContentLength</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">2147483647</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">maxArrayLength</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">2147483647</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">maxBytesPerRead</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">2147483647</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">maxNameTableCharCount</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">2147483647</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;"> /&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">security</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">relayClientAuthenticationType</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">RelayAccessToken</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;"> /&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">binding</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">basicHttpRelayBinding</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">bindings</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">behaviors</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">endpointBehaviors</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">behavior</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">sharedSecretClientCredentials</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">&lt;connectionStatusBehaviorExtention</span> &nbsp;<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">/&gt;&nbsp; </span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">serviceRegistrySettings</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">discoveryMode</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">Public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;"> /&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">transportClientEndpointBehavior</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">tokenProvider</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">sharedAccessSignature</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">keyName</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">XXX</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">key</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">XXX</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">/&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">tokenProvider</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">transportClientEndpointBehavior</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--</span><span style="background: white; color: green; font-family: Consolas; font-size: 9.5pt;">&lt;ServiceRegistrySettings discoveryMode="Public" /&gt;</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">--&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">behavior</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">endpointBehaviors</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">behaviors</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">extensions</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--</span><span style="background: white; color: green; font-family: Consolas; font-size: 9.5pt;"> In this extension section we are introducing all known service bus extensions. User can remove the ones they don't need. </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">--&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">behaviorExtensions</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">&lt;</span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">add</span><span style="background: yellow; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: #a31515; font-family: Consolas; font-size: 9.5pt;">connectionStatusBehaviorExtention</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: red; font-family: Consolas; font-size: 9.5pt;">type</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;">ConnectionStatusElementExtended.ConnectionStatusExtendedBehaviorElement, ConnectionStatusElementExtended</span><span style="background: yellow; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt;"> /&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">add</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">transportClientEndpointBehavior</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">type</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">/&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">add</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">name</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">serviceRegistrySettings</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt;">type</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">Microsoft.ServiceBus.Configuration.ServiceRegistrySettingsElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">/&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">behaviorExtensions</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&nbsp;&lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">extensions</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;&nbsp;&lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt;">system.serviceModel</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt;">&gt;</span></p>
<p class="MsoNormal"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">&nbsp;</span></p>
<p class="MsoNormal">&nbsp;</p>
</div>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/66/76/70/ConnectionStatusElementExtended.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-66-76-70/ConnectionStatusElementExtended.zip">ConnectionStatusElementExtended.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Asp.Net Web Service Application template missing in Visual Studio 2010 Onwards</title>
      <link>https://docs.microsoft.com/archive/blogs/amitbhatia/asp-net-web-service-application-template-missing-in-visual-studio-2010-onwards</link>
      <pubDate>Tue, 27 May 2014 04:26:00 GMT</pubDate>
      <dc:creator><![CDATA[AmitBhatia]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/amitbhatia/2014/05/27/asp-net-web-service-application-template-missing-in-visual-studio-2010-onwards/</guid>
      <description><![CDATA[I had replied to one of the posts on an online forum sites which had a simple question. However,...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p class="MsoNormal">I had replied to one of the posts on an online forum sites which had a simple question. However, looking at the <span class="SpellE">upvote</span> count by different users shows that there&rsquo;re many who had similar question. Thus, I decided to create a blog post on the same,</p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><br />Question: W</strong><strong style="mso-bidi-font-weight: normal;"><span style="color: black; line-height: 107%; font-family: 'Arial','sans-serif'; font-size: 10pt;">hy Asp.Net Web Service Application template is missing in Visual Studio 2010?</span> </strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><br />Solution:</strong> ASP.NET Web Service Application project template is not available for .Net framework 4.0, however, available for .Net Framework 3.5.</p>
<p class="MsoNormal"><br />If it&rsquo;s a new development targeting .Net framework 4.0, you can chose WCF Service over ASMX web service as ASMX web service is legacy. Please note that you'd need to enable <span class="SpellE">AspNetCompatibilityMode</span> to access <span class="SpellE">HttpContext</span> objects.</p>
<p class="MsoNormal"><br />If you still want to use classic ASMX web service, choose ASP.NET Empty Web application and then you can add ASMX <span class="SpellE">webservice</span> files to the project.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Hope this helps to save&nbsp;some time!</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Regards,</p>
<p class="MsoNormal">Amit Bhatia&nbsp;&nbsp;</p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Client application fails with ServiceTooBusyException exception due to exceeding Pending Security session limit in WCF service</title>
      <link>https://docs.microsoft.com/archive/blogs/amitbhatia/client-application-fails-with-servicetoobusyexception-exception-due-to-exceeding-pending-security-session-limit-in-wcf-service</link>
      <pubDate>Fri, 01 Nov 2013 14:02:00 GMT</pubDate>
      <dc:creator><![CDATA[AmitBhatia]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/amitbhatia/2013/11/01/client-application-fails-with-servicetoobusyexception-exception-due-to-exceeding-pending-security-session-limit-in-wcf-service/</guid>
      <description><![CDATA[Recently, I came across a scenario where client application was intermittently failing to connect...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Recently, I came across a scenario where client application was intermittently failing to connect to a&nbsp;WCF Service with <span class="SpellE">ServiceTooBusyException</span>. The binding had secure conversation enabled.</span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Of course, the very first plan we followed was to capture powerful WCF traces which were on the spot. We saw traces full with following warnings which confirmed that there&rsquo;re too many pending security sessions being leaked.</span></p>
<p class="MsoNormal"><span style="mso-no-proof: yes;"> <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/27/70/1273.Pendingsecuresession.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-27-70/1273.Pendingsecuresession.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/27/70/1273.Pendingsecuresession.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-27-70/1273.Pendingsecuresession.png" alt="" border="0" /></a></span></p>
<p class="MsoNormal"><br /> <strong><span style="font-family: arial,helvetica,sans-serif; font-size: small;">What is <span class="GramE">Pending</span> security session?</span></strong></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span class="GramE"><em style="mso-bidi-font-style: normal;">A Security sessions</em></span><em style="mso-bidi-font-style: normal;"> that is established with the server for which service has issued a session token but for which no application messages are sent. For example, client application creates the channel and calls open (<span class="SpellE"><span class="GramE">channel.Open</span></span><span class="GramE">(</span>)). Open call will establish the secure session between client and service. Now, this secure session is added to pending secure session list until client application invokes a WCF operation on this channel.</em></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">By default, Pending security session limit is 128. As the pending security session limit was exceeded, WCF service didn&rsquo;t accept new sessions and client application failed with <span class="SpellE">ServiceTooBusy</span> exception.</span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Next action for us was to find out why there&rsquo;s no operation invoked by client and leaving security session as pending security session!</span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">With extensive code review, we found that client application had code for some functionality as follows,<br /></span><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><br />a) </span><span style="font-family: arial,helvetica,sans-serif; font-size: small;">New client channel was created and open method was called i.e. Channel.Open().<br />b) </span><span style="font-family: arial,helvetica,sans-serif; font-size: small;">However, the operation was executed if there&rsquo;s certain conditions met<br />c) </span><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Then, <span class="SpellE">channel.close</span> was called to close the channel</span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">If we look at above code, it looks pretty fine and shouldn&rsquo;t cause Pending security session to leave open as channel was closed no matter if operation on channel was invoked or not. So, what&rsquo;s causing so many Pending security sessions in our case?</span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Researching further, we found that there&rsquo;s known bug with WCF which doesn&rsquo;t remove security session from pending security session list if client just opens the channel and closes it. This bug is fixed in .Net Framework 4.5. Upgrading the servers to .Net framework 4.5 helped to resolve the issue.</span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">However, unlike our scenario, it&rsquo;s also possible to exceed pending security session limit if the service is loaded with burst load. In that case, it requires increasing default limit (128). To increase the default pending security session limit, it requires <span class="GramE">to convert</span> the standard binding to custom binding and increase pending security session under <span class="SpellE">localServiceSettings</span> element,</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; line-height: normal; mso-layout-grid-align: none;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="background: white; color: blue; mso-highlight: white;">&lt;</span><span class="SpellE"><span class="GramE"><span style="background: white; color: #a31515; mso-highlight: white;">customBinding</span></span></span><span style="background: white; color: blue; mso-highlight: white;">&gt;</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; line-height: normal; mso-layout-grid-align: none;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="background: white; color: blue; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="background: white; color: #a31515; mso-highlight: white;">binding</span><span style="background: white; color: red; mso-highlight: white;">name</span><span style="background: white; color: blue; mso-highlight: white;">=</span><span style="background: white; color: black; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; mso-highlight: white;">customSecureBinding</span></span><span style="background: white; color: black; mso-highlight: white;">"</span><span style="background: white; color: blue; mso-highlight: white;">&gt;</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; line-height: normal; mso-layout-grid-align: none;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="background: white; color: blue; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="background: white; color: #a31515; mso-highlight: white;">security</span><span class="SpellE"><span style="background: white; color: red; mso-highlight: white;">authenticationMode</span></span><span style="background: white; color: blue; mso-highlight: white;">=</span><span style="background: white; color: black; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; mso-highlight: white;">SecureConversation</span></span><span style="background: white; color: black; mso-highlight: white;">"</span><span style="background: white; color: blue; mso-highlight: white;">&gt;</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; line-height: normal; mso-layout-grid-align: none;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="background: white; color: blue; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: yellow; color: blue; mso-highlight: yellow;">&lt;</span><span class="SpellE"><span style="background: yellow; color: #a31515; mso-highlight: yellow;">localServiceSettings </span></span><span class="SpellE"><span style="background: yellow; color: red; mso-highlight: yellow;">maxPendingSessions</span></span><span style="background: yellow; color: blue; mso-highlight: yellow;">=</span><span style="background: yellow; color: black; mso-highlight: yellow;">"</span><span style="background: yellow; color: blue; mso-highlight: yellow;">1024</span><span style="background: yellow; color: black; mso-highlight: yellow;">"</span><span style="background: yellow; color: blue; mso-highlight: yellow;"> /&gt;</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; line-height: normal; mso-layout-grid-align: none;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="background: white; color: blue; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span style="background: white; color: #a31515; mso-highlight: white;">security</span><span style="background: white; color: blue; mso-highlight: white;">&gt;</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; line-height: normal; mso-layout-grid-align: none;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span class="SpellE"><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">textMessageEncoding</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> /&gt;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; line-height: normal; mso-layout-grid-align: none;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span class="SpellE"><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">httpTransport</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> /&gt;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; line-height: normal; mso-layout-grid-align: none;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">binding</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; line-height: normal; mso-layout-grid-align: none;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&lt;/</span><span class="SpellE"><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">customBinding</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Hope this helps to save someone's&nbsp;time.&nbsp;</span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Cheers,<br /></span><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span class="SpellE">Amit</span> Bhatia</span>&nbsp;</p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Upgrading machine to .Net framework 4.5, WCF service built on .Net Framework 4.0 using more than one NetTcpBinding fails with AddressAlreadyInUseException</title>
      <link>https://docs.microsoft.com/archive/blogs/amitbhatia/upgrading-machine-to-net-framework-4-5-wcf-service-built-on-net-framework-4-0-using-more-than-one-nettcpbinding-fails-with-addressalreadyinuseexception</link>
      <pubDate>Tue, 01 Oct 2013 10:40:00 GMT</pubDate>
      <dc:creator><![CDATA[AmitBhatia]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/amitbhatia/2013/10/01/upgrading-machine-to-net-framework-4-5-wcf-service-built-on-net-framework-4-0-using-more-than-one-nettcpbinding-fails-with-addressalreadyinuseexception/</guid>
      <description><![CDATA[Recently, we came across the scenario where customer had a WCF service built on .Net Framework...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Recently, we came across the scenario where customer had a WCF service built on .Net Framework 4.0. This WCF service has couple of endpoints using TCP bindings with configuration as follows, </span></p>
<p class="MsoNormalCxSpMiddle" style="margin-top: 0in; mso-add-space: auto; mso-layout-grid-align: none;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>&lt;</span><span class="GramE"><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">services</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;</span></p>
<p class="MsoNormalCxSpMiddle" style="margin-top: 0in; mso-add-space: auto; mso-layout-grid-align: none;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">service</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">name</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Service.CalcService</span></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;</span></p>
<p class="MsoNormalCxSpMiddle" style="margin: 0in 0in 5pt 0.5in; text-indent: 6pt; mso-add-space: auto; mso-layout-grid-align: none;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&nbsp;&lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">endpoint</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">address</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">CalcService</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">" </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">binding</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">netTcpBinding</span></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">" </span><span class="SpellE"><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">bindingConfiguration</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">nettcp</span></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">contract</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Service.ICalcService</span></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">/&gt;</span></p>
<p class="MsoNormalCxSpMiddle" style="margin-top: 0in; mso-add-space: auto; mso-layout-grid-align: none;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">&lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">endpoint</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">address</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">OrderService</span></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">" </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">binding</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">netTcpBinding</span></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">" </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">contract</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">Service.IOrderService</span></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">/&gt;</span></p>
<p class="MsoNormalCxSpMiddle" style="margin-top: 0in; mso-add-space: auto; mso-layout-grid-align: none;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&lt;</span><span class="GramE"><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">host</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;<br /></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span class="SpellE"><span class="GramE"><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">baseAddresses</span></span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;<br /></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span class="GramE"><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">add</span></span><span class="SpellE"><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">baseAddress</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">net.tcp</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">://localhost:8082/Service</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">/&gt;<br /></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span class="SpellE"><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">baseAddresses</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;<br /></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">host</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span></span></p>
<p class="MsoNormalCxSpMiddle" style="margin-top: 0in; mso-add-space: auto; mso-layout-grid-align: none;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">service</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;<br /></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;</span><span style="mso-spacerun: yes;">&nbsp;</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">services</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;</span></p>
<p class="MsoNormalCxSpMiddle" style="margin-top: 0in; mso-add-space: auto; mso-layout-grid-align: none;"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;</span><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>&lt;</span><span class="GramE"><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">bindings</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;<br /></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span class="SpellE"><span class="GramE"><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">netTcpBinding</span></span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;<br /></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">binding</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">name</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">nettcp</span></span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">maxConnections</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">10</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;<br /></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">security</span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">mode</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">=</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Transport</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">/&gt;<br /></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">binding</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;<br /></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span class="SpellE"><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">netTcpBinding</span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;<br /></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;</span><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>&lt;/</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">bindings</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">&gt;<br /></span></p>
<p class="MsoNormalCxSpMiddle" style="margin-top: 0in; mso-add-space: auto; mso-layout-grid-align: none;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Customer had requirement to upgrade (install) their server machines to .Net Framework 4.5. After installing .Net framework 4.5 on machines, customer noticed that WCF service failed to activate with following exception,</span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><em style="mso-bidi-font-style: normal;"><span style="color: #843c0c; mso-themecolor: accent2; mso-themeshade: 128; mso-style-textfill-fill-color: #843C0C; mso-style-textfill-fill-themecolor: accent2; mso-style-textfill-fill-alpha: 100.0%;">Unhandled Exception: <span class="SpellE">System.ServiceModel.AddressAlreadyInUseException</span>: There is already a listener on IP endpoint 0.0.0.0:8080. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations. ---&gt; <span class="SpellE">System.Net.Sockets.SocketException</span>: Only one usage of each socket address (protocol/network address/port) is normally permitted. </span></em></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><br /><span style="font-family: arial,helvetica,sans-serif; font-size: small;"> <strong style="mso-bidi-font-weight: normal;"><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Cause:</span></strong><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;"> Above exception can occur if there&rsquo;s mismatch in binding configuration for 2 different endpoints using TCP bindings and they cannot share the sample port (see <a href="https://msdn.microsoft.com/en-us/library/aa702636.aspx#BKMK_q99"><span class="GramE">Here</span></a>). However, looking at the binding configuration applied on endpoints above, they look pretty similar! So, we enabled the WCF diagnostics tracing at verbose level and it indeed showed that transport manager is found incompatible on opening 2<sup>nd</sup> endpoint, which means 2 endpoints cannot share same port,</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-no-proof: yes;"> <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/27/70/4263.IncompetibleTransportManager.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-27-70/4263.IncompetibleTransportManager.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/27/70/4263.IncompetibleTransportManager.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-27-70/4263.IncompetibleTransportManager.png" alt="" border="0" /></a></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Looking at binding configuration for above 2 endpoints closely again, we see that one of the endpoint has <span class="SpellE">nettcp</span> binding configuration applied which sets parameter <span class="SpellE">maxConnections</span> = 10.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="background: yellow; font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-highlight: yellow;">One of the changes in .Net framework 4.5 brings in change in <span class="SpellE">MaxConnection</span> knobs, where using the default bindings, some of the defaults are calculated using <span class="SpellE">OSEnvironmentHelper.ProcessorCount</span> instead of hard coded default values as they were in .Net 4.0.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">In this case, when using a named <span class="SpellE">netTcpBinding</span> <span class="SpellE">bindingConfiguration</span> ("</span><span class="SpellE"><span style="background: white; color: blue; mso-highlight: white;">nettcp</span></span><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">"), the value supplied for the <span class="SpellE">MaxConnections</span> property is 10. (Setting the <span class="SpellE">MaxConnections</span> property on the <span class="SpellE">NetTcpBinding</span> also sets it's <span class="SpellE">TcpTransportBindingElement's</span> <span class="SpellE">MaxPendingConnections</span> property and the <span class="SpellE">TcpTransport's</span> <span class="SpellE">ConnectionPoolSettings.MaxOutboundConnectionsPerEndpoint</span> property to the same value.) </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">In case of </span><span class="SpellE"><span style="background: white; color: blue; mso-highlight: white;">OrderService</span></span><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;"> endpoint, it&rsquo;s using <span class="SpellE">NetTcpBinding</span> with default values, so the <span class="SpellE">MaxPendingConnections</span> property was calculated by using the following algorithm: return (12 * <span class="SpellE">OSEnvironmentHelper.ProcessorCount</span>);</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">So, When using a named <span class="SpellE">netTcpBinding</span> <span class="SpellE">bindingConfiguration for CalcService endpoint</span>, the transport's <span class="SpellE">MaxPendingConnections</span> was 10, and for OrderService <span class="SpellE">endpoint, </span>transport's <span class="SpellE">MaxPendingConnections</span> was 12*CPU count. <strong style="mso-bidi-font-weight: normal;">The difference in values for the <span class="SpellE">MaxPendingConnections</span> between these two endpoints causes incompatible transport manager and 2 endpoints cannot share the same port</strong>. Same issue could have also been seen if there&rsquo;s a mismatch in <span class="SpellE">ListenBacklog</span> parameter. Also, in my situation, customer has 2 different endpoints using netTcpBindings. The issue can also happen if there's mex endpoint using maxTcpBinding with default values, which is very common setup.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Application worked in .Net Framework 4, because both bindings resolved to same <span class="SpellE">MaxConnection</span> values i.e. 10. <span class="SpellE"><span class="GramE">nettcp</span></span> binding configuration sets <span class="SpellE">MexConnections</span> = 10 and <span class="SpellE">maxTcpBinding</span> didn&rsquo;t override this value which is by default 10. Thus, there&rsquo;s no conflict and both endpoint could share the same port.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><strong style="mso-bidi-font-weight: normal;"><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Solutions: </span></strong></span><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">There&rsquo;re multiple solutions available to resolve the issue and choose per your requirement:<br /></span></p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-add-space: auto; mso-list: l0 level1 lfo1;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">a)<span style="line-height: normal; font-style: normal; font-variant: normal; font-weight: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">If you want to have a limit on <span class="SpellE">MaxPendingConnections</span> and <span class="SpellE">ListenBacklog</span> on first endpoint, then change the second endpoint to listen on a different base address by specifying the fully qualified URL using different port than used in based address, in endpoint address. For example, to resolve issue in my customer&rsquo;s case, the changes would look as follows for second endpoint,<br /> </span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">&lt;</span><span style="background: white; color: #a31515; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">endpoint</span><span style="background: white; color: red; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">address</span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">=</span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">net.tcp</span></span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">://localhost:8083/Service/<span class="SpellE">OrderService</span></span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span style="background: white; color: red; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">binding</span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">=</span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">netTcpBinding</span></span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span style="background: white; color: red; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">contract</span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">=</span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">Service.IOrderService</span></span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">/&gt;<br /></span></span><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-add-space: auto; mso-list: l0 level1 lfo1;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">b)<span style="line-height: normal; font-style: normal; font-variant: normal; font-weight: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Alternatively, use the same binding configuration for <span class="SpellE">Mex</span> endpoint by changing is binding to <span class="SpellE">NetTcpBinding</span>. Again, this option should be followed when you want to have a limit on <span class="SpellE">MaxPendingConnections</span> and <span class="SpellE">ListenBacklog</span> now for both endpoints,<br /> </span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">&lt;</span><span style="background: white; color: #a31515; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">endpoint</span><span style="background: white; color: red; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">address</span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">=</span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">OrderService</span></span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span style="background: white; color: red; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">binding</span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">=</span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">netTcpBinding</span></span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: red; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">bindingConfiguration</span></span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">=</span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">nettcp</span></span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span style="background: white; color: red; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">contract</span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">=</span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span class="SpellE"><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">Service.IOrderService</span></span><span style="background: white; color: black; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">"</span><span style="background: white; color: blue; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-highlight: white;">/&gt;<br /></span></span><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-add-space: auto; mso-list: l0 level1 lfo1;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">c)<span style="line-height: normal; font-style: normal; font-variant: normal; font-weight: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">If you don&rsquo;t want to have a limit on <span class="SpellE">MaxConnections</span> and <span class="SpellE">ListenBacklog</span>, then simply remove these parameters from binding configuration so that both named <span class="SpellE">NetTcpBinding</span> uses default values for <span class="SpellE">maxConnections</span> and <span class="SpellE">ListenBacklog</span> and there&rsquo;s no mismatch.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">I hope this helps to save someone&rsquo;s time!</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">&nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Cheers,</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: arial,helvetica,sans-serif; font-size: small; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Amit Bhatia</span></p>
</div>]]></content:encoded>
    </item>
  </channel>
</rss>