<?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>Well...it works on my machine!</title><link>http://blogs.msdn.com/b/ryberry/</link><description>Working to solve all the world&amp;#39;s technical and developer oriented problems</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Scaling Tasks Horizontally Across multiple nodes using the Task Parallel Library in .NET 4.5</title><link>http://blogs.msdn.com/b/ryberry/archive/2013/02/12/scaling-tasks-horizontally-across-multiple-nodes-using-the-task-parallel-library-in-net-4-5.aspx</link><pubDate>Tue, 12 Feb 2013 15:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10392972</guid><dc:creator>Ryan Berry</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ryberry/rsscomments.aspx?WeblogPostID=10392972</wfw:commentRss><comments>http://blogs.msdn.com/b/ryberry/archive/2013/02/12/scaling-tasks-horizontally-across-multiple-nodes-using-the-task-parallel-library-in-net-4-5.aspx#comments</comments><description>&lt;p&gt;Super computers and parallel processing have long been a complex topic to address in Computer Science.&amp;nbsp;Practical applications of these algorithms typically involve massive datasets that can be easily broken down and distributed across many computational nodes (such as the &lt;a href="http://en.wikipedia.org/wiki/Blue_Gene"&gt;IBM Blue Gene&lt;/a&gt; supercomputer).&amp;nbsp; Workloads that are good candidates for parallelization are scientific data analysis such as genetic/genome mapping or commercial applications such as &lt;a href="http://en.wikipedia.org/wiki/Renderman"&gt;rendering ray-traced views for motion pictures&lt;/a&gt;.&amp;nbsp; Most of the customers I work with are in the Enterprise space but occasionally there are needs for these customers to take large datasets and perform calculations to test a theory or identify a trend in data.&amp;nbsp; These customers seek an easy to use method to build and deploy these applications; often times to a set of servers that do not have common/connected memory buses and high speed links connecting nodes, traits characteristic with the clusters on the &lt;a href="http://www.top500.org/lists/2012/11/"&gt;top-10 list&lt;/a&gt;&amp;nbsp;of supercomputers in the world.&lt;/p&gt;
&lt;p&gt;While on paper one would hope for a direct linear increase in performance if you break a complex task across N physical nodes, there are theoretical limits involving the overhead of breaking work apart, physical properties of electrons and the size of the dataset being evaluated by a given application.&amp;nbsp; There are models one can use to identify the potential speed-up of a given task described by &lt;a href="http://en.wikipedia.org/wiki/Amdahl%27s_law"&gt;Amdahl&amp;rsquo;s Law&lt;/a&gt; involving a calculation based on the relationship of serial vs. parallel components of the computational algorithm used.&amp;nbsp; &lt;a href="http://en.wikipedia.org/wiki/Gustafson%27s_law"&gt;Gustafson&amp;rsquo;s law&lt;/a&gt; picks up on Amdahl&amp;rsquo;s law to prove that, with larger sized data sets and larger compute clusters, more work can be performed in the same amount of time as a smaller dataset on smaller clusters.&lt;/p&gt;
&lt;p&gt;Theory aside, my colleague came up with a brilliant and simplistic solution for partitioning work across physical nodes using the &lt;a href="http://msdn.microsoft.com/en-us/library/dd460717.aspx"&gt;Task Parallel Library&lt;/a&gt; (TPL) in .NET 4.5. &amp;nbsp;Check out the&amp;nbsp;details of the solution and download the code sample from the &lt;a title="October 2012 issue of MSDN magazine." href="http://msdn.microsoft.com/en-us/magazine/jj658970.aspx" target="_blank"&gt;October 2012 issue of MSDN magazine&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10392972" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ryberry/archive/tags/WCF/">WCF</category><category domain="http://blogs.msdn.com/b/ryberry/archive/tags/ASP-NET/">ASP.NET</category></item><item><title>Cluttered Desktop?  Try this!</title><link>http://blogs.msdn.com/b/ryberry/archive/2011/11/14/cluttered-desktop-try-this.aspx</link><pubDate>Mon, 14 Nov 2011 15:47:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10236826</guid><dc:creator>Ryan Berry</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ryberry/rsscomments.aspx?WeblogPostID=10236826</wfw:commentRss><comments>http://blogs.msdn.com/b/ryberry/archive/2011/11/14/cluttered-desktop-try-this.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Background:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’m not usually one to endorse products; but I have to admit that I’ve fallen into the category of users who tend to drop files ‘to-look-at-later’ onto my desktop.&amp;#160; [Side-note: This is an extremely in-efficient means of organization and things tend to get lost in the weeds if you don’t regularly circle back and address what you’ve placed onto your desktop.]&amp;#160;&amp;#160; In looking for some tools to help bring organization to this black-hole I stumbled across a tool from StarDock called &lt;a href="http://www.stardock.com/products/fences/index.asp" target="_blank"&gt;Fences&lt;/a&gt; that works with both Windows 7 and Vista.&amp;#160; This tool allows you to create ‘ring fences’ around groups of files/icons on your desktop bringing order to a world of chaos and confusion.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-21-82-metablogapi/2671.image_5F00_309DB87D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-21-82-metablogapi/1682.image_5F00_thumb_5F00_455F8B30.png" width="624" height="353" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;All ‘fences’ active – double clicking the desktop makes me look organized and neat to the untrained eye!&amp;#160; (And a subsequent double-click brings my fences back.)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-21-82-metablogapi/0020.image_5F00_38853512.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-21-82-metablogapi/3240.image_5F00_thumb_5F00_26E5247A.png" width="630" height="356" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10236826" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ryberry/archive/tags/Windows+7/">Windows 7</category></item><item><title>SharePoint: The Case of the Disappearing Terms from a Managed Metadata Column</title><link>http://blogs.msdn.com/b/ryberry/archive/2011/11/10/sharepoint-the-case-of-the-disappearing-terms-from-a-managed-metadata-column.aspx</link><pubDate>Thu, 10 Nov 2011 16:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10235844</guid><dc:creator>Ryan Berry</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ryberry/rsscomments.aspx?WeblogPostID=10235844</wfw:commentRss><comments>http://blogs.msdn.com/b/ryberry/archive/2011/11/10/sharepoint-the-case-of-the-disappearing-terms-from-a-managed-metadata-column.aspx#comments</comments><description>&lt;p&gt;&amp;nbsp;&lt;span style="font-size: x-small;" size="2"&gt;I was working with a customer who had a tag used for associating a specific document with a geography/region as shown in the image below.&amp;nbsp; &lt;a href="http://office.microsoft.com/en-us/sharepoint-server-help/introduction-to-managed-metadata-in-sharepoint-server-2010-HA101859256.aspx" target="_blank"&gt;Managed metadata columns&lt;/a&gt; are a feature in SharePoint 2010 permitting you to add specialized/pre-defined term sets to a particular content type.&amp;nbsp; In my customer&amp;rsquo;s case, they had a document library with a Geography column.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-21-82-metablogapi/1307.image_5F00_0792BE47.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-21-82-metablogapi/5001.image_5F00_thumb_5F00_46843EE2.png" width="850" height="92" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;" size="2"&gt;Elevated users could add documents, specifying a value for the Geography field without issue.&amp;nbsp; &amp;lsquo;Normal&amp;rsquo; (Non-site admin) users could also specify a value and save a document to the library without error; however, the&lt;/span&gt; field would not be populated with a value upon saving the document.&amp;nbsp; (The managed metadata column would simply be blank.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="text-decoration: underline;"&gt;Issue&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;" size="2"&gt;The hidden taxonomy list (accessible via the following url: &lt;strong&gt;&lt;em&gt;&lt;a href="http://&lt;sitecollectionURL&gt;/lists/taxonomyhiddenlist"&gt;http://&amp;lt;sitecollectionURL&amp;gt;/lists/taxonomyhiddenlist&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;) had been modified by some automated tools ran in the customer&amp;rsquo;s environment and had removed authenticated users from this list; hence the reason why site-admins were able to properly add records but domain user&amp;rsquo;s could not.&amp;nbsp; Adding nt authority\authenticated users back into this hidden list resolved the problem.&amp;nbsp; Hopefully this saves you some pain in tracking down this problem if you&amp;rsquo;re impacted by it!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-21-82-metablogapi/4118.image_5F00_65C6E5B5.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-21-82-metablogapi/3441.image_5F00_thumb_5F00_7DEA5010.png" width="500" height="279" /&gt;&amp;nbsp;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10235844" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ryberry/archive/tags/SharePoint/">SharePoint</category></item><item><title>SharePoint: Batch updating items in a list with content approval enabled</title><link>http://blogs.msdn.com/b/ryberry/archive/2010/05/06/sharepoint-batch-updating-items-in-a-list-with-content-approval-enabled.aspx</link><pubDate>Thu, 06 May 2010 13:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10008455</guid><dc:creator>Ryan Berry</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ryberry/rsscomments.aspx?WeblogPostID=10008455</wfw:commentRss><comments>http://blogs.msdn.com/b/ryberry/archive/2010/05/06/sharepoint-batch-updating-items-in-a-list-with-content-approval-enabled.aspx#comments</comments><description>&lt;P&gt;&lt;STRONG&gt;Details&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I was recently looking for a way to batch update items in a list that had “Require Content approval” (see Figure 1 below) enabled.&amp;nbsp; My requirement was that, after updating the item, it would be in an approved and not be placed into a pending status.&amp;nbsp; After doing some digging I was able to find the required command (&amp;lt;SetVar Name=”Cmd”&amp;gt;Moderate&amp;lt;/SetVar&amp;gt;) that allowed this to work.&amp;nbsp; I’ve included a very simple test program below that updates the title field in a list and sets it to approved status (_ModerationStatus==0).&amp;nbsp; You can also assign other status values based on the enum &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spmoderationstatustype.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spmoderationstatustype.aspx"&gt;SPModerationStatusType&lt;/A&gt; (values listed below).&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;public enum &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spmoderationstatustype.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spmoderationstatustype.aspx"&gt;SPModerationStatusType&lt;/A&gt; &lt;BR&gt;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Summary: &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The item is displayed in public views of the list or document library. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Approved = 0, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Summary: &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The item is not displayed in public views of the list or document library. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Denied = 1, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Summary: &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The decision about displaying the item in public views of the list or document &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; library is pending. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pending = 2, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Draft = 3, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Scheduled = 4, &lt;BR&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/SharePointBatchupdatingitemsinalistwithc_8131/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/SharePointBatchupdatingitemsinalistwithc_8131/image_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-TOP: 0px; MARGIN-RIGHT: auto; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/SharePointBatchupdatingitemsinalistwithc_8131/image_thumb.png" width=564 height=132 mce_src="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/SharePointBatchupdatingitemsinalistwithc_8131/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P align=center&gt;&lt;STRONG&gt;Figure 1 – Content Approval Option&lt;/STRONG&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;STRONG&gt;Code Sample (sans adequate error checking) that ‘batch-updates’ a single item&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;static void Main(string[] args) &lt;BR&gt;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StringBuilder methodBuilder = new StringBuilder(); &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string batch = string.Empty; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string batchFormat = "&amp;lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&amp;gt;" + &lt;BR&gt;&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;lt;ows:Batch OnError=\"Return\"&amp;gt;{0}&amp;lt;/ows:Batch&amp;gt;"; &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string methodFormat = "&amp;lt;Method ID=\"{0},Update\"&amp;gt;" + &lt;BR&gt;&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;lt;SetList&amp;gt;{1}&amp;lt;/SetList&amp;gt;" + &lt;BR&gt;&lt;/EM&gt;&lt;EM&gt;&lt;STRONG&gt;&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;lt;SetVar Name=\"Cmd\"&amp;gt;Moderate&amp;lt;/SetVar&amp;gt;" + &lt;BR&gt;&lt;/STRONG&gt;&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;lt;SetVar Name=\"ID\"&amp;gt;{2}&amp;lt;/SetVar&amp;gt;" + &lt;BR&gt;&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;lt;SetVar Name=\"urn:schemas-microsoft-com:office:office#Title\"&amp;gt;{3}&amp;lt;/SetVar&amp;gt;" + &lt;BR&gt;&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;lt;SetVar Name=\"urn:schemas-microsoft-com:office:office#_ModerationStatus\"&amp;gt;0&amp;lt;/SetVar&amp;gt;" +&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&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;lt;/Method&amp;gt;"; &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (SPSite site = new SPSite("&lt;/EM&gt;&lt;A href="http://moss.litwareinc.com/sites/aspnet%22))" mce_href='http://moss.litwareinc.com/sites/aspnet"))'&gt;&lt;EM&gt;http://moss.litwareinc.com/sites/aspnet"))&lt;/EM&gt;&lt;/A&gt; &lt;BR&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;BR&gt;&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; using (SPWeb sourceWeb = site.OpenWeb()) &lt;BR&gt;&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; { &lt;BR&gt;&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; try &lt;BR&gt;&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; { &lt;BR&gt;&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;&amp;nbsp; int itemID = 1; &lt;BR&gt;&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;&amp;nbsp; SPList list = sourceWeb.Lists["TestList"]; &lt;BR&gt;&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;&amp;nbsp; sourceWeb.AllowUnsafeUpdates = true; &lt;BR&gt;&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;&amp;nbsp; string listGuid = list.ID.ToString(); &lt;BR&gt;&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;&amp;nbsp; methodFormat = string.Format(methodFormat, itemID, listGuid, itemID,"SomeValue1a1aa"); &lt;BR&gt;&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;&amp;nbsp; batch = string.Format(batchFormat, methodFormat.ToString()); &lt;BR&gt;&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;&amp;nbsp; string batchReturn = sourceWeb.ProcessBatchData(batch); &lt;BR&gt;&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; } &lt;BR&gt;&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; catch (Exception oEx) &lt;BR&gt;&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; { &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&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; // End exception block &lt;BR&gt;&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; } // End using spweb &lt;BR&gt;&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; // End using SPSite&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;} // End Main&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10008455" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ryberry/archive/tags/ASP-NET/">ASP.NET</category><category domain="http://blogs.msdn.com/b/ryberry/archive/tags/SharePoint/">SharePoint</category></item><item><title>Transferring large blobs of data with WCF</title><link>http://blogs.msdn.com/b/ryberry/archive/2010/04/20/transferring-large-blogs-of-data-with-wcf.aspx</link><pubDate>Tue, 20 Apr 2010 17:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9804355</guid><dc:creator>Ryan Berry</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ryberry/rsscomments.aspx?WeblogPostID=9804355</wfw:commentRss><comments>http://blogs.msdn.com/b/ryberry/archive/2010/04/20/transferring-large-blogs-of-data-with-wcf.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Series Introduction&lt;/strong&gt;     &lt;br /&gt;Since Windows Communication Foundation’s (WCF) introduction with the .NET Framework 3.0, developers have quickly realized the potential and power available with WCF while overall reducing the net amount of code one has to write and support to allow applications to communicate.&amp;#160; Since connected systems are a strong driver to reduce costs and improve efficiencies with critical business systems; many organizations are making investments in service orientation.&amp;#160; WCF introduces many standards compliant methods to ‘configure’ applications to communicate via protocols that, in the past, required developer expertise with specific API ‘stacks’ that provided the requisite service features.&amp;#160; (E.g. ASP.NET web services (ASMX), Web Services Enhancements (WSE), System.Messaging (for MSMQ), Enterprise Services (for transactional behavior) and .NET Remoting.) WCF serves to break down the impendence mismatch across these various communication technologies to allow developers to work with a unified programming model (System.ServiceModel) that permits configuration-based service orientation simply by defining the communication characteristics in the client and server’s app.config file.&amp;#160;&amp;#160; With so many configuration options available to select from, it can be overwhelming to decide an appropriate binding configuration that provides the services and performance desired for specific application’s needs.&amp;#160; This series will attempt to provide concrete, real-world examples of some of the advanced features and characteristics of WCF to make this selection process as easy as ordering off your favorite fast food menu. &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;This series assumes a basic understanding of WCF fundamentals and will provide specific usage scenarios for different WCF addresses, bindings and contracts. (Many articles already exist on this topic including one &lt;a href="http://msdn.microsoft.com/en-us/library/aa480190.aspx" target="_blank"&gt;here&lt;/a&gt;.&amp;#160; Additional information may be found &lt;a href="http://msdn.microsoft.com/en-us/netframework/aa663324.aspx" target="_blank"&gt;here&lt;/a&gt; and in Justin Smith’s &lt;em&gt;&lt;u&gt;&lt;a href="http://www.microsoft.com/learning/en/us/book.aspx?ID=9610&amp;amp;locale=en-us" target="_blank"&gt;Inside Windows® Communication Foundation&lt;/a&gt;&lt;/u&gt;&lt;/em&gt;.) &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;Streaming data with WCF&lt;/strong&gt;     &lt;br /&gt;There may be instances where you need to transfer multi-megabyte files or blocks of data from your service to a consumer.&amp;#160; While you could have a method that returns a stream or byte array defined in your service contract, there are some potential memory implications this could introduce to your host process.&amp;#160; When a block of memory is allocated within a managed process that exceeds 85,000 bytes in size, the CLR performs this allocation in a special region called the Large Object Heap. (LOH – Details can be found &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc534993.aspx" target="_blank"&gt;here&lt;/a&gt;.)&amp;#160; Large, short-lived allocations in the LOH can lead to unexpected memory consumption of your host process since this heap is only collected during a Gen-2 garbage collection (that occurs less frequently).&amp;#160; This consumption of memory may also lead to a premature Out-of-Memory (OOM) exception within your host process since the LOH is not currently compacted (as of the 2.0 CLR) if there is not a large enough contiguous free-region within the process’s memory space to fulfill the allocation request.&amp;#160; These sorts of problems typically don’t arise until your place your WCF host under extreme load and sometimes, unfortunately, surface once the application is in production.&amp;#160; (This further underscores the importance of executing appropriate test plans!)&amp;#160; Luckily, there are a couple of options available to mitigate this problem.&amp;#160; One option is to take advantage of the streaming option available with the BasicHttpBinding, NetTcpBinding, and NetNamedPipeBinding; while another is to allow consumers to request chunks of data that is smaller than the 85,000 LOH threshold.&amp;#160; In this posting, we’ll look at both. &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Configuration &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Project setup:      &lt;br /&gt;&lt;/strong&gt;The solution contains 4 projects (See Figure 1) to demonstrate large-data transfers using WCF.&amp;#160; The service contract is defined in the SharedInterface project that is referenced by both the client and the service implementation.&amp;#160; The actual service implementation is in the ServiceImpl project and the client, capable of illustrating all 3 methods of requesting data,&amp;#160; is in the FormsClient project.&amp;#160;&amp;#160; The server project is a simple console application you can use to run the solution outside of the IDE.&amp;#160; (The implementation is separated from the sample host process so we can leverage the built-in WCF host within Visual Studio 2008.) &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;strong&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/TransferringlargeblogsofdatawithWCF_FC1B/wcf_stream_fig1_2.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="wcf_stream_fig1" border="0" alt="wcf_stream_fig1" src="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/TransferringlargeblogsofdatawithWCF_FC1B/wcf_stream_fig1_thumb.png" width="170" height="104" /&gt;&lt;/a&gt; &lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="center"&gt;&lt;strong&gt;Figure 1 – Project Layout&lt;/strong&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;   &lt;br /&gt;To start with, we’ll define our service contract to have to two call-options.&amp;#160; One returning a stream while the other returns chunks of data.&amp;#160; The ‘chunking’ method is an alternative means of returning data to a consumer through a series of multiple calls where the consumer tracks its progress through the bytes of the file.&amp;#160; This method returns a struct with the total file size as well as the requested byte region from the file and is declared in the SharedInterface. &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;font color="#000080"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;DataContract&lt;/span&gt;] &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;struct&lt;/span&gt; &lt;span style="color: #2b91af"&gt;ChunkedDataResult &lt;/span&gt;&lt;/span&gt;    &lt;p&gt;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;DataMember&lt;/span&gt;] &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;byte&lt;/span&gt;[] ChunkedBlock; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;DataMember&lt;/span&gt;] &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;long&lt;/span&gt; StreamSize; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Then, we configure our bindings.&amp;#160; In this example, I have defined 1 binding to stream the response defined as follows and another to use the (default) buffered transfermode.&amp;#160; Both endpoints have relative addresses (Streaming and Buffered) that are rooted on the port and service name described by the baseaddress setting.     &lt;br /&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;system.serviceModel&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;bindings&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;basicHttpBinding&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;binding&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;name&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;StreamedBinding&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;messageEncoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Mtom&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;transferMode&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Streamed&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160; &lt;/span&gt;/&amp;gt; &lt;/span&gt;&lt;/span&gt;    &lt;p&gt;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;binding&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;name&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;BufferedBinding&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;messageEncoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Mtom&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;transferMode&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Buffered&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; /&amp;gt; &lt;/span&gt;&lt;/span&gt;    &lt;p&gt;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;basicHttpBinding&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;bindings&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;services&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;service&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;behaviorConfiguration&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;WcfServiceLibrary1.Service1Behavior&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-tab-count: 3"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;name&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;WCFSamples.ServiceImpl&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;endpoint&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;binding&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;basicHttpBinding&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;bindingConfiguration&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;StreamedBinding&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-tab-count: 4"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;name&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;WCFSamples_Streamed&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;contract&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;WCFSamples.IStreamingService&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;address&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;Streaming&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;endpoint&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;endpoint&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;address&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt; =&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;Buffered&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-tab-count: 4"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;binding&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;basicHttpBinding&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;bindingConfiguration&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;BufferedBinding&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-tab-count: 4"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;name&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;WCFSamples_Buffered&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;contract&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;WCFSamples.IStreamingService&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;endpoint&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;endpoint&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;address&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;mex&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;binding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;mexHttpBinding&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;contract&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;IMetadataExchange&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-tab-count: 4"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;listenUriMode&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;Explicit&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;    &lt;p&gt;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;endpoint&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;host&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;baseAddresses&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;add&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;baseAddress&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;http://localhost:8500/WCFSamples&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; /&amp;gt; &lt;/span&gt;&lt;/span&gt;    &lt;p&gt;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;baseAddresses&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;host&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The key components of this binding is the transferMode option.&amp;#160; For our streamed tests, we set it to &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.transfermode.aspx" target="_blank"&gt;StreadmedResponse&lt;/a&gt;.&amp;#160; When using this transfermode (that, again, is available with the basicHttpBinding&amp;#160; in addition to the TCP and NamedPipe bindings) within the context of a web application hosted in either IIS, there are a couple of considerations to keep in mind: &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;1)&amp;#160;&amp;#160;&amp;#160;&amp;#160; Visual Studio’s&amp;#160; webdev server (Cassini) cannot handle streaming over HTTP.&amp;#160;&amp;#160; For testing, you need to host in a console application or through the WCF host utility.&amp;#160; (As I have done in the sample).     &lt;br /&gt;2)&amp;#160;&amp;#160;&amp;#160;&amp;#160; IIS uses the ASP.NET &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.maxrequestlength.aspx" target="_blank"&gt;maxRequestLength&lt;/a&gt; setting for the max length not the setting defined WCF setting.&amp;#160;&amp;#160; You will need to add this to your web.config to ensure IIS is able to return the data requested.     &lt;br /&gt;3)&amp;#160;&amp;#160;&amp;#160; IIS cannot transfer more than 2GB of data. You'll need to self host to get around this if you need to send more data than that.     &lt;br /&gt;4)&amp;#160;&amp;#160;&amp;#160; To avoid timeouts, you will need to increase the receive timeouts on the client (as I have done in the FormsClient’s configuration shown below.&amp;#160; Note the extended recieveTimeouts in addition to both the increased maxBuffersize and maxRecievedMessageSize). &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;binding&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;name&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;WCFSamples_Buffered&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;closeTimeout&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;00:01:00&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;openTimeout&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;00:01:00&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;receiveTimeout&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;00:10:00&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;sendTimeout&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;00:01:00&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;allowCookies&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;false&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;bypassProxyOnLocal&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;false&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;hostNameComparisonMode&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;StrongWildcard&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;maxBufferSize&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;2097152&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;maxBufferPoolSize&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;524288&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;maxReceivedMessageSize&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;2097152&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;messageEncoding&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;Mtom&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;textEncoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;transferMode&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Buffered&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;useDefaultWebProxy&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;true&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;    &lt;p&gt;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 8pt; mso-no-proof: yes"&gt;readerQuotas&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;maxDepth&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;32&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;maxStringContentLength&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;8192&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;maxArrayLength&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;65536&lt;/span&gt;&amp;quot; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 8pt; mso-no-proof: yes"&gt;maxBytesPerRead&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 8pt; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 8pt; mso-no-proof: yes"&gt;&amp;quot;&lt;span style="color: blue"&gt;4096&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;maxNameTableCharCount&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;16384&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; /&amp;gt; &lt;/span&gt;&lt;/span&gt;    &lt;p&gt;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Evidence    &lt;br /&gt;Using the &lt;a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" target="_blank"&gt;Debugging tools for Windows®&lt;/a&gt;; I collected some memory dumps of the host process to illustrate the allocations that occur when one of our images is sent to a consumer using the buffered transfer mode.&amp;#160; (While collecting a memory dump is outside the scope of this article, the command I used to collect a dump is: adplus –quiet –hang –pn server.exe.&amp;#160; Adplus is a VB Script&amp;#160; that is located in the installation directory of the Debugging tools. )&amp;#160; Upon inspection (See Figure 2), we can clearly see the large byte-array allocations within the LOH. &lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/TransferringlargeblogsofdatawithWCF_FC1B/buffered_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="buffered" border="0" alt="buffered" src="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/TransferringlargeblogsofdatawithWCF_FC1B/buffered_thumb.png" width="307" height="222" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 2 – Allocations that occur when transferMode = Buffered &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When we examine the LOH (See figure 3) when transferMode=Streaming (or StreamedResponse); we can see that there are no large byte array allocations that occur to ‘buffer’ the data for the client.&amp;#160; (The object arrays are pinned regions of memory not related to the buffering of data from what I can tell.)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/TransferringlargeblogsofdatawithWCF_FC1B/streamed_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="streamed" border="0" alt="streamed" src="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/TransferringlargeblogsofdatawithWCF_FC1B/streamed_thumb.png" width="425" height="167" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;strong&gt;Figure 3 – Allocations that occur when transferMode = Streaming/StreamedResponse &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;With our ‘chunked’ transfer mode, we also see that these LOH allocations disappear (See figure 4) and we instead see many smaller allocations that are slightly larger than our 65,535 byte block-size we defined in our server implementation.&amp;#160; (The additional bytes are overhead with the WCF message.)&amp;#160; These blocks are controlled by the following line in our service contract implementation.&amp;#160; (StreamingImplementation.cs). &lt;/p&gt;  &lt;p&gt;private const int BLOCKSIZE = 65535; &lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/TransferringlargeblogsofdatawithWCF_FC1B/chunking_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="chunking" border="0" alt="chunking" src="http://blogs.msdn.com/blogfiles/ryberry/WindowsLiveWriter/TransferringlargeblogsofdatawithWCF_FC1B/chunking_thumb.png" width="423" height="372" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 4 – Allocations that occur with our ‘chunking’ solution &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;While this article presented a configuration-based solution and an application-implemented solution; one could also leverage WCF’s many extensibility points to develop a channel that behaved similarly to&amp;#160; ‘chunked’ receive method shown above.&amp;#160; There’s a great starting point of such a solution &lt;a href="http://msdn.microsoft.com/en-us/library/aa717050.aspx" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The code examples used for this solution can be downloaded from &lt;a href="http://cid-68cfe4807d399367.skydrive.live.com/browse.aspx/BlogPosts" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9804355" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ryberry/archive/tags/WCF/">WCF</category><category domain="http://blogs.msdn.com/b/ryberry/archive/tags/ASP-NET/">ASP.NET</category></item></channel></rss>