<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Mahjayar's WebLog. : WCF (Indigo)</title><link>http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx</link><description>Tags: WCF (Indigo)</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>DbSyncProvider WCF Based Synchronization– Memory Performance Analysis Of DataSet Binary SerializationFormat Vs DataSet Surrogates</title><link>http://blogs.msdn.com/mahjayar/archive/2009/03/10/dbsyncprovider-wcf-based-synchronizing-memory-performance-analysis-of-dataset-binary-serializationformat-vs-dataset-surrogates.aspx</link><pubDate>Tue, 10 Mar 2009 11:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9468800</guid><dc:creator>Mahjayar</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/9468800.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=9468800</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=9468800</wfw:comment><description>&lt;P align=justify&gt;I had posted &lt;A href="http://blogs.msdn.com/mahjayar/archive/2008/10/01/dbsyncprovider-improving-memory-performance-in-wcf-based-synchronization.aspx" mce_href="http://blogs.msdn.com/mahjayar/archive/2008/10/01/dbsyncprovider-improving-memory-performance-in-wcf-based-synchronization.aspx"&gt;earlier&lt;/A&gt; about the memory performance when using default DataSet serialization behavior vs. using a Surrogate. Users had some questions on how the DataSet surrogate compared with the DataSet’s Remoting SerializationFormat. With .Net Fx 2.0 DataSet shipped support for serializing DataSet in Binary in addition to the default XML format. I decided to do a quick test comparing the serialization memory usage&amp;nbsp; between the two optimizations. Here is a simple table detailing the memory usage.&lt;/P&gt;
&lt;P align=justify&gt;I used a Toshiba Tecra laptop running Windows 7 Beta build with 2GB RAM. The DataSet contains one DataTable which contains one string column. Each column is a 5Mb string. Size is Peak working set. The BinaryFormatter serializes the DataSet in to a MemoryStream.&lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=2 width=499&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=84&gt;&lt;STRONG&gt;No of Rows&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=203&gt;&lt;STRONG&gt;BinaryFormat Serialization (MB)&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=207&gt;&lt;STRONG&gt;Surrogate Serialization (MB)&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=87&gt;1&lt;/TD&gt;
&lt;TD vAlign=top width=203&gt;34.1&lt;/TD&gt;
&lt;TD vAlign=top width=207&gt;34.5&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=89&gt;5&lt;/TD&gt;
&lt;TD vAlign=top width=203&gt;131.6&lt;/TD&gt;
&lt;TD vAlign=top width=207&gt;131.39&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=90&gt;10&lt;/TD&gt;
&lt;TD vAlign=top width=203&gt;271.1&lt;/TD&gt;
&lt;TD vAlign=top width=207&gt;271.39&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=91&gt;48&lt;/TD&gt;
&lt;TD vAlign=top width=203&gt;1116.1&lt;/TD&gt;
&lt;TD vAlign=top width=207&gt;1118.1&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=92&gt;50&lt;/TD&gt;
&lt;TD vAlign=top width=203&gt;Out of Memory&lt;/TD&gt;
&lt;TD vAlign=top width=207&gt;1024&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=93&gt;51&lt;/TD&gt;
&lt;TD vAlign=top width=203&gt;Out Of Memory&lt;/TD&gt;
&lt;TD vAlign=top width=207&gt;Out Of Memory&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P align=justify&gt;As you can see the memory performance is pretty similar to both the options but the Surrogate approach is able to handle slightly more data than the Binary format. The Binary format peaked at 48 rows while the Surrogate approach peaked at 50 rows. I like the Surrogate approach as it gives the users complete control on the way data is serialized and has option for further user defined optimizations. Further the option to pick DataSet Binary serialization format is not available in the Compact framework which means Surrogates might be the only viable option (as opposed to writing a new serializer) for devices. Next I will compare the wire size of the actual serialized data.&lt;/P&gt;
&lt;P align=justify&gt;Here is the link for original Microsoft KB article on the Surrogate approach. &lt;A href="http://support.microsoft.com/kb/829740" mce_href="http://support.microsoft.com/kb/829740"&gt;http://support.microsoft.com/kb/829740&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9468800" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category><category domain="http://blogs.msdn.com/mahjayar/archive/tags/Sync+Services+for+ADO.NET/default.aspx">Sync Services for ADO.NET</category><category domain="http://blogs.msdn.com/mahjayar/archive/tags/DbSyncProvider/default.aspx">DbSyncProvider</category></item><item><title>DbSyncProvider: Improving Memory Performance In WCF Based Synchronization</title><link>http://blogs.msdn.com/mahjayar/archive/2008/10/01/dbsyncprovider-improving-memory-performance-in-wcf-based-synchronization.aspx</link><pubDate>Thu, 02 Oct 2008 06:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8972726</guid><dc:creator>Mahjayar</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/8972726.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=8972726</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=8972726</wfw:comment><description>&lt;P align=justify&gt;Users have frequently wanted the ability to remotely synchronize relational nodes in a peer to peer fashion using SyncServices for ADO.NET. We have a &lt;A href="http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3588696&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3588696&amp;amp;SiteID=1"&gt;sample demonstrating&lt;/A&gt; remote synchronization by using Windows Communication Foundation (WCF). I wanted to use this post to provide an easy way to optimize the performance of this WCF based solution. DbSyncProvider enumerates all changes in a DataSet and this gets applied on the destination provider. The moment the two providers are moved from a local 2-tier model to a remote n-tier model this DataSet has to be serialized and transmitted over the network. DataSet’s are very efficient when the amount of data involved is very small. The moment your data exceeds few hundred rows the amount of memory required to serialize/deserialize this DataSet is quite huge. Further the serialized size of the DataSet on disk is quite big as well. &lt;/P&gt;
&lt;P align=justify&gt;DataSet object is by default serialized in XML format and serializing/deserialzing this XML data creates a lot of transient objects resulting in a spike in your memory usage. When you have enough data in the DataSet, like synchronizing large number of database rows, your app has the potential to go out of memory deserializing it. Infact users of SyncServices for ADO.NET V2 are quite aware of the OutOfMemoryException when they are synchronizing large number of records in the 2-tier model (&lt;STRONG&gt;PS&lt;/STRONG&gt;: Solving this is the highest priority for us in the next release). Using the WCF solution increases the likelihood of this error happening even for mid sized data that fits fine in memory. &lt;/P&gt;
&lt;P align=justify&gt;There is an easy way to optimize this problem and obliviously it requires users to move away from the XML based default DataSet serialization. Since DataSet doesn’t support any other format, the only way is to use a Surrogate to serialize it. Microsoft Knowledge base has a wonderful article detailing this Surrogate and it can be downloaded from &lt;A title=http://support.microsoft.com/kb/829740 href="http://support.microsoft.com/kb/829740" mce_href="http://support.microsoft.com/kb/829740"&gt;http://support.microsoft.com/kb/829740&lt;/A&gt;. &lt;/P&gt;
&lt;P align=justify&gt;Download it and use it in your WCF based Synchronization&amp;nbsp;apps and you should see vast improvement in your memory usage and performance. &lt;/P&gt;
&lt;P align=justify&gt;I wrote a quick sample checking the process peak memory usage during serialization/deserialization of a DataSet. Here are the comparison numbers between default and surrogate serialization.&lt;/P&gt;
&lt;P align=justify&gt;The DataSet contains one DataTable which contains one string column. Each column is a 5Mb string. Size is Peak working set.&lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=2 width=496 border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=87&gt;&lt;STRONG&gt;No of Rows&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=112&gt;&lt;STRONG&gt;Default Serialization&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=82&gt;&lt;STRONG&gt;Default Deserialization&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=74&gt;&lt;STRONG&gt;Surrogate Serialization&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=139&gt;&lt;STRONG&gt;Surrogate Deserialization&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=87&gt;1&lt;/TD&gt;
&lt;TD class="" vAlign=top width=112&gt;&amp;nbsp;41 Mb&lt;/TD&gt;
&lt;TD class="" vAlign=top width=82&gt;&amp;nbsp;41 Mb&lt;/TD&gt;
&lt;TD class="" vAlign=top width=74&gt;&amp;nbsp;36 Mb&lt;/TD&gt;
&lt;TD class="" vAlign=top width=139&gt;&amp;nbsp;19 Mb&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=87&gt;5&lt;/TD&gt;
&lt;TD class="" vAlign=top width=112&gt;&amp;nbsp;184 Mb&lt;/TD&gt;
&lt;TD class="" vAlign=top width=82&gt;&amp;nbsp;165&amp;nbsp;Mb&lt;/TD&gt;
&lt;TD class="" vAlign=top width=74&gt;&amp;nbsp;61 Mb&lt;/TD&gt;
&lt;TD class="" vAlign=top width=139&gt;&amp;nbsp;60 Mb&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=87&gt;10&lt;/TD&gt;
&lt;TD class="" vAlign=top width=112&gt;&amp;nbsp;298 Mb&lt;/TD&gt;
&lt;TD class="" vAlign=top width=82&gt;&amp;nbsp;320 Mb&lt;/TD&gt;
&lt;TD class="" vAlign=top width=74&gt;&amp;nbsp;112 Mb&lt;/TD&gt;
&lt;TD class="" vAlign=top width=139&gt;&amp;nbsp;111 Mb&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=87&gt;50&lt;/TD&gt;
&lt;TD class="" vAlign=top width=112&gt;&amp;nbsp;&lt;FONT style="BACKGROUND-COLOR: #ccff00"&gt;Out Of Memory&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=82&gt;&lt;FONT style="BACKGROUND-COLOR: #ccff00"&gt;NA&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=74&gt;&lt;FONT style="BACKGROUND-COLOR: #ccff00"&gt;&amp;nbsp;524 Mb&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=139&gt;&lt;FONT style="BACKGROUND-COLOR: #ccff00"&gt;&amp;nbsp;523 Mb&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;Point proven :). As you can see for each 5Mb of data added in memory the default serialization takes anywhere from 6-8 times more memory. For 50 rows (approx 250Mb data size in memory) the serialization step itself&amp;nbsp;fails with OOM. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8972726" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category><category domain="http://blogs.msdn.com/mahjayar/archive/tags/Sync+Framework/default.aspx">Sync Framework</category><category domain="http://blogs.msdn.com/mahjayar/archive/tags/Sync+Services+for+ADO.NET/default.aspx">Sync Services for ADO.NET</category></item><item><title>.Net 3.5 and Visual Studio 2008 released</title><link>http://blogs.msdn.com/mahjayar/archive/2007/11/21/net-3-5-and-visual-studio-2008-released.aspx</link><pubDate>Thu, 22 Nov 2007 04:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6462811</guid><dc:creator>Mahjayar</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/6462811.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=6462811</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=6462811</wfw:comment><description>&lt;P&gt;Just like that the .Net train continues to move along to the next version of the framework. Microsoft announced on Monday the availability of .Net 3.5 and Visual Studio 2008. Its the third version of .Net that I had the privilege of working on starting from 2.0. I didnt have an opportunity to own any one particular feature in .Net 3.5 as I had moved on to the Silverlight project. My personal favorite features are the Visual Studio F5 experience for WCF services, Uri templates and&amp;nbsp;Syndication API's.&lt;/P&gt;
&lt;P&gt;You can read more about this release from Soma's blog. &lt;A href="http://blogs.msdn.com/somasegar/archive/2007/11/19/visual-studio-2008-and-net-framework-3-5-shipped.aspx"&gt;http://blogs.msdn.com/somasegar/archive/2007/11/19/visual-studio-2008-and-net-framework-3-5-shipped.aspx&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the download locations.&lt;/P&gt;
&lt;P&gt;
&lt;TABLE class=MsoNormalTable style="MARGIN-LEFT: -1.15pt; WIDTH: 433.5pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=578 border=0 class="MsoNormalTable"&gt;
&lt;TBODY&gt;
&lt;TR style="HEIGHT: 39.95pt"&gt;
&lt;TD class="" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 142.25pt; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 39.95pt" noWrap width=190&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial Narrow','sans-serif'"&gt;.NET Framework v3.5&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; WIDTH: 291.25pt; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 39.95pt" width=388&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: center" align=center&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&amp;amp;displaylang=en&lt;/A&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 39.95pt"&gt;
&lt;TD class="" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 142.25pt; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 39.95pt" noWrap width=190&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial Narrow','sans-serif'"&gt;.NET Framework v2.0 (x86) SP1&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; WIDTH: 291.25pt; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 39.95pt" width=388&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: center" align=center&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&amp;amp;displaylang=en&lt;/A&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 39.95pt"&gt;
&lt;TD class="" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 142.25pt; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 39.95pt" noWrap width=190&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial Narrow','sans-serif'"&gt;.NET Framework v2.0 (x64) SP1&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; WIDTH: 291.25pt; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 39.95pt" width=388&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: center" align=center&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=029196ED-04EB-471E-8A99-3C61D19A4C5A&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=029196ED-04EB-471E-8A99-3C61D19A4C5A&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=029196ED-04EB-471E-8A99-3C61D19A4C5A&amp;amp;displaylang=en&lt;/A&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 39.95pt"&gt;
&lt;TD class="" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 142.25pt; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 39.95pt" noWrap width=190&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial Narrow','sans-serif'"&gt;.NET Framework v2.0 (IA64) SP1&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; WIDTH: 291.25pt; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 39.95pt" width=388&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: center" align=center&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=32E77AE0-96EF-4ECD-A157-9BF61A7C8DAA&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=32E77AE0-96EF-4ECD-A157-9BF61A7C8DAA&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=32E77AE0-96EF-4ECD-A157-9BF61A7C8DAA&amp;amp;displaylang=en&lt;/A&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 39.95pt"&gt;
&lt;TD class="" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 142.25pt; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 39.95pt" noWrap width=190&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial Narrow','sans-serif'"&gt;.NET Framework v3.0 SP1&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; WIDTH: 291.25pt; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 39.95pt" width=388&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: center" align=center&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=EC2CA85D-B255-4425-9E65-1E88A0BDB72A&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=EC2CA85D-B255-4425-9E65-1E88A0BDB72A&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=EC2CA85D-B255-4425-9E65-1E88A0BDB72A&amp;amp;displaylang=en&lt;/A&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;P class=MsoNormal&gt;Next stop: Silverlight!&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6462811" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item><item><title>Microsoft releasing .NET framework source code</title><link>http://blogs.msdn.com/mahjayar/archive/2007/10/03/microsoft-releasing-net-framework-source-code.aspx</link><pubDate>Thu, 04 Oct 2007 01:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5268234</guid><dc:creator>Mahjayar</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/5268234.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=5268234</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=5268234</wfw:comment><description>&lt;P&gt;Microsoft is releasing the source code for the framework libraries. Read more about it &lt;A class="" href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx" mce_href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx"&gt;here&lt;/A&gt;. Its not like you couldnt do this earlier. You could always have used .Net Reflector but having the ability to step in to the framework classes while debugging is neat. Looks like plans are on for releasing the source code for WCF as well! &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5268234" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category><category domain="http://blogs.msdn.com/mahjayar/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>WCF Extensibility - Plugging in custom message processing logic</title><link>http://blogs.msdn.com/mahjayar/archive/2007/03/14/wcf-extensibility-plugging-in-custom-message-processing-logic.aspx</link><pubDate>Thu, 15 Mar 2007 07:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1884927</guid><dc:creator>Mahjayar</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/1884927.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=1884927</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=1884927</wfw:comment><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;I have talked a lot about WCF's extensibility model and I never knew how much of the core functionality can be extended until a recent deep dive session with one of our customers developing on WCF. The client had a multi tier application with the middle tier using SOAP based messaging to communicate with the back end. They wanted to investigate using WCF for the middle tier and hence the deep dive session. They did the hard job of creating ServiceContract's for all the functionality the WCF middle tier service will expose. The customer had invested heavily in current pipeline that handled processing and dispatch of the incoming SOAP messages to the backend and wanted to reuse that. The ServiceContract they developed had lots of Operations and this posed additional overhead on the logic port. Their ideal solution would be to somehow transform the SOAP message coming in from WCF to a format matching the format as expected by the backend. &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Basically they wanted to avoid implementing the huge ServiceContract and just plug in a small wrapper that will perform the transform. The first solution that comes to mind is to implement a "facade Contract" that had&amp;nbsp;one generic operation that accepted and returned a SOAP message and that did the message transformation. This was an acceptable solution but this meant that clients generating proxy to this facade contract will not have all the Operations of the original contract. The customer also wanted to retain functionality provided by individual operations like addressing and additional custom header information for a required context that could be used by the backend that was lost when using one generic operation. They wanted to avoid serializing and deserializing incoming and outgoing arguments as they could be large and hence avoid the performance hit from such conversions. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Some extensibility points that come to mind for this scenario are IInstanceProvider and IOperationInvoker. IInstanceProvider was ruled out coz the need was to extend the actual Operation invoked on the instance not extend the way instances were created. Ideally we ended up with an extensibility model that used IOperationInvoker and IDispatchMessageFormatter and here is how it works. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;All Operations of the ServiceContract will have one input Message parameter and return a Message. Passing Message's as parameter/return value means that WCF runtime will not serialize/deserialize the Message and hence the user app needs to work with the Message.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Have a dummy implementation of the&amp;nbsp;ServiceContract&amp;nbsp;that has no&amp;nbsp;implementations for&amp;nbsp;all the operations.&amp;nbsp;Host this dummy instance as a singleton instance for the ServiceHost. In this solution, the dummy instance would never be invoked.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Implement an IOperationInvoker to plug in to the operation invoke logic.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Implement an IDispatchMessageFormatter to plug in to the serialization/deserialization logic of the incoming arguments and passing them to the IOperationInvoker.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Let’s see how this extensibility processes an incoming request.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL type=1&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Runtime invokes custom IOperationInvoker to allocate memory for the input parameters. Since we have one argument, allocate memory for one single object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Runtime then invokes custom&amp;nbsp;IDispatchMessageFormatter.DeserializeRequest and passes the input Message with the memory created in step 1. It’s in this step that the user will do the transformation from WCF to backend format. It then puts this transformed message to the memory created in step 1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Runtime passes the dummy instance, populated memory from step 2 to custom&amp;nbsp;IOperationInvoker.Invoke. (or BeginInvoke for async)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;The custom IOperationInvoker will then pass the transformed message to the backend and get the return SOAP message from the backend.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Custom IOperationInvoker creates an empty output array for out parameters (we have no out params in this case) and returns the message returned by backend.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Runtime invokes custom IDispatchMessageFormatter.SerializeReply to serialize the outputs/reply passed in step 5. It’s in this stage that the extension will retransform the backend SOAP format to WCF reply Message.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Runtime returns the reply Message back to the client.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;As you can see, we never use the dummy instance implementation and reduced the need for the extra serialize/deserialize step in the contract implementation to invoke the back end. Result - Another happy customer :)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Since this extension has no effect on the way messages are received/sent by WCF's runtime, all the message and transport level security options continue to work. When this extension is coupled with IInstanceContextProvider, IInstanceProvider, Custom Channels we can practically replace the all major operations of WCF runtime.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;A sample program showing off the above extensibility is attached.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;Maheshwar Jayaraman&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1884927" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/mahjayar/attachment/1884927.ashx" length="4690" type="text/plain" /><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item><item><title>WCF Runtime Components</title><link>http://blogs.msdn.com/mahjayar/archive/2006/12/22/wcf-runtime-blocks.aspx</link><pubDate>Sat, 23 Dec 2006 01:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1349721</guid><dc:creator>Mahjayar</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/1349721.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=1349721</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=1349721</wfw:comment><description>&lt;P&gt;After I posted my earlier &lt;A class="" href="http://blogs.msdn.com/mahjayar/archive/2006/12/12/debugging-wcf-applications.aspx" mce_href="http://blogs.msdn.com/mahjayar/archive/2006/12/12/debugging-wcf-applications.aspx"&gt;entry&lt;/A&gt; on debugging WCF apps, I thought it would be a good idea to explain the different WCF runtime blocks . This way users can see how each block/class fits in the bigger picture and how the runtime processes new channels/messages. When &lt;STRONG&gt;Open&lt;/STRONG&gt;() is called on a ServiceHost, the runtime is built from the &lt;STRONG&gt;&lt;EM&gt;ServiceDescription&lt;/EM&gt;&lt;/STRONG&gt; and the list of &lt;STRONG&gt;&lt;EM&gt;ServiceEndpoints&lt;/EM&gt;&lt;/STRONG&gt; specified. Once the &lt;STRONG&gt;Open&lt;/STRONG&gt;() step completes, the runtime is&amp;nbsp;immutable and&amp;nbsp;any attempt to modify any components results in an exception.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's see how the runtime looks once all listeners have been started.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.msdn.com/photos/mahjayar/images/1349757/500x268.aspx" mce_src="http://blogs.msdn.com/photos/mahjayar/images/1349757/500x268.aspx"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Based on your base addresses and &lt;STRONG&gt;&lt;EM&gt;EndpointAddress&lt;/EM&gt;&lt;/STRONG&gt;, the service host contains a list of listen URI's and each URI will have its own listener. There is a &lt;STRONG&gt;&lt;EM&gt;ChannelDispatcher&lt;/EM&gt;&lt;/STRONG&gt; associated with each ListenUri and each &lt;STRONG&gt;&lt;EM&gt;ChannelDispatcher&lt;/EM&gt;&lt;/STRONG&gt; can contain 1 or more &lt;STRONG&gt;&lt;EM&gt;EndpointDispatcher&lt;/EM&gt;&lt;/STRONG&gt; object. Most often a ChannelDispatcher will contain exactly one EndpointDispatcher but for the case where the user has hosted multiple endpoints all using one listen URI(refer &lt;A class="" href="http://blogs.msdn.com/mahjayar/archive/2006/03/02/542339.aspx" mce_href="http://blogs.msdn.com/mahjayar/archive/2006/03/02/542339.aspx"&gt;this post&lt;/A&gt;). In that case, there will be exactly one ChannelDispatcher for that Uri but it will contain all the EndpointDispatchers for all the ServiceEndpoints. Basically, each &lt;STRONG&gt;&lt;EM&gt;ServiceEndpoint&lt;/EM&gt;&lt;/STRONG&gt; added to the host will have one EndpointDispatcher associated with it. Each EndpointDispatcher contains the &lt;STRONG&gt;&lt;EM&gt;DispatchRuntime&lt;/EM&gt;&lt;/STRONG&gt; class that contains extension points &lt;STRONG&gt;&lt;EM&gt;InstanceContextProvider&lt;/EM&gt;&lt;/STRONG&gt;, &lt;STRONG&gt;&lt;EM&gt;InstanceContextInitializers&lt;/EM&gt;&lt;/STRONG&gt; etc.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Each ChannelDispatcher contains one &lt;STRONG&gt;&lt;EM&gt;ListenerHandler&lt;/EM&gt;&lt;/STRONG&gt; which, as its name suggests, handles the underlying &lt;STRONG&gt;&lt;EM&gt;IListener&lt;/EM&gt;&lt;/STRONG&gt;. This class is the one which determines when to accept a new channel. When the ListenerHandler accepts a new Channel, it will wrap it with a &lt;STRONG&gt;&lt;EM&gt;ChannelHandler&lt;/EM&gt;&lt;/STRONG&gt; object. ChannelHandler handles messages off one particular channel in the same way ListenerHandler handles connection requests from one listener.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;Let's see a sample breakdown of how a channel is accepted and messages are read till the channel closes. Note that I have tried to simplify this as explaining the actual process would be very verbose.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;ServiceHost is opened and all Listeners are ready to accept.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;ListenerHandler object opens and issues a pending Accept() call&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;When a client connects to the listener a callback is fired on the ListenerHandler notifying availability of a channel.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;The ListenerHandler creates a ChannelHandler object and associated the channel with that handler.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;The ChannelHandler object is registered. Once registered, the ChannelHandler will try to read messages from that channel.In other words, it issues a pending Receive on that channel.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;When the client sends a message, ChannelHandler is notified of that message via a callback. &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;The handler then determines the EndpointDispatcher that the message is addressed to. &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Then using the DispatchRuntime of that EndpointDispatcher it determines the Operation that the runtime should invoke and schedules the invocation.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;It keeps reading Messages from the channel till null is received (Denoting a client initiated Close())&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;So we refer to the ListenerHandler's way of reading channels as &lt;EM&gt;ChannelPump&lt;/EM&gt; and similarly the ChannelHandler's behavior is referred as &lt;EM&gt;MessagePump&lt;/EM&gt;. It's the responsibility of the individual handlers to ensure that their respective pumps are never &lt;STRONG&gt;stalled&lt;/STRONG&gt;. A stalled pump will mean either &lt;STRONG&gt;no new connections&lt;/STRONG&gt; are accepted or &lt;STRONG&gt;no new message&lt;/STRONG&gt; will be read off a channel. The ListenerHandler uses the &lt;STRONG&gt;&lt;EM&gt;ServiceThrottleBehavior.MaxConcurrenctConnections&lt;/EM&gt;&lt;/STRONG&gt; throttle to determine when to pause and restart the ChannelPump and the ChannelHandler will use the &lt;STRONG&gt;&lt;EM&gt;ServiceThrottleBehavior.MaxConcurrenctCalls&lt;/EM&gt;&lt;/STRONG&gt; throttle to determine when to pause and restart the MessagePump.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Maheshwar Jayaraman&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1349721" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item><item><title>Debugging WCF Applications - What all I look for.</title><link>http://blogs.msdn.com/mahjayar/archive/2006/12/12/debugging-wcf-applications.aspx</link><pubDate>Wed, 13 Dec 2006 07:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1271189</guid><dc:creator>Mahjayar</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/1271189.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=1271189</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=1271189</wfw:comment><description>&lt;P&gt;When I am debugging any WCF runtime bug, I classify it in two categories. One that needs IDE (simple logic bugs) and others that need WinDbg. Every one is familiar with the IDE debugging and will leave that topic for another day. Today I wanted to talk a little bit about how I debug WCF bugs that require Windbg. Usually bugs that involve dumps are varied but if I had to pick the common ones then it would the following ones.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Server appears "hung" and is not processing messages.&lt;/LI&gt;
&lt;LI&gt;Client requests are timing out even when server is not loaded.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Note: Concrete classes are in &lt;STRONG&gt;bold &lt;/STRONG&gt;and field names of classes are in &lt;EM&gt;italics&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;Since I dont have too much information on what the contract is, and what modes (&lt;STRONG&gt;ConcurrencyMode&lt;/STRONG&gt;/&lt;STRONG&gt;InstanceContextMode&lt;/STRONG&gt;) the &lt;STRONG&gt;ServiceHost&lt;/STRONG&gt; is configured, thats the first thing I find out. I usually look for &lt;STRONG&gt;ServiceHost&lt;/STRONG&gt; objects and then dump the object.&lt;/P&gt;
&lt;P&gt;0:006&amp;gt; !do 01273750 &lt;BR&gt;Name: System.ServiceModel.ServiceHost&lt;BR&gt;MethodTable: 50e4279c&lt;BR&gt;EEClass: 50e4271c&lt;BR&gt;Size: 136(0x88) bytes&lt;BR&gt;&amp;nbsp;(C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll)&lt;BR&gt;Fields:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Field&amp;nbsp;&amp;nbsp; Offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type VT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attr&amp;nbsp;&amp;nbsp;&amp;nbsp; Value Name&lt;BR&gt;79104f64&amp;nbsp; 4000915&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 aborted&lt;BR&gt;79104f64&amp;nbsp; 4000916&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 closeCalled&lt;BR&gt;50e51310&amp;nbsp; 4000917&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4 ...ct+ExceptionQueue&amp;nbsp; 0 instance 00000000 exceptionQueue&lt;BR&gt;790f9c18&amp;nbsp; 4000918&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 0127391c mutex&lt;BR&gt;79104f64&amp;nbsp; 4000919&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 onClosingCalled&lt;BR&gt;79104f64&amp;nbsp; 400091a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 onClosedCalled&lt;BR&gt;79104f64&amp;nbsp; 400091b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 onOpeningCalled&lt;BR&gt;79104f64&amp;nbsp; 400091c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 onOpenedCalled&lt;BR&gt;79104f64&amp;nbsp; 400091d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 raisedClosed&lt;BR&gt;79104f64&amp;nbsp; 400091e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 raisedClosing&lt;BR&gt;79104f64&amp;nbsp; 400091f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 raisedFaulted&lt;BR&gt;79104f64&amp;nbsp; 4000920&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 traceOpenAndClose&lt;BR&gt;790f9c18&amp;nbsp; 4000921&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 01273750 eventSender&lt;BR&gt;50e385f0&amp;nbsp; 4000922&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 state&lt;BR&gt;7910d61c&amp;nbsp; 4000923&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Closed&lt;BR&gt;7910d61c&amp;nbsp; 4000924&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Closing&lt;BR&gt;7910d61c&amp;nbsp; 4000925&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 0128fae0 Faulted&lt;BR&gt;7910d61c&amp;nbsp; 4000926&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1c&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Opened&lt;BR&gt;7910d61c&amp;nbsp; 4000927&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Opening&lt;BR&gt;79104f64&amp;nbsp; 4002bde&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 initializeDescriptionHasFinished&lt;BR&gt;50dfecb0&amp;nbsp; 4002bdf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 34 ...meKeyedCollection&amp;nbsp; 0 instance 01273928 baseAddresses&lt;BR&gt;50e2068c&amp;nbsp; 4002be0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 38 ...patcherCollection&amp;nbsp; 0 instance 012739b8 channelDispatchers&lt;BR&gt;7910ca9c&amp;nbsp; 4002be1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.TimeSpan&amp;nbsp; 1 instance 012737b4 closeTimeout&lt;BR&gt;50df0118&amp;nbsp; 4002be2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3c ...erviceDescription&amp;nbsp; 0 instance 0128fc14 description&lt;BR&gt;00000000&amp;nbsp; 4002be3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 012739f4 extensions&lt;BR&gt;00000000&amp;nbsp; 4002be4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 00000000 externalBaseAddresses&lt;BR&gt;00000000&amp;nbsp; 4002be5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 48&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 01293234 implementedContracts&lt;BR&gt;50dfe788&amp;nbsp; 4002be6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4c ...nceContextManager&amp;nbsp; 0 instance 01273a30 instances&lt;BR&gt;7910ca9c&amp;nbsp; 4002be7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.TimeSpan&amp;nbsp; 1 instance 012737bc openTimeout&lt;BR&gt;50de4e78&amp;nbsp; 4002be8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50 ...rformanceCounters&amp;nbsp; 0 instance 00000000 servicePerformanceCounters&lt;BR&gt;50dfe9f4&amp;nbsp; 4002be9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 54 ...r.ServiceThrottle&amp;nbsp; 0 instance 01273a58 serviceThrottle&lt;BR&gt;50e1ed28&amp;nbsp; 4002bea&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 58 ...erviceCredentials&amp;nbsp; 0 instance 00000000 readOnlyCredentials&lt;BR&gt;50e0b9c0&amp;nbsp; 4002beb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5c ...orizationBehavior&amp;nbsp; 0 instance 012acc84 readOnlyAuthorization&lt;BR&gt;00000000&amp;nbsp; 4002bec&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 60&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 00000000 UnknownMessageReceived&lt;BR&gt;7a746d44&amp;nbsp; 4002bdd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 74c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Uri&amp;nbsp; 0&amp;nbsp;&amp;nbsp; static 01273880 EmptyUri&lt;BR&gt;&lt;STRONG&gt;790f9c18&amp;nbsp; 4003075&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 74&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 01271bf4 singletonInstance&lt;/STRONG&gt;&lt;BR&gt;79101058&amp;nbsp; 4003076&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 78&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Type&amp;nbsp; 0 instance 0128fb00 serviceType&lt;BR&gt;50e4f74c&amp;nbsp; 4003077&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7c ...ontractCollection&amp;nbsp; 0 instance 01290d20 reflectedContracts&lt;BR&gt;7910c914&amp;nbsp; 4003078&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 80&amp;nbsp;&amp;nbsp; System.IDisposable&amp;nbsp; 0 instance 00000000 disposableInstance&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;In this case you can see that the &lt;EM&gt;singletonInstance&lt;/EM&gt; object is not null which means the &lt;STRONG&gt;InstanceContextMode&lt;/STRONG&gt; is &lt;STRONG&gt;Single&lt;/STRONG&gt;. You can also infer that if the &lt;EM&gt;disposableInstance&lt;/EM&gt; object is not null. Other way of finding what the &lt;STRONG&gt;InstanceContextMode&lt;/STRONG&gt; was to check for &lt;STRONG&gt;InstanceContextProviders&lt;/STRONG&gt; and the name of &lt;STRONG&gt;InstanceContextProviders&lt;/STRONG&gt; will provide you information on what kind of mode was used (0 = &lt;STRONG&gt;PerSession&lt;/STRONG&gt;, 1=&lt;STRONG&gt;PerCall&lt;/STRONG&gt; and 2=&lt;STRONG&gt;Single&lt;/STRONG&gt;). The &lt;EM&gt;serviceType&lt;/EM&gt; field will tell you the type of contract the host is hosting and with that information you can dig for the actual contract implementation class.&lt;/P&gt;
&lt;P&gt;0:006&amp;gt; !dumpheap -type InstanceContextProvider&lt;BR&gt;&amp;nbsp;Address&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Size&lt;BR&gt;0129f780 50dff25c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;total 1 objects&lt;BR&gt;Statistics:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Count&amp;nbsp;&amp;nbsp;&amp;nbsp; TotalSize Class Name&lt;BR&gt;50dff25c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20 System.ServiceModel.Dispatcher.SingletonInstanceContextProvider&lt;/P&gt;
&lt;P&gt;When you dump details of any &lt;STRONG&gt;IInstanceContextProvider&lt;/STRONG&gt;, you can see that it contains the &lt;STRONG&gt;DispatchRuntime&lt;/STRONG&gt; object associated with that provider. Dumping the DispatchRuntime gives you lot of information. For instance the DispatchRuntime object has a field called &lt;EM&gt;concurrencyMode&lt;/EM&gt; that tells me what the &lt;STRONG&gt;ConcurrencyMode&lt;/STRONG&gt; of the contract was (0-&lt;STRONG&gt;Single&lt;/STRONG&gt;, 1-&lt;STRONG&gt;Multiple&lt;/STRONG&gt; and 2-&lt;STRONG&gt;Reentrant&lt;/STRONG&gt;).&lt;/P&gt;
&lt;P&gt;0:006&amp;gt; !do 0129f780 &lt;BR&gt;Name: System.ServiceModel.Dispatcher.SingletonInstanceContextProvider&lt;BR&gt;MethodTable: 50dff25c&lt;BR&gt;EEClass: 50dff1e4&lt;BR&gt;Size: 20(0x14) bytes&lt;BR&gt;&amp;nbsp;(C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll)&lt;BR&gt;Fields:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Field&amp;nbsp;&amp;nbsp; Offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type VT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attr&amp;nbsp;&amp;nbsp;&amp;nbsp; Value Name&lt;BR&gt;&lt;STRONG&gt;50e30180&amp;nbsp; 400328b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4 ...r.DispatchRuntime&amp;nbsp; 0 instance 0129ed50 dispatchRuntime&lt;BR&gt;&lt;/STRONG&gt;50e183ac&amp;nbsp; 4003469&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8 ...l.InstanceContext&amp;nbsp; 0 instance 0129f7a0 singleton&lt;BR&gt;790f9c18&amp;nbsp; 400346a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 0129f794 thisLock&lt;BR&gt;0:006&amp;gt; !do 0129ed50 &lt;BR&gt;Name: System.ServiceModel.Dispatcher.DispatchRuntime&lt;BR&gt;MethodTable: 50e30180&lt;BR&gt;EEClass: 50e30110&lt;BR&gt;Size: 112(0x70) bytes&lt;BR&gt;&amp;nbsp;(C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll)&lt;BR&gt;Fields:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Field&amp;nbsp;&amp;nbsp; Offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type VT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attr&amp;nbsp;&amp;nbsp;&amp;nbsp; Value Name&lt;BR&gt;50e2bf6c&amp;nbsp; 4002fd1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4 ...horizationManager&amp;nbsp; 0 instance 00000000 serviceAuthorizationManager&lt;BR&gt;00000000&amp;nbsp; 4002fd2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 00000000 externalAuthorizationPolicies&lt;BR&gt;50ddbab8&amp;nbsp; 4002fd3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 securityAuditLogLocation&lt;BR&gt;&lt;STRONG&gt;50e3ca64&amp;nbsp; 4002fd4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 54&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 concurrencyMode&lt;BR&gt;&lt;/STRONG&gt;79104f64&amp;nbsp; 4002fd5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 suppressAuditFailure&lt;BR&gt;50e0a434&amp;nbsp; 4002fd6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 58&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 serviceAuthorizationAuditLevel&lt;BR&gt;50e0a434&amp;nbsp; 4002fd7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 messageAuthenticationAuditLevel&lt;BR&gt;79104f64&amp;nbsp; 4002fd8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 65&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 automaticInputSessionShutdown&lt;BR&gt;50e1eae0&amp;nbsp; 4002fd9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c ...ChannelDispatcher&amp;nbsp; 0 instance 00000000 channelDispatcher&lt;BR&gt;00000000&amp;nbsp; 4002fda&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 0129ee1c inputSessionShutdownHandlers&lt;BR&gt;50e38924&amp;nbsp; 4002fdb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14 ...ndpointDispatcher&amp;nbsp; 0 instance 0129ebd4 endpointDispatcher&lt;BR&gt;50dfd8e8&amp;nbsp; 4002fdc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18 ...IInstanceProvider&amp;nbsp; 0 instance 00000000 instanceProvider&lt;BR&gt;50e5c730&amp;nbsp; 4002fdd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1c ...ceContextProvider&amp;nbsp; 0 instance 0129f780 instanceContextProvider&lt;BR&gt;50e183ac&amp;nbsp; 4002fde&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20 ...l.InstanceContext&amp;nbsp; 0 instance 0129f7a0 singleton&lt;BR&gt;79104f64&amp;nbsp; 4002fdf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 ignoreTransactionMessageProperty&lt;BR&gt;00000000&amp;nbsp; 4002fe0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 0129ee58 messageInspectors&lt;BR&gt;50e4b3ec&amp;nbsp; 4002fe1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28 ...erationCollection&amp;nbsp; 0 instance 0129edd0 operations&lt;BR&gt;50e628c8&amp;nbsp; 4002fe2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2c ...OperationSelector&amp;nbsp; 0 instance 00000000 operationSelector&lt;BR&gt;50dc9cbc&amp;nbsp; 4002fe3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30 ...her.ClientRuntime&amp;nbsp; 0 instance 012f0fc0 proxyRuntime&lt;BR&gt;50dd8040&amp;nbsp; 4002fe4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 34 ...leDispatchRuntime&amp;nbsp; 0 instance 012a881c runtime&lt;BR&gt;00000000&amp;nbsp; 4002fe5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 38&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 0129ee94 instanceContextInitializers&lt;BR&gt;79104f64&amp;nbsp; 4002fe6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 67&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 isExternalPoliciesSet&lt;BR&gt;79104f64&amp;nbsp; 4002fe7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 68&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 isAuthorizationManagerSet&lt;BR&gt;7910db30&amp;nbsp; 4002fe8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3c ...ronizationContext&amp;nbsp; 0 instance 00000000 synchronizationContext&lt;BR&gt;50e421e0&amp;nbsp; 4002fe9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 60&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 principalPermissionMode&lt;BR&gt;790f7ab4&amp;nbsp; 4002fea&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Void&amp;nbsp; 0 instance 00000000 roleProvider&lt;BR&gt;79101058&amp;nbsp; 4002feb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Type&amp;nbsp; 0 instance 0128fb00 type&lt;BR&gt;50e07e68&amp;nbsp; 4002fec&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 48 ...DispatchOperation&amp;nbsp; 0 instance 0129eed0 unhandled&lt;BR&gt;79104f64&amp;nbsp; 4002fed&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 69&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 transactionAutoCompleteOnSessionClose&lt;BR&gt;79104f64&amp;nbsp; 4002fee&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 impersonateCallerForAllOperations&lt;BR&gt;79104f64&amp;nbsp; 4002fef&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 releaseServiceInstanceOnTransactionComplete&lt;BR&gt;50dc9e08&amp;nbsp; 4002ff0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4c ...haredRuntimeState&amp;nbsp; 0 instance 0129edc0 shared&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Then I generally check the throttle limit sets on the serviceHost by dumping the &lt;EM&gt;serviceThrottle&lt;/EM&gt; object. This also tells me how many throttles (Call/InstanceContext/Session) has been handed out.&lt;/P&gt;
&lt;P&gt;0:006&amp;gt; !do 01273a58 &lt;BR&gt;Name: System.ServiceModel.Dispatcher.ServiceThrottle&lt;BR&gt;MethodTable: 50dfe9f4&lt;BR&gt;EEClass: 50dfe984&lt;BR&gt;Size: 36(0x24) bytes&lt;BR&gt;&amp;nbsp;(C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll)&lt;BR&gt;Fields:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Field&amp;nbsp;&amp;nbsp; Offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type VT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attr&amp;nbsp;&amp;nbsp;&amp;nbsp; Value Name&lt;BR&gt;&lt;STRONG&gt;50e37290&amp;nbsp; 400349b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4 ...cher.FlowThrottle&amp;nbsp; 0 instance 01273b54 calls ==&amp;gt;We will dump this as a sample&lt;BR&gt;&lt;/STRONG&gt;50e37290&amp;nbsp; 400349c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8 ...cher.FlowThrottle&amp;nbsp; 0 instance 01273c10 sessions&lt;BR&gt;50e03a04&amp;nbsp; 400349d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c ...her.QuotaThrottle&amp;nbsp; 0 instance 00000000 dynamic&lt;BR&gt;50e37290&amp;nbsp; 400349e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10 ...cher.FlowThrottle&amp;nbsp; 0 instance 00000000 instanceContexts&lt;BR&gt;50e5e99c&amp;nbsp; 400349f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14 ...l.ServiceHostBase&amp;nbsp; 0 instance 01273750 host&lt;BR&gt;79104f64&amp;nbsp; 40034a0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 isActive&lt;BR&gt;790f9c18&amp;nbsp; 40034a1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 01273af0 thisLock&lt;BR&gt;0:006&amp;gt; !do 01273b54 &lt;BR&gt;Name: System.ServiceModel.Dispatcher.FlowThrottle&lt;BR&gt;MethodTable: 50e37290&lt;BR&gt;EEClass: 50e37220&lt;BR&gt;Size: 36(0x24) bytes&lt;BR&gt;&amp;nbsp;(C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll)&lt;BR&gt;Fields:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Field&amp;nbsp;&amp;nbsp; Offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type VT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attr&amp;nbsp;&amp;nbsp;&amp;nbsp; Value Name&lt;BR&gt;&lt;STRONG&gt;790fed1c&amp;nbsp; 400327b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16 capacity&lt;BR&gt;790fed1c&amp;nbsp; 400327c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 count&lt;/STRONG&gt;&lt;BR&gt;790f9c18&amp;nbsp; 400327d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 01273b78 mutex&lt;BR&gt;79113c8c&amp;nbsp; 400327e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8 ...ding.WaitCallback&amp;nbsp; 0 instance 01273b34 release&lt;BR&gt;00000000&amp;nbsp; 400327f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 01273b84 waiters&lt;BR&gt;790fa3e0&amp;nbsp; 4003280&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.String&amp;nbsp; 0 instance 01273ab8 propertyName&lt;BR&gt;790fa3e0&amp;nbsp; 4003281&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.String&amp;nbsp; 0 instance 01273afc configName&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;For example you can see that in this case the Call throttle is set to 16 (default) and the count is 0 which means no throttles have been acquired. In cases when the&amp;nbsp;count value is equal to capacity then you can check the &lt;EM&gt;waiters&lt;/EM&gt; object to see which client is waiting for a call throttle. This applies to any &lt;STRONG&gt;FlowThrottle&lt;/STRONG&gt; class.&lt;/P&gt;
&lt;P&gt;If I wanted to see how many &lt;STRONG&gt;InstanceContext's&lt;/STRONG&gt; have been issued by the runtime, then I check the &lt;EM&gt;instances&lt;/EM&gt; property on &lt;STRONG&gt;ServiceHost&lt;/STRONG&gt; which points the collection manager. You can dump the items array to see each individual &lt;STRONG&gt;InstanceContext&lt;/STRONG&gt;.&lt;/P&gt;0:006&amp;gt; !do 01273a30 &lt;BR&gt;Name: System.ServiceModel.Dispatcher.InstanceContextManager&lt;BR&gt;MethodTable: 50e5e584&lt;BR&gt;EEClass: 50e5e50c&lt;BR&gt;Size: 40(0x28) bytes&lt;BR&gt;&amp;nbsp;(C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll)&lt;BR&gt;Fields:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Field&amp;nbsp;&amp;nbsp; Offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type VT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attr&amp;nbsp;&amp;nbsp;&amp;nbsp; Value Name&lt;BR&gt;79104f64&amp;nbsp; 40009df&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 aborted&lt;BR&gt;790fed1c&amp;nbsp; 40009e0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 busyCount&lt;BR&gt;50e08e90&amp;nbsp; 40009e1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4 ...mmunicationWaiter&amp;nbsp; 0 instance 00000000 busyWaiter&lt;BR&gt;790fed1c&amp;nbsp; 40009e2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 busyWaiterCount&lt;BR&gt;790f9c18&amp;nbsp; 40009e3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 0127391c mutex&lt;BR&gt;50e26624&amp;nbsp; 40009e4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 state&lt;BR&gt;790fed1c&amp;nbsp; 4003488&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 firstFreeIndex&lt;BR&gt;&lt;STRONG&gt;50e6e258&amp;nbsp; 4003489&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1c ...extManager+Item[]&amp;nbsp; 0 instance 012f11d0 items&lt;/STRONG&gt;&lt;BR&gt;
&lt;P&gt;With the handle to &lt;STRONG&gt;InstanceContext&lt;/STRONG&gt;, you can then check for the list of sessionful open channels that are associated with the InstanceContext at that time.&lt;/P&gt;
&lt;P&gt;0:006&amp;gt; !do 0129f7a0 &lt;BR&gt;Name: System.ServiceModel.InstanceContext&lt;BR&gt;MethodTable: 50e183ac&lt;BR&gt;EEClass: 50e18334&lt;BR&gt;Size: 112(0x70) bytes&lt;BR&gt;&amp;nbsp;(C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll)&lt;BR&gt;Fields:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Field&amp;nbsp;&amp;nbsp; Offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type VT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attr&amp;nbsp;&amp;nbsp;&amp;nbsp; Value Name&lt;BR&gt;79104f64&amp;nbsp; 4000915&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 aborted&lt;BR&gt;79104f64&amp;nbsp; 4000916&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 closeCalled&lt;BR&gt;50e51310&amp;nbsp; 4000917&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4 ...ct+ExceptionQueue&amp;nbsp; 0 instance 00000000 exceptionQueue&lt;BR&gt;790f9c18&amp;nbsp; 4000918&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 0129f81c mutex&lt;BR&gt;79104f64&amp;nbsp; 4000919&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 onClosingCalled&lt;BR&gt;79104f64&amp;nbsp; 400091a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 onClosedCalled&lt;BR&gt;79104f64&amp;nbsp; 400091b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 onOpeningCalled&lt;BR&gt;79104f64&amp;nbsp; 400091c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 onOpenedCalled&lt;BR&gt;79104f64&amp;nbsp; 400091d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 raisedClosed&lt;BR&gt;79104f64&amp;nbsp; 400091e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 raisedClosing&lt;BR&gt;79104f64&amp;nbsp; 400091f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 raisedFaulted&lt;BR&gt;79104f64&amp;nbsp; 4000920&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 traceOpenAndClose&lt;BR&gt;790f9c18&amp;nbsp; 4000921&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 0129f7a0 eventSender&lt;BR&gt;50e385f0&amp;nbsp; 4000922&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 state&lt;BR&gt;7910d61c&amp;nbsp; 4000923&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Closed&lt;BR&gt;7910d61c&amp;nbsp; 4000924&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Closing&lt;BR&gt;7910d61c&amp;nbsp; 4000925&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Faulted&lt;BR&gt;7910d61c&amp;nbsp; 4000926&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1c&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Opened&lt;BR&gt;7910d61c&amp;nbsp; 4000927&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Opening&lt;BR&gt;79104f64&amp;nbsp; 400346d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 autoClose&lt;BR&gt;50e20c74&amp;nbsp; 400346e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 34 ....InstanceBehavior&amp;nbsp; 0 instance 012a88c8 behavior&lt;BR&gt;&lt;STRONG&gt;50e5d498&amp;nbsp; 400346f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 38 ...iceChannelManager&amp;nbsp; 0 instance 0129f828 channels&lt;/STRONG&gt;&lt;BR&gt;50e1b4f8&amp;nbsp; 4003470&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3c ...tanceContextFacet&amp;nbsp; 0 instance 012f1308 concurrency&lt;BR&gt;00000000&amp;nbsp; 4003471&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 00000000 extensions&lt;BR&gt;50e5e99c&amp;nbsp; 4003472&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 44 ...l.ServiceHostBase&amp;nbsp; 0 instance 01273750 host&lt;BR&gt;50e03a04&amp;nbsp; 4003473&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 48 ...her.QuotaThrottle&amp;nbsp; 0 instance 00000000 quotaThrottle&lt;BR&gt;50dfe9f4&amp;nbsp; 4003474&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4c ...r.ServiceThrottle&amp;nbsp; 0 instance 00000000 serviceThrottle&lt;BR&gt;790fed1c&amp;nbsp; 4003475&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 instanceContextManagerIndex&lt;BR&gt;790f9c18&amp;nbsp; 4003476&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 0129f810 serviceInstanceLock&lt;BR&gt;7910db30&amp;nbsp; 4003477&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 54 ...ronizationContext&amp;nbsp; 0 instance 00000000 synchronizationContext&lt;BR&gt;50e0b340&amp;nbsp; 4003478&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 58 ...tanceContextFacet&amp;nbsp; 0 instance 00000000 transaction&lt;BR&gt;790f9c18&amp;nbsp; 4003479&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 01271bf4 userObject&lt;BR&gt;79104f64&amp;nbsp; 400347a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 33&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 wellKnown&lt;BR&gt;00000000&amp;nbsp; 400347b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 60&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 00000000 wmiChannels&lt;BR&gt;79104f64&amp;nbsp; 400347c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 68&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 isUserCreated&lt;BR&gt;50e6393c&amp;nbsp; 400346b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8c4 ...textEmptyCallback&amp;nbsp; 0&amp;nbsp;&amp;nbsp; static 012f13bc NotifyEmptyCallback&lt;BR&gt;50dde148&amp;nbsp; 400346c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8c8 ...ntextIdleCallback&amp;nbsp; 0&amp;nbsp;&amp;nbsp; static 012f13dc NotifyIdleCallback&lt;BR&gt;0:006&amp;gt; !do 0129f828 &lt;BR&gt;Name: System.ServiceModel.ServiceChannelManager&lt;BR&gt;MethodTable: 50e5d498&lt;BR&gt;EEClass: 50e5d420&lt;BR&gt;Size: 64(0x40) bytes&lt;BR&gt;&amp;nbsp;(C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll)&lt;BR&gt;Fields:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Field&amp;nbsp;&amp;nbsp; Offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type VT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attr&amp;nbsp;&amp;nbsp;&amp;nbsp; Value Name&lt;BR&gt;79104f64&amp;nbsp; 40009df&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 aborted&lt;BR&gt;790fed1c&amp;nbsp; 40009e0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 busyCount&lt;BR&gt;50e08e90&amp;nbsp; 40009e1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4 ...mmunicationWaiter&amp;nbsp; 0 instance 00000000 busyWaiter&lt;BR&gt;790fed1c&amp;nbsp; 40009e2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 busyWaiterCount&lt;BR&gt;790f9c18&amp;nbsp; 40009e3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 0129f81c mutex&lt;BR&gt;50e26624&amp;nbsp; 40009e4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 state&lt;BR&gt;790fed1c&amp;nbsp; 400347f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 34&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 activityCount&lt;BR&gt;50e08e90&amp;nbsp; 4003480&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1c ...mmunicationWaiter&amp;nbsp; 0 instance 00000000 activityWaiter&lt;BR&gt;790fed1c&amp;nbsp; 4003481&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 38&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 activityWaiterCount&lt;BR&gt;50e6393c&amp;nbsp; 4003482&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20 ...textEmptyCallback&amp;nbsp; 0 instance 00000000 emptyCallback&lt;BR&gt;&lt;STRONG&gt;50dc8564&amp;nbsp; 4003483&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 ...Channels.IChannel&amp;nbsp; 0 instance 00000000 firstIncomingChannel&lt;BR&gt;50e60abc&amp;nbsp; 4003484&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28 ...ChannelCollection&amp;nbsp; 0 instance 00000000 incomingChannels&lt;BR&gt;&lt;/STRONG&gt;50e60abc&amp;nbsp; 4003485&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2c ...ChannelCollection&amp;nbsp; 0 instance 012f3ca8 outgoingChannels&lt;BR&gt;50e183ac&amp;nbsp; 4003486&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30 ...l.InstanceContext&amp;nbsp; 0 instance 0129f7a0 instanceContext&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;The channels field in &lt;STRONG&gt;InstanceContext&lt;/STRONG&gt; points to the Sessionful channels collection which when dumped will give you list of all channels when the &lt;EM&gt;incomingChannels&lt;/EM&gt; field is accessed. If you determine the &lt;STRONG&gt;ConcurrencyMode&lt;/STRONG&gt; to be Reentrant then its possible that some requests can be queued in the &lt;STRONG&gt;InstanceContext&lt;/STRONG&gt; when its actively servicing a message. This information can be found by dumping the &lt;EM&gt;concurrency&lt;/EM&gt; field in InstanceContext.&lt;/P&gt;
&lt;P&gt;0:006&amp;gt; !do 012f1308 &lt;BR&gt;Name: System.ServiceModel.Dispatcher.ConcurrencyInstanceContextFacet&lt;BR&gt;MethodTable: 50e1b4f8&lt;BR&gt;EEClass: 50e1b488&lt;BR&gt;Size: 20(0x14) bytes&lt;BR&gt;&amp;nbsp;(C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll)&lt;BR&gt;Fields:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Field&amp;nbsp;&amp;nbsp; Offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type VT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attr&amp;nbsp;&amp;nbsp;&amp;nbsp; Value Name&lt;BR&gt;79104f64&amp;nbsp; 4002fc0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 Locked&lt;BR&gt;00000000&amp;nbsp; 4002fc1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 00000000 calloutMessageQueue&lt;BR&gt;00000000&amp;nbsp; 4002fc2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 00000000 newMessageQueue&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;calloutMessageQueue&lt;/EM&gt; is the queue which holds the message which when processing made an outgoing call. The &lt;EM&gt;newMessageQueue&lt;/EM&gt; denotes the new messages coming in that are waiting for the InstanceContext to finish processing the message. &lt;/P&gt;
&lt;P&gt;Coming back to the channels collection in &lt;STRONG&gt;InstanceContext&lt;/STRONG&gt;, you can pick any one channel from the list and when you dump it, it will be of type &lt;STRONG&gt;ServiceChannel&lt;/STRONG&gt;. This is the internal representation of all WCF channels. Like the &lt;STRONG&gt;DispatchRuntime&lt;/STRONG&gt;, the &lt;STRONG&gt;ServiceChannel&lt;/STRONG&gt; also provides lot of information.&lt;/P&gt;
&lt;P&gt;0:006&amp;gt; !do 012f0ebc&lt;BR&gt;Name: System.ServiceModel.Channels.ServiceChannel&lt;BR&gt;MethodTable: 50dcd674&lt;BR&gt;EEClass: 50dcd5fc&lt;BR&gt;Size: 152(0x98) bytes&lt;BR&gt;&amp;nbsp;(C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll)&lt;BR&gt;Fields:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Field&amp;nbsp;&amp;nbsp; Offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type VT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attr&amp;nbsp;&amp;nbsp;&amp;nbsp; Value Name&lt;BR&gt;79104f64&amp;nbsp; 4000915&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 aborted&lt;BR&gt;79104f64&amp;nbsp; 4000916&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 closeCalled&lt;BR&gt;50e51310&amp;nbsp; 4000917&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4 ...ct+ExceptionQueue&amp;nbsp; 0 instance 00000000 exceptionQueue&lt;BR&gt;790f9c18&amp;nbsp; 4000918&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 012f0f54 mutex&lt;BR&gt;79104f64&amp;nbsp; 4000919&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 onClosingCalled&lt;BR&gt;79104f64&amp;nbsp; 400091a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 onClosedCalled&lt;BR&gt;79104f64&amp;nbsp; 400091b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 onOpeningCalled&lt;BR&gt;79104f64&amp;nbsp; 400091c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 onOpenedCalled&lt;BR&gt;79104f64&amp;nbsp; 400091d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 raisedClosed&lt;BR&gt;79104f64&amp;nbsp; 400091e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 raisedClosing&lt;BR&gt;79104f64&amp;nbsp; 400091f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 raisedFaulted&lt;BR&gt;79104f64&amp;nbsp; 4000920&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 traceOpenAndClose&lt;BR&gt;790f9c18&amp;nbsp; 4000921&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 012f0ebc eventSender&lt;BR&gt;50e385f0&amp;nbsp; 4000922&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 state&lt;BR&gt;7910d61c&amp;nbsp; 4000923&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 012f11fc Closed&lt;BR&gt;7910d61c&amp;nbsp; 4000924&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Closing&lt;BR&gt;7910d61c&amp;nbsp; 4000925&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Faulted&lt;BR&gt;7910d61c&amp;nbsp; 4000926&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1c&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Opened&lt;BR&gt;7910d61c&amp;nbsp; 4000927&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp; System.EventHandler&amp;nbsp; 0 instance 00000000 Opening&lt;BR&gt;&lt;STRONG&gt;790fed1c&amp;nbsp; 400310b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Int32&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 activityCount ==&amp;gt;Denotes how many activity is being actively processed. 0 indicates the Channel is ready to be closed.&lt;BR&gt;&lt;/STRONG&gt;79104f64&amp;nbsp; 400310c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 allowInitializationUI&lt;BR&gt;79104f64&amp;nbsp; 400310d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 33&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 allowOutputBatching&lt;BR&gt;&lt;STRONG&gt;79104f64&amp;nbsp; 400310e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 80&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 autoClose ==&amp;gt;Will autoclose when the other side initiates a Close.&lt;BR&gt;&lt;/STRONG&gt;50dd04c8&amp;nbsp; 400310f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 34 ...l+CallOnceManager&amp;nbsp; 0 instance 00000000 autoDisplayUIManager&lt;BR&gt;50dd04c8&amp;nbsp; 4003110&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 38 ...l+CallOnceManager&amp;nbsp; 0 instance 00000000 autoOpenManager&lt;BR&gt;50dcd9f0&amp;nbsp; 4003111&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3c ...er.IChannelBinder&amp;nbsp; 0 instance 012c8cd4 binder&lt;BR&gt;50e1eae0&amp;nbsp; 4003112&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40 ...ChannelDispatcher&amp;nbsp; 0 instance 0129e898 channelDispatcher&lt;BR&gt;50dc9cbc&amp;nbsp; 4003113&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 44 ...her.ClientRuntime&amp;nbsp; 0 instance 012f0fc0 clientRuntime&lt;BR&gt;79104f64&amp;nbsp; 4003114&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 81&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 closeBinder&lt;BR&gt;79104f64&amp;nbsp; 4003115&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 82&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 closeFactory&lt;BR&gt;&lt;STRONG&gt;79104f64&amp;nbsp; 4003116&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 83&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 didIdleAbort ==&amp;gt;Did the idle timer expire&lt;BR&gt;&lt;/STRONG&gt;79104f64&amp;nbsp; 4003117&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 84&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 didInteractiveInitialization&lt;BR&gt;&lt;STRONG&gt;79104f64&amp;nbsp; 4003118&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 85&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 doneReceiving ==&amp;gt;Usually means the Channel is done receiveing replies for all outstanding requests&lt;BR&gt;&lt;/STRONG&gt;50e38924&amp;nbsp; 4003119&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 48 ...ndpointDispatcher&amp;nbsp; 0 instance 0129ebd4 endpointDispatcher&lt;BR&gt;&lt;STRONG&gt;79104f64&amp;nbsp; 400311a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 86&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 explicitlyOpened ==&amp;gt; Was it autoopened or explicitly opened&lt;BR&gt;&lt;/STRONG&gt;00000000&amp;nbsp; 400311b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 00000000 extensions&lt;BR&gt;50dc8618&amp;nbsp; 400311c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50 ...iceChannelFactory&amp;nbsp; 0 instance 00000000 factory&lt;BR&gt;79104f64&amp;nbsp; 400311d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 87&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 hasSession&lt;BR&gt;50e4331c&amp;nbsp; 400311e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 54 ...essionIdleManager&amp;nbsp; 0 instance 012f1168 idleManager&lt;BR&gt;50e183ac&amp;nbsp; 400311f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 58 ...l.InstanceContext&amp;nbsp; 0 instance 0129f7a0 instanceContext&lt;BR&gt;50dfe9f4&amp;nbsp; 4003120&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5c ...r.ServiceThrottle&amp;nbsp; 0 instance 00000000 instanceContextServiceThrottle&lt;BR&gt;79104f64&amp;nbsp; 4003121&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 88&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 isPending&lt;BR&gt;79104f64&amp;nbsp; 4003122&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 89&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 isReplyChannel&lt;BR&gt;50dbc7d0&amp;nbsp; 4003123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 60 ...l.EndpointAddress&amp;nbsp; 0 instance 00000000 localAddress&lt;BR&gt;50dc3874&amp;nbsp; 4003124&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64 ...ls.MessageVersion&amp;nbsp; 0 instance 0129658c messageVersion&lt;BR&gt;79104f64&amp;nbsp; 4003125&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 openBinder&lt;BR&gt;7910ca9c&amp;nbsp; 4003126&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.TimeSpan&amp;nbsp; 1 instance 012f0f48 operationTimeout&lt;BR&gt;790f9c18&amp;nbsp; 4003127&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 68&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object&amp;nbsp; 0 instance 00000000 proxy&lt;BR&gt;50dfe9f4&amp;nbsp; 4003128&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6c ...r.ServiceThrottle&amp;nbsp; 0 instance 01273a58 serviceThrottle&lt;BR&gt;790fa3e0&amp;nbsp; 4003129&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 70&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.String&amp;nbsp; 0 instance 00000000 terminatingOperationName&lt;BR&gt;50e183ac&amp;nbsp; 400312a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 74 ...l.InstanceContext&amp;nbsp; 0 instance 00000000 wmiInstanceContext&lt;BR&gt;79104f64&amp;nbsp; 400312b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 wasChannelAutoClosed&lt;BR&gt;00000000&amp;nbsp; 400312c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 78&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 instance 00000000 unknownMessageReceived&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Digging through the &lt;EM&gt;binder&lt;/EM&gt; field in &lt;STRONG&gt;ServiceChannel&lt;/STRONG&gt; will give you the &lt;STRONG&gt;IChannelBinder&lt;/STRONG&gt; which will hold a reference to the &lt;STRONG&gt;ChannelHandler&lt;/STRONG&gt; object that is responsible for pumping messages from that Channel. If you feel that messages from a particular connected client is not being processed it could be that he &lt;STRONG&gt;ChannelHandler&lt;/STRONG&gt; is not pumping messages. I say connected because only channels that have been accepted by the runtime will be having a ChannelHandler object. If there is no session throttles left then clients will timeout in their &lt;STRONG&gt;Open&lt;/STRONG&gt;() call itself.&lt;/P&gt;
&lt;P mce_keep="true"&gt;0:006&amp;gt; !do 012c8df0 &lt;BR&gt;Name: System.ServiceModel.Dispatcher.ChannelHandler&lt;BR&gt;MethodTable: 50e07bd0&lt;BR&gt;EEClass: 50e07b58&lt;BR&gt;Size: 104(0x68) bytes&lt;BR&gt;&amp;nbsp;(C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll)&lt;BR&gt;Fields:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MT&amp;nbsp;&amp;nbsp;&amp;nbsp; Field&amp;nbsp;&amp;nbsp; Offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type VT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attr&amp;nbsp;&amp;nbsp;&amp;nbsp; Value Name&lt;BR&gt;50dec920&amp;nbsp; 40031b6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4c ...ndler+RequestInfo&amp;nbsp; 1 instance 012c8e3c requestInfo&lt;BR&gt;50dcd9f0&amp;nbsp; 40031b7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4 ...er.IChannelBinder&amp;nbsp; 0 instance 012c8cd4 binder&lt;BR&gt;50dcd674&amp;nbsp; 40031b8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8 ...ls.ServiceChannel&amp;nbsp; 0 instance 012f0ebc channel&lt;BR&gt;&lt;STRONG&gt;79104f64&amp;nbsp; 40031b9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 doneReceiving ==&amp;gt;Indicates all messages have been pumped from the Channel&lt;BR&gt;&lt;/STRONG&gt;50dcddf0&amp;nbsp; 40031ba&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c ...plexChannelBinder&amp;nbsp; 0 instance 012c8cd4 duplexBinder&lt;BR&gt;79104f64&amp;nbsp; 40031bb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 hasRegisterBeenCalled&lt;BR&gt;79104f64&amp;nbsp; 40031bc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 hasSession&lt;BR&gt;50e5e99c&amp;nbsp; 40031bd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10 ...l.ServiceHostBase&amp;nbsp; 0 instance 01273750 host&lt;BR&gt;79104f64&amp;nbsp; 40031be&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 incrementedActivityCountInConstructor&lt;BR&gt;79104f64&amp;nbsp; 40031bf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 isCallback&lt;BR&gt;79104f64&amp;nbsp; 40031c0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 41&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 isPumpAcquired&lt;BR&gt;79104f64&amp;nbsp; 40031c1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 isChannelTerminated&lt;BR&gt;&lt;STRONG&gt;79104f64&amp;nbsp; 40031c2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 43&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 isConcurrent ==&amp;gt;0 indicates Single ConcurrencyMode&lt;BR&gt;&lt;/STRONG&gt;79104f64&amp;nbsp; 40031c3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 isManualAddressing&lt;BR&gt;&lt;STRONG&gt;50e139b0&amp;nbsp; 40031c4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14 ...r.ListenerHandler&amp;nbsp; 0 instance 012acb8c listener ==&amp;gt;Listener off which Messages are received&lt;BR&gt;&lt;/STRONG&gt;50dc3874&amp;nbsp; 40031c5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18 ...ls.MessageVersion&amp;nbsp; 0 instance 0129658c messageVersion&lt;BR&gt;50dfe854&amp;nbsp; 40031cc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1c ...rHandlingReceiver&amp;nbsp; 0 instance 012c8e70 receiver&lt;BR&gt;&lt;STRONG&gt;79104f64&amp;nbsp; 40031cd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 45&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 receiveSynchronously ==&amp;gt;Indicated whether the pump is sync or async&lt;BR&gt;&lt;/STRONG&gt;79104f64&amp;nbsp; 40031ce&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 46&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 receiveWithTransaction&lt;BR&gt;50e65618&amp;nbsp; 40031cf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20 ...ls.RequestContext&amp;nbsp; 0 instance 00000000 replied&lt;BR&gt;50e65618&amp;nbsp; 40031d0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 ...ls.RequestContext&amp;nbsp; 0 instance 00000000 requestWaitingForThrottle&lt;BR&gt;50e4bab4&amp;nbsp; 40031d1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28 ...rappedTransaction&amp;nbsp; 0 instance 00000000 acceptTransaction&lt;BR&gt;50dfe9f4&amp;nbsp; 40031d2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2c ...r.ServiceThrottle&amp;nbsp; 0 instance 01273a58 throttle&lt;BR&gt;79104f64&amp;nbsp; 40031d3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 47&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 wasChannelThrottled&lt;BR&gt;50dfe9f4&amp;nbsp; 40031d4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30 ...r.ServiceThrottle&amp;nbsp; 0 instance 00000000 instanceContextThrottle&lt;BR&gt;50e60c28&amp;nbsp; 40031d5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 34 ...actedBatchContext&amp;nbsp; 0 instance 00000000 sharedTransactedBatchContext&lt;BR&gt;00000000&amp;nbsp; 40031d6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 38 ...actedBatchContext&amp;nbsp; 0 instance 00000000 transactedBatchContext&lt;BR&gt;79104f64&amp;nbsp; 40031d7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 48&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Boolean&amp;nbsp; 0 instance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 isMainTransactedBatchHandler&lt;BR&gt;7910ca9c&amp;nbsp; 40031b5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 844&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.TimeSpan&amp;nbsp; 1&amp;nbsp;&amp;nbsp; static 012c8e80 CloseAfterFaultTimeout&lt;BR&gt;79107d2c&amp;nbsp; 40031c6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 848 System.AsyncCallback&amp;nbsp; 0&amp;nbsp;&amp;nbsp; static 012c8ec0 onAsyncReceiveComplete&lt;BR&gt;79113c8c&amp;nbsp; 40031c7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 84c ...ding.WaitCallback&amp;nbsp; 0&amp;nbsp;&amp;nbsp; static 012c8ee0 onContinueAsyncReceive&lt;BR&gt;79113c8c&amp;nbsp; 40031c8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 850 ...ding.WaitCallback&amp;nbsp; 0&amp;nbsp;&amp;nbsp; static 012c8f00 onStartSyncMessagePump&lt;BR&gt;79113c8c&amp;nbsp; 40031c9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 854 ...ding.WaitCallback&amp;nbsp; 0&amp;nbsp;&amp;nbsp; static 012c8f20 onStartAsyncMessagePump&lt;BR&gt;79113c8c&amp;nbsp; 40031ca&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 858 ...ding.WaitCallback&amp;nbsp; 0&amp;nbsp;&amp;nbsp; static 012c8f40 onStartSingleTransactedBatch&lt;BR&gt;79113c8c&amp;nbsp; 40031cb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 85c ...ding.WaitCallback&amp;nbsp; 0&amp;nbsp;&amp;nbsp; static 012c8f60 openAndEnsurePump&lt;BR&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Think&amp;nbsp;I should stop at this for today. Some of the information here should be useful for all end user developers (like throttles). Due to our extensive testing, end users should never have to worry about debugging some classes (like &lt;STRONG&gt;ChannelDispatcher&lt;/STRONG&gt;) unless they implement their own channel stack and want to know why the &lt;STRONG&gt;ChannelDispatcher&lt;/STRONG&gt; is not pumping messages off their channel. Hopefully this will gives you enough information to go and dig around your server dumps and try to figure out where the bottle neck could be (Waiting for throttle/Waiting for reentrance/waiting for new message to be received etc).&lt;/P&gt;
&lt;P mce_keep="true"&gt;Next time I will talk about how to debug the client side &lt;STRONG&gt;ServiceChannel&lt;/STRONG&gt; (in case of timeouts) and talk a little bit more about input queues on the server.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Maheshwar Jayaraman&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1271189" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item><item><title>WCF Channels AutoOpen vs Open Semantics</title><link>http://blogs.msdn.com/mahjayar/archive/2006/11/19/wcf-channels-autoopen-vs-open-semantics.aspx</link><pubDate>Mon, 20 Nov 2006 03:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1105979</guid><dc:creator>Mahjayar</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/1105979.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=1105979</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=1105979</wfw:comment><description>&lt;P&gt;Wanted to write&amp;nbsp;up a&amp;nbsp;post on whats the difference between "auto" opening a WCF Channel and explicitly calling "Open" on it. Michael Maruchek posted a detailed and well explained post at &lt;A title=http://blogs.msdn.com/mjm/archive/2006/11/13/auto-open-part-1.aspx href="http://blogs.msdn.com/mjm/archive/2006/11/13/auto-open-part-1.aspx" mce_href="http://blogs.msdn.com/mjm/archive/2006/11/13/auto-open-part-1.aspx"&gt;&lt;FONT color=#669966&gt;http://blogs.msdn.com/mjm/archive/2006/11/13/auto-open-part-1.aspx&lt;/FONT&gt;&lt;/A&gt;. Waiting for part 2.&lt;/P&gt;
&lt;P&gt;Since Micheal did such a wonderful job of explaining the design I just wanted to illustrate the behavior with a sample app.&lt;/P&gt;
&lt;P&gt;I have a simple contract that has a Sync and Async version and the client will invoke a operation on the async contract 10 times. Lets see the difference in actual behavior when the channel is auto opened and explicitly opened.&lt;/P&gt;
&lt;P&gt;First the contract definitions.&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;[&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ServiceContract&lt;/FONT&gt;&lt;FONT size=2&gt;(Name=&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"ISyncService"&lt;/FONT&gt;&lt;FONT size=2&gt;)]&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;interface&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;IAsyncService&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;OperationContract&lt;/FONT&gt;&lt;FONT size=2&gt;(AsyncPattern=&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;, Action=&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"SayHello"&lt;/FONT&gt;&lt;FONT size=2&gt;)]&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IAsyncResult&lt;/FONT&gt;&lt;FONT size=2&gt; BeginSayHello(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; id, &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;AsyncCallback&lt;/FONT&gt;&lt;FONT size=2&gt; callback, &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Object&lt;/FONT&gt;&lt;FONT size=2&gt; obj);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void&lt;/FONT&gt;&lt;FONT size=2&gt; EndSayHello(&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;IAsyncResult&lt;/FONT&gt;&lt;FONT size=2&gt; ar);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;}&lt;/P&gt;
&lt;P&gt;[&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ServiceContract&lt;/FONT&gt;&lt;FONT size=2&gt;]&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;interface&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ISyncService&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;OperationContract&lt;/FONT&gt;&lt;FONT size=2&gt;(Action=&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"SayHello"&lt;/FONT&gt;&lt;FONT size=2&gt;)]&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void&lt;/FONT&gt;&lt;FONT size=2&gt; SayHello(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; id);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;Here is the contract implementation. Notice the multiple concurrency that should allow concurrent processing of multiple messages.&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;[&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ServiceBehavior&lt;/FONT&gt;&lt;FONT size=2&gt;(ConcurrencyMode=&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ConcurrencyMode&lt;/FONT&gt;&lt;FONT size=2&gt;.Multiple, InstanceContextMode=&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;InstanceContextMode&lt;/FONT&gt;&lt;FONT size=2&gt;.Single)]&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;class&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SyncService&lt;/FONT&gt;&lt;FONT size=2&gt; : &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ISyncService&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;{&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;#region&lt;/FONT&gt;&lt;FONT size=2&gt; ISyncService Members&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; SayHello(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; id)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console&lt;/FONT&gt;&lt;FONT size=2&gt;.WriteLine(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"SayHello invoked with Id: {0}"&lt;/FONT&gt;&lt;FONT size=2&gt;, id);&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT color=#008080 size=2&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread&lt;/FONT&gt;&lt;FONT size=2&gt;.Sleep(500);&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;#endregion&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;Finally the client code to invoke the service. We will introduce a small sleep to simulate some long processing.&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;IAsyncService&lt;/FONT&gt;&lt;FONT size=2&gt; channel = &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ChannelFactory&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;IAsyncService&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt;.CreateChannel(binding, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;EndpointAddress&lt;/FONT&gt;&lt;FONT size=2&gt;(ServiceAddress));&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;for&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; i = 0; i &amp;lt; 10; i++)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; channel.BeginSayHello(i, SayHelloCallback, channel);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008080 size=2&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;This implies the "auto" open behavior. Lets see the output.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Issued all asynchronus requests. Waiting for them to complete.&lt;BR&gt;SayHello invoked with Id: 0&lt;BR&gt;SayHello invoked with Id: 1&lt;BR&gt;SayHello invoked with Id: 2&lt;BR&gt;SayHello invoked with Id: 3&lt;BR&gt;SayHello invoked with Id: 4&lt;BR&gt;SayHello invoked with Id: 5&lt;BR&gt;SayHello invoked with Id: 6&lt;BR&gt;SayHello invoked with Id: 7&lt;BR&gt;SayHello invoked with Id: 8&lt;BR&gt;SayHello invoked with Id: 9&lt;BR&gt;All async requests completed&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;As you can see no matter how many times the client is run the server processes all the async invocations sequentially and in the order it was issued. This defeats the purpose of issuing async calls and having multiple concurrency mode on the server.&lt;/P&gt;
&lt;P&gt;Lets see the output when the channel is explicitly opened. I just added the following line before issuing the requests.&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;((&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;IChannel&lt;/FONT&gt;&lt;FONT size=2&gt;)channel).Open();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Output is:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Issued all asynchronus requests. Waiting for them to complete.&lt;BR&gt;SayHello invoked with Id: 0&lt;BR&gt;SayHello invoked with Id: 2&lt;BR&gt;SayHello invoked with Id: 4&lt;BR&gt;SayHello invoked with Id: 5&lt;BR&gt;SayHello invoked with Id: 1&lt;BR&gt;SayHello invoked with Id: 3&lt;BR&gt;SayHello invoked with Id: 7&lt;BR&gt;SayHello invoked with Id: 6&lt;BR&gt;SayHello invoked with Id: 8&lt;BR&gt;SayHello invoked with Id: 9&lt;BR&gt;All async requests completed&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;As you can see the output is truly async and truly concurrent.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Maheshwar Jayaraman&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1105979" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item><item><title>WinFx: UseSynchronizationContext Usage</title><link>http://blogs.msdn.com/mahjayar/archive/2006/11/07/winfx-usesynchronizationcontext-usage.aspx</link><pubDate>Wed, 08 Nov 2006 09:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1031143</guid><dc:creator>Mahjayar</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/1031143.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=1031143</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=1031143</wfw:comment><description>&lt;P&gt;One of the most common problems we debug with WCF proxies invoked from WinForm/XAML app's is a perceived hang when duplex contract's are involved. The app usually has a "&lt;STRONG&gt;click to invoke proxy&lt;/STRONG&gt;" button that invokes a method (which will callback the client) on the server and the app will freeze waiting for the response. I wanted to talk a little bit more about this today that hopefully will prove useful if anyone is debugging similar issues. &lt;/P&gt;
&lt;P&gt;Most often the reason for this behavior is due to a argument in the ServiceBehaviorAttribute/CallbackBehaviorAttribute class called &lt;STRONG&gt;UseSynchronizationContext&lt;/STRONG&gt;. This property indicates that the WCF runtime will schedule all calls to the server/callback dispatcher on the SynchronizationContext that was captured when the runtime was built. Refer to &lt;A href="http://msdn.microsoft.com/msdnmag/issues/06/06/NETMatters/" mce_href="http://msdn.microsoft.com/msdnmag/issues/06/06/NETMatters/"&gt;these&lt;/A&gt; &lt;A href="http://blogs.msdn.com/mattdotson/archive/2006/02/13/531315.aspx" mce_href="http://blogs.msdn.com/mattdotson/archive/2006/02/13/531315.aspx"&gt;links&lt;/A&gt; to know more about &lt;A href="http://msdn2.microsoft.com/en-us/library/system.threading.synchronizationcontext.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.threading.synchronizationcontext.aspx"&gt;SynchronizationContext&lt;/A&gt;. SynchronizationContext is used to ensure that a synchronous/async callback is invoked on the same thread. People who have worked with winforms would know about this. Basically to modify any control on winform, the caller must access the the control on the same thread in which the controls were created or else you get this wonderful error message.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color=#0000ff&gt;An unhandled exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll &lt;/FONT&gt;&lt;/EM&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color=#0000ff&gt;Additional information: Cross-thread operation not valid: Control 'button1' accessed from a thread other than the thread it was created on.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If the callback is invoked on the SynchronizationContext of the thread that created the control this problem can be avoided. WCF allows the user to specify whether the WCF should invoke operations (on server) or callbacks (on clients) on a particular SynchronizationContext. This property defaults to true in both attributes and what this implies is that if WCF detects a SynchronizationContext during the creation of the runtime then it will cache it and will streamline all further invocations on that. By default console programs dont have SynchronizationContext set (i.e SynchronizationContext.Current will be null) and so this is not a problem for those applications. Winforms, on the other hand, will populate a SynchronizationContext object when the Form constructor is called and so when you create a ServiceHost/Proxy/ChannelFactory within the scope of the winform (or in any of the winform event code), its cached by the runtime. I will use this simple duplex contract to explain the problem.&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;[ServiceContract(CallbackContract = typeof(IDownloadCallbackService))]&lt;BR&gt;public interface IDownloadService&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; [OperationContract]&lt;BR&gt;&amp;nbsp; void Download();&lt;BR&gt;} &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;public interface IDownloadCallbackService&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; [OperationContract]&lt;BR&gt;&amp;nbsp; void DownloadComplete();&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The client is a simple winform app that has one button and in the click event of the button, it creates a duplex channel to the service and invokes the Download operation. The server will just invoke the callback channel and call DownloadComplete. 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;//Server implementation&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;public void Download()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; Console.WriteLine("CLient invoked download");&lt;BR&gt;&amp;nbsp; OperationContext.Current.GetCallbackChannel&amp;lt;IDownloadCallbackService&amp;gt;().DownloadComplete();&lt;BR&gt;&amp;nbsp; Console.WriteLine("Notified client of download complete");&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;//Callback implementation on the client&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;public void DownloadComplete()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; MessageBox.Show("Server notified that download is complete");&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;//Client code to create a duplex channel&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;private void button1_Click(object sender, EventArgs e)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; DuplexChannelFactory&amp;lt;IDownloadService&amp;gt; factory = new DuplexChannelFactory&amp;lt;IDownloadService&amp;gt;(typeof(DownloadCallbackService), new WSDualHttpBinding());&lt;BR&gt;&amp;nbsp; IDownloadService client = factory.CreateChannel(new InstanceContext(new DownloadCallbackService()), new EndpointAddress("&lt;/FONT&gt;&lt;A href="http://localhost:8080/DownloadService%22));" mce_href='http://localhost:8080/DownloadService"));'&gt;&lt;FONT color=#000080&gt;http://localhost:8080/DownloadService"));&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;&lt;FONT color=#000080&gt;&amp;nbsp; client.Download();&lt;BR&gt;&amp;nbsp; ((IClientChannel)client).Close();&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So the sequence is &lt;STRONG&gt;&lt;FONT color=#004000&gt;Client-&amp;gt;Download-&amp;gt;DownloadComplete-&amp;gt;returns to Download-&amp;gt;returns to Client&lt;/FONT&gt;&lt;/STRONG&gt;.&amp;nbsp;Since the duplex channel was created in the button click event, the SynchronizationContext of the winform app is captured and when a message for DownloadComplete arrives at the client's dispatcher it will schedule the processing of the message on that SynchronizationContext. This message will not be processed as the the SynchronizationContext is busy waiting for the Download call to complete and Download is blocked on the server waiting for DownloadComplete and hence the deadlock.&lt;/P&gt;
&lt;P&gt;Solution is to set UseSynchronizationContext property to false on the CallbackBehavior attribute.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;[CallbackBehavior(ConcurrencyMode=ConcurrencyMode.Reentrant, UseSynchronizationContext=false)]&lt;BR&gt;public class DownloadCallbackService : IDownloadCallbackService&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you see similar problem on server and the server is hosted in a winforms app then set UseSynchronizationContext=false on the ServiceBehaviorAttribute.&lt;/P&gt;
&lt;P&gt;One final comment, the UseSynchronizationContext is checked when the DuplexChannelFactory is created. When using the DuplexChannelFactory model to create channels as shown above, ensure that the type passed in the constructor is the type of class on which the CallbackBehavior is defined. For example, if the factory is created as show below, then the runtime will not be able to look up a CallbackBehavior and hence will use the default values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;FONT color=#000080&gt;DuplexChannelFactory&amp;lt;IDownloadService&amp;gt; factory = new DuplexChannelFactory&amp;lt;IDownloadService&amp;gt;(typeof(IDownloadService), new WSDualHttpBinding());&lt;/FONT&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Maheshwar Jayaraman[WCF]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1031143" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item><item><title>WinFx 3.0 has RTM'd</title><link>http://blogs.msdn.com/mahjayar/archive/2006/11/06/winfx-3-0-has-rtm-d.aspx</link><pubDate>Tue, 07 Nov 2006 09:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1011134</guid><dc:creator>Mahjayar</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/1011134.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=1011134</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=1011134</wfw:comment><description>&lt;P&gt;Sometime last Friday, admist cheers and high fives, our lead PM resolved the last bug that stopped us from signing off on WCF(code named Indigo). Bug # 1 was opened way back when Indigo was in planning stages and with this bug we signed off on the product. Today Microsoft announced RTM of the .Net 3.0. For more information read the .NetFx blog at &lt;A title=http://www.netfx3.com/blogs/news_and_announcements/archive/2006/11/06/.NET-Framework-3.0-has-been-released_2100_.aspx href="http://www.netfx3.com/blogs/news_and_announcements/archive/2006/11/06/.NET-Framework-3.0-has-been-released_2100_.aspx" mce_href="http://www.netfx3.com/blogs/news_and_announcements/archive/2006/11/06/.NET-Framework-3.0-has-been-released_2100_.aspx"&gt;http://www.netfx3.com/blogs/news_and_announcements/archive/2006/11/06/.NET-Framework-3.0-has-been-released_2100_.aspx&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/mahesh_kam/291268713/"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/mahesh_kam/291268713/"&gt;&lt;IMG title=IndigoDone style="WIDTH: 610px; HEIGHT: 74px" height=74 alt=IndigoDone src="http://static.flickr.com/107/291268713_841604c19c_o.png" width=610 mce_src="http://static.flickr.com/107/291268713_841604c19c_o.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;WCF is the second product RTM'ing since I started working at Microsoft and it really satisfying to ship such a product. On to next version now. &lt;/P&gt;
&lt;P&gt;Maheshwar Jayaraman&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1011134" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item><item><title>What happens when InstanceContext.Release/GetServiceInstance() is called on a Singleton</title><link>http://blogs.msdn.com/mahjayar/archive/2006/10/24/what-happens-when-instancecontext-release-getserviceinstance-is-called-on-a-singleton.aspx</link><pubDate>Wed, 25 Oct 2006 03:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:870797</guid><dc:creator>Mahjayar</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/870797.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=870797</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=870797</wfw:comment><description>&lt;P&gt;&lt;STRONG&gt;InstanceContext&lt;/STRONG&gt; has two methods, &lt;STRONG&gt;ReleaseServiceInstance&lt;/STRONG&gt; and &lt;STRONG&gt;GetServiceInstance&lt;/STRONG&gt;, that can be used by users to dynamically release and create new service instances. Service instance is the actual&amp;nbsp;.Net instance of the contract on which operations are invoked. This post is to clarify the behavior of the API's when the service is hosted as a Singleton. There are two overloads in ServiceHost that lets users host a contract as singleton. If users use the overload that requires a Type then the runtime will create a instance of the class during the Open() process. If users use the Object overload then the runtime will use that instance to service all requests. The instance created in the former case is referred as "hidden" singleton and the one passed by the user in the latter case is called "well-known" singleton. The behavior of InstanceContext.Release/GetServiceInstance is different in both cases. &lt;/P&gt;
&lt;P&gt;Technically whenever the user calls InstanceContext.ReleaseServiceInstance() the runtime will disassociate the instance from the InstanceContext and call dispose (If the instance inherits from IDisposable) on the instance. A new instance will be created when a new message arrives for that endpoint or the user explicitly calls InstanceContext.GetServiceInstance(). &lt;/P&gt;
&lt;P&gt;When ReleaseServiceInstance is called on a hidden singleton, the runtime disassociates the hidden instance from the InstanceContext but will not dispose it yet. When another message arrives for that endpoint or GetServiceInstance is called a new instance is created which will now act as the singleton instance for all future requests. This now acts as a normal service instance and so when the user calls Release/GetServiceInstance is called that instance will be disposed immediately and a new one created. The hidden singleton that was disassociated in the first call to ReleaseServiceInstance will be disposed only when the ServiceHost is closed. So even though the InstanceContextMode was set to Single, there can be 2 service instances active in the appdomain if the user calls ReleaseServiceInstance.&lt;/P&gt;
&lt;P&gt;In case of well-known singleton, the runtime detects that its&amp;nbsp;well-known and will ignore all calls to Release/GetServiceInstance i.e its just a no-op invoking those two API's. This well-known instance will never be disposed by WCF (not even during ServiceHost.Close() process) as this user owns the lifetime of the instance and the user owns the responsibility of disposing it.&lt;/P&gt;
&lt;P&gt;Lets host a simple contract to see the behavior in both cases.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;[ServiceContract]&lt;BR&gt;public interface IService&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[OperationContract]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;void SayHello(); &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [OperationContract]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void ReleaseInstance();&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The class that implements this contract will give a unique ID to each instance created and will implement IDisposable so it can log when that instance is disposed by the runtime. 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;[ServiceBehavior(InstanceContextMode=InstanceContextMode.Single, ConcurrencyMode=ConcurrencyMode.Single)]&lt;BR&gt;public class MyService : IService, IDisposable&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int sayHelloCount;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; String id;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public MyService()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; id = Guid.NewGuid().ToString();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("MyService Ctor called. Id = "+ id);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sayHelloCount = 0;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #region IService Members &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void SayHello()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sayHelloCount++;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("SayHello count : " + sayHelloCount);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void ReleaseInstance()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; OperationContext.Current.InstanceContext.ReleaseServiceInstance();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; OperationContext.Current.InstanceContext.GetServiceInstance();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #region IDisposable Members &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void Dispose()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Destructor called for Id : " + id);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The SayHello() method will print the number of times it was invoked by all clients and the ReleaseInstance() when called will explicitly refresh the service instance. 
&lt;H4&gt;&lt;STRONG&gt;Hidden Singleton Host:&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Lets consider the case when the contract is hosted as a hidden singleton. The client will create call SayHello() thrice followed by ReleaseInstance() for a couple of times. 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;IService client = ChannelFactory&amp;lt;IService&amp;gt;.CreateChannel(new BasicHttpBinding(), new EndpointAddress("&lt;/FONT&gt;&lt;A href="http://localhost:8080/MyService%22));" mce_href='http://localhost:8080/MyService"));'&gt;&lt;FONT color=#0000ff&gt;http://localhost:8080/MyService"));&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;client.SayHello();&lt;BR&gt;client.SayHello();&lt;BR&gt;client.SayHello();&lt;BR&gt;client.ReleaseInstance();&lt;BR&gt;client.SayHello();&lt;BR&gt;client.SayHello();&lt;BR&gt;client.SayHello();&lt;BR&gt;client.ReleaseInstance();&lt;BR&gt;client.SayHello();&lt;BR&gt;client.SayHello();&lt;BR&gt;client.SayHello();&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The output when we run the above client is provided below. 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#800040&gt;MyService Ctor called. Id = 420f1d1b-aa68-452a-91ab-4021650b33a5&lt;BR&gt;SayHello count : 1&lt;BR&gt;SayHello count : 2&lt;BR&gt;SayHello count : 3&lt;BR&gt;Calling ReleaseServiceInstance&lt;BR&gt;Calling GetServiceInstance&lt;BR&gt;MyService Ctor called. Id = 349b5842-5e80-4033-a076-4a7b27017b4e&lt;BR&gt;SayHello count : 1&lt;BR&gt;SayHello count : 2&lt;BR&gt;SayHello count : 3&lt;BR&gt;Calling ReleaseServiceInstance&lt;BR&gt;Destructor called for Id : 349b5842-5e80-4033-a076-4a7b27017b4e&lt;BR&gt;Calling GetServiceInstance&lt;BR&gt;MyService Ctor called. Id = bec7b3c6-2658-4193-b6c7-0ad6f2fdc32c&lt;BR&gt;SayHello count : 1&lt;BR&gt;SayHello count : 2&lt;BR&gt;SayHello count : 3&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#800040&gt;Calling ServiceHost.Close()&lt;BR&gt;Destructor called for Id : bec7b3c6-2658-4193-b6c7-0ad6f2fdc32c&lt;BR&gt;Destructor called for Id : 420f1d1b-aa68-452a-91ab-4021650b33a5&lt;BR&gt;Press any key to continue . . .&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As you can see the runtime creates the hidden singleton "3cee8466-39ff-4d3e-a671-1ea8e73066bb" and then uses it to service the first three SayHello calls. Then when the user calls ReleaseInstance there is no log for the the instance being disposed. The subsequent call to GetServiceInstance creates another instance with id "149273da-2c02-4b90-a1f4-d36e87d6991d". This serves the next three calls and when the user calls and will be disposed the next time ReleaseServiceInstance is called. The hidden singleton is disposed only when the ServiceHost is closed. The Destructor called for "bec7b3c6-2658-4193-b6c7-0ad6f2fdc32c" denotes the singleton InstanceContext being closed and that inturn closing the service instance (As this instance is no longer the hidden singleton). 
&lt;H4&gt;&lt;STRONG&gt;Well-Known Singleton case:&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Lets take a look at the output in case of well-known singleton. 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#800040&gt;MyService Ctor called. Id = d224f9d8-25dd-459d-b6be-c71477ecc20e&lt;BR&gt;SayHello count : 1&lt;BR&gt;SayHello count : 2&lt;BR&gt;SayHello count : 3&lt;BR&gt;Calling ReleaseServiceInstance&lt;BR&gt;Calling GetServiceInstance&lt;BR&gt;SayHello count : 4&lt;BR&gt;SayHello count : 5&lt;BR&gt;SayHello count : 6&lt;BR&gt;Calling ReleaseServiceInstance&lt;BR&gt;Calling GetServiceInstance&lt;BR&gt;SayHello count : 7&lt;BR&gt;SayHello count : 8&lt;BR&gt;SayHello count : 9&lt;BR&gt;Calling ServiceHost.Close()&lt;BR&gt;Press any key to continue . . .&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As you can see there us no effect of calling ReleaseServiceInstance/GetServiceInstance and that the instance is never disposed. 
&lt;P&gt;The sample program is attached. 
&lt;P&gt;Maheshwar Jayaraman [WCF]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=870797" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/mahjayar/attachment/870797.ashx" length="2783" type="text/plain" /><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item><item><title>IInstanceContextProvider threading model</title><link>http://blogs.msdn.com/mahjayar/archive/2006/10/18/iinstancecontextprovider-threading-model.aspx</link><pubDate>Thu, 19 Oct 2006 09:20:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:842720</guid><dc:creator>Mahjayar</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/842720.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=842720</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=842720</wfw:comment><description>&lt;p&gt;IInstanceContextProvider is the extension used by WCF runtime to associate/create InstanceContexts for every Message being processed. As I mentioned earlier this extension is called for every message arriving on every channel. This means that two messages from the same channel can race with each other in trying to get an InstanceContext. This is not an issue for InstanceContextMode.PerCall and InstanceContextMode.Single for obvious reasons. In case of PerCall each message gets its own InstanceContext and in Single case the Singleton is established when the ServiceHose is opened and so every message will get the same InstanceContext. So if you are using the extension to custom wire your InstanceContext creation/association logic then you need to be aware of the potential race. To make matters simple I am going to take an example of user implementing the PerSession behavior. Lets see a sequence when the first&amp;nbsp;n messages from a sessionful channel are processed by the host. I talk about the first n messages only, as once the InstanceContext has been created and associated with the Channel then each message can easily look it up. Lets take a look at sequence for the first 2 messages (different colors for different threads)&lt;/p&gt; &lt;p&gt;&lt;font color="#000080"&gt;&lt;strong&gt;Channel1-&amp;gt;Message1-&amp;gt;IInstanceContextProvider.GetExistingInstanceContext() &lt;/strong&gt;&lt;/font&gt;==&amp;gt;No InstanceContext exists yet so null is returned.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;font color="#004000"&gt;Channel1-&amp;gt;Message2-&amp;gt;IInstanceContextProvider.GetExistingInstanceContext()&lt;/font&gt; &lt;/strong&gt;==&amp;gt;No InstanceContext exists yet as Message1 has not completed InitializeInstanceContext() yet and so null is returned.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;font color="#000080"&gt;Channel1-&amp;gt;Message1-&amp;gt;IInstanceContextProvider.InitializeInstanceContext()&lt;/font&gt; &lt;/strong&gt;==&amp;gt;New InstanceContext was created and is associated with the sessionful channel.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;font color="#004000"&gt;Channel1-&amp;gt;Message2-&amp;gt;IInstanceContextProvider.InitializeInstanceContext()&lt;/font&gt; &lt;/strong&gt;==&amp;gt;One more InstanceContext was created and now that will be associated with the channel. &lt;/p&gt; &lt;p&gt;So when Message2 from Channel1 starts processing and IInstanceContextProvider is invoked, its on a different thread and this now races with Message1.InitializeInstanceContext() running on a different thread. If null is returned from GetExistingInstanceContext() for both messages and so two new InstanceContext's are created. So based on how many messages arrive before the InstanceContext is hooked to the sessionful channel, the system can potentially create that many InstanceContexts for the same channel. If Message1 runs through both the methods before any other message is processed for the same channel then there is no issue.&lt;/p&gt; &lt;p&gt;The solution is to make the second message block in GetExistingInstanceContext() till the first message&amp;nbsp;completes initializing the InstanceContext. For more details on how to achieve this, refer to the SDK sample shipping with WCF under (&lt;strong&gt;TechnologySamples\Extension\Instancing\Sharing&lt;/strong&gt;).&lt;/p&gt; &lt;p&gt;So another question is whether this is an issue only for ConcurrencyMode.Multiple and the answer is no. It's an issue for all ConcurrencyMode's as that check&amp;nbsp;is enforced at a later stage by the runtime.&lt;/p&gt; &lt;p&gt;Maheshwar Jayaraman[WCF]&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=842720" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item><item><title>WCF June/July CTP: QnA </title><link>http://blogs.msdn.com/mahjayar/archive/2006/07/26/679552.aspx</link><pubDate>Thu, 27 Jul 2006 00:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:679552</guid><dc:creator>Mahjayar</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/679552.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=679552</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=679552</wfw:comment><description>&lt;P&gt;We have an internal alias where people developing apps on WCF post questions. Generally we see some questions that are commonly faced by people and thought it would be a good idea to make a quick HowTo or QnA on some topics that WCF newbie users may find useful.&lt;/P&gt;
&lt;P&gt;Q: &lt;STRONG&gt;&lt;FONT color=#0000ff&gt;How to know if a server channel is sessionful or not?&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;A: Couple of ways. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OperationContext.Current.SessionId != null&lt;/P&gt;
&lt;P&gt;or&amp;nbsp;&amp;nbsp;&amp;nbsp; OperationContext.Current.Channel.SessionId != null&lt;/P&gt;
&lt;P&gt;Q: &lt;FONT color=#0000ff&gt;&lt;STRONG&gt;WCF service runtime disposes off all input/output parameters once the operation is invoked. How can I cache the input arguments?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;A: Mark you operation implementation with OperationBehavior with AutoDisposeParameters set to false.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;[OperationBehavior(AutoDisposeParameters=false)]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void Foo(Message m,&amp;nbsp;FooDisposableObj f)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Implementation&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;Q: &lt;STRONG&gt;&lt;FONT color=#0000ff&gt;Why is OperationContext.Current.RequestContext null?&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;A: Because the operation is OneWay. RequestContext is not null only for request/reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Q: &lt;FONT color=#0000ff&gt;&lt;STRONG&gt;Why does the first call on a newly created channel take longer to complete than subsequent calls?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;A: Its possible that the delay is due to AutoOpen feature. If a channel is not in Opened state when&amp;nbsp;a call is made then the channel is "auto opened" for the user.&amp;nbsp;Users can explicitly open a channel by doing&lt;/P&gt;
&lt;P&gt;((IClientChannel)channel).Open();&lt;/P&gt;
&lt;P&gt;or proxy.Open() ==&amp;gt; If proxy is of type ClientBase&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Q: &lt;FONT color=#0000ff&gt;&lt;STRONG&gt;If a binding does not use ReliableMessaging, then is the order preserved for all async calls made on a Channel using that binding?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;A: Yes.&lt;/P&gt;
&lt;P&gt;Q: &lt;FONT color=#0000ff&gt;&lt;STRONG&gt;What's the difference between ConcurrencyMode.Single and ConcurrencyMode.Reentrant. They seem to process only one message at any time?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;A: Reentrant is actually analogus to ConcurrencyMode.Single in that it will process only one message at a given time. The only difference is that the service is unblocked to process a new message when the user makes an &lt;EM&gt;&lt;STRONG&gt;outgoing call while&lt;/STRONG&gt; &lt;/EM&gt;processing a message.&lt;/P&gt;
&lt;P&gt;Q: &lt;FONT color=#0000ff&gt;&lt;STRONG&gt;If I have multiple messages/channels waiting for a throttle (Call/Session/InstanceContext), how fair is WCF to the waiters?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;A: First come first serve.&lt;/P&gt;
&lt;P&gt;Q: &lt;FONT color=#0000ff&gt;&lt;STRONG&gt;Whats the implications of using IsOneWay=true on an OperationContract?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;A: KennyW has a wonderful post on this at &lt;A href="http://kennyw.com/indigo/130"&gt;http://kennyw.com/indigo/130&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Q: &lt;FONT color=#0000ff&gt;&lt;STRONG&gt;How do I know if the throttle limit set on the ServiceHost is too restrictive?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;A: Well thats a decision the customer needs to make based on the load they expect. But in test environment, enable logging and if there is too many occurances of &lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;&lt;STRONG&gt;The system hit the limit set for the '[One of the throttles]' throttle. Throttle value can be changed by modifying...&lt;/STRONG&gt;&lt;/EM&gt;" then it probably means that that particular throttle is too restrictive.&lt;/P&gt;
&lt;P&gt;Thats all the time I have today for this list. There is lot more that I will try to post by the end of the week.&lt;/P&gt;
&lt;P&gt;Maheshwar Jayaraman [WCF]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=679552" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item><item><title>Usage pattern for IInstanceContextInitializer vs IInstanceContextProvider</title><link>http://blogs.msdn.com/mahjayar/archive/2006/07/17/668859.aspx</link><pubDate>Mon, 17 Jul 2006 23:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:668859</guid><dc:creator>Mahjayar</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/668859.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=668859</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=668859</wfw:comment><description>&lt;P&gt;I mentioned in my &lt;A href="http://blogs.msdn.com/mahjayar/archive/2006/07/08/660176.aspx"&gt;previous post&lt;/A&gt; that June CTP introduces a new extension to enable sharing. One common question being raised internally is the difference between &lt;STRONG&gt;&lt;FONT color=#0000ff&gt;IInstanceContextProvider.InitializeInstanceContext&lt;/FONT&gt;&lt;/STRONG&gt; and &lt;FONT color=#0000ff&gt;&lt;STRONG&gt;IInstanceContextProvider.Initialize&lt;/STRONG&gt;&lt;/FONT&gt;. Both these methods are called whenever a new InstanceContext is created and so the question is why did IInstanceContextProvider duplicate this method?&lt;/P&gt;
&lt;P&gt;Let me talk about why this method was introduced in IInstanceContextProvider. To implement sharing users need to know when a new InstanceContext is created so they can wire up the caching logic. So if we did&amp;nbsp; not provide this API, users would need to implement IInstanceContextInitializer just to get this notification. Also, for sharing one needs to associate the Channel on which the message came with the InstanceContext created so that the InstanceContext lives till that Channel is functional. One look at the IInstanceContextInitializer.Initialize parameters tells us that it currently doesnt pass the Channel. So one possible solution is &amp;nbsp;to change &lt;EM&gt;Initialize&lt;/EM&gt; signature. But we felt that the sharing extension should be the all that the users need to worry about when designing sharing and the API's in that extension should be designed such that all necessary information is available to the implementor. So we decided to go with one interface for the extension.&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;one may wonder&amp;nbsp;that IInstanceContextInitializer is redundant and that it can be removed.&amp;nbsp;The reason its still there is because&amp;nbsp;both these interfaces are there for&amp;nbsp;two very different scenarios. Think of them like two kind of saws, one&amp;nbsp;a chain saw&amp;nbsp;and the other&amp;nbsp;a low power precision saw. IInstanceContextProvider is the heavy duty one which lets you bypass InstanceContext &lt;STRONG&gt;lifetime logic&lt;/STRONG&gt;, enable &lt;STRONG&gt;sharing&lt;/STRONG&gt; and InstanceContext &lt;STRONG&gt;leasing&lt;/STRONG&gt;, while IInstanceContextInitializer is for more finer things like &lt;STRONG&gt;adding extensions&lt;/STRONG&gt; to newly created InstanceContext.&lt;/P&gt;
&lt;P&gt;Also, your service can have exactly one IInstanceContextProvider while it can have any number of IInstanceContextInitializer's. &lt;/P&gt;
&lt;P&gt;Maheshwar Jayaraman[WCF]&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=668859" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item><item><title>WinFx June CTP: ServiceThrottle changes</title><link>http://blogs.msdn.com/mahjayar/archive/2006/07/08/660322.aspx</link><pubDate>Sun, 09 Jul 2006 04:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:660322</guid><dc:creator>Mahjayar</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mahjayar/comments/660322.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mahjayar/commentrss.aspx?PostID=660322</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mahjayar/rsscomments.aspx?PostID=660322</wfw:comment><description>&lt;P&gt;Users will find 2 changes in ServiceThrottle and ServiceThrottlingBehavior classes in WinFx's JuneCTP. First is a Property name change and second is the change to some of the default values.&lt;/P&gt;
&lt;P&gt;1. Name changes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MaxConnections renamed to MaxConcurrentSessions&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MaxInstances renamed to MaxConcurrentInstances&lt;/P&gt;
&lt;P&gt;2. Default values&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MaxConcurrentSessions default reduced to 10 (Old value was 64)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MaxConcurrentCalls default reduced to 16 (Old value was 64)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The names have been changed to reflect their actual purpose and we feel is a step in the right direction. In previous CTP's when a ServiceHost&amp;nbsp;was created, then that serivce by default only throttled &lt;STRONG&gt;MaxConcurrentCalls&lt;/STRONG&gt;. With June CTP, the ServiceHost throttles &lt;STRONG&gt;MaxConcurrentCalls&lt;/STRONG&gt; and &lt;STRONG&gt;MaxConcurrentSessions&lt;/STRONG&gt;. This means that if you dont change the throttle values then your service cannot process more than 10 concurrent sessions.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;To make debugging easier, we log (Logging is done at Information level) whenever the runtime pauses processing of a Message if it is unable to acquire any throttle. To prevent polluting the log with repetitive info, logging is done only when the throttling limit is exceeded by 1. &lt;/P&gt;
&lt;P&gt;Maheshwar Jayaraman [WCF]&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Update&lt;/STRONG&gt;: Corrected the text in the last but one paragraph to suggest 10 concurrent sessions as opposed to 10 sessions.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=660322" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mahjayar/archive/tags/WCF+_2800_Indigo_2900_/default.aspx">WCF (Indigo)</category></item></channel></rss>