<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://bloggingabout.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Jeffrey Chilberto</title><subtitle type="html">.Net Developer</subtitle><id>http://bloggingabout.net/blogs/chilberto/atom.aspx</id><link rel="alternate" type="text/html" href="http://bloggingabout.net/blogs/chilberto/default.aspx" /><link rel="self" type="application/atom+xml" href="http://bloggingabout.net/blogs/chilberto/atom.aspx" /><generator uri="http://communityserver.org" version="4.1.40407.4157">Community Server</generator><updated>2008-11-14T14:26:48Z</updated><entry><title>Business Rules Engine: Samples</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2009/11/21/business-rules-engine-samples.aspx" /><id>/blogs/chilberto/archive/2009/11/21/business-rules-engine-samples.aspx</id><published>2009-11-21T07:18:55Z</published><updated>2009-11-21T07:18:55Z</updated><content type="html">&lt;p&gt;I recently presented at the &lt;a href="http://www.acsug.co.nz/Meetings/Practical-exploration-of-the-Business-Rules-Engine.aspx" target="_blank"&gt;Auckland Connected Systems User Group&lt;/a&gt;.&amp;#160; In order to prepare, I created several examples of methods of using the rules engine.&amp;#160; &lt;/p&gt;  &lt;p&gt;The sample solution is &lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.BRE/3286.ACSUG.BusinessRulesEngine.zip"&gt;here&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;Included in the sample solution are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Various Vocabulary definitions including using a function in XPath Field (TotalCostOfOrder)&lt;/li&gt;    &lt;li&gt;Various Rules definitions including retrieving from a database, using classes, adding XML Nodes to a document, forward chaining and priority&lt;/li&gt;    &lt;li&gt;Examples implementations of IFactRetriever&lt;/li&gt;    &lt;li&gt;BizTalk Application showing calling rules with both XML Document and objects&lt;/li&gt;    &lt;li&gt;BizTalk Application showing an example of using the BRE for routing&lt;/li&gt;    &lt;li&gt;A WCF Service and Client including an example tracking interceptor&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The WCF Service was my focus of the talk and what I wanted to discuss most of all.&amp;#160; I have found using the BRE very beneficial and now that I have spent time understanding it, I believe it helps to make more maintainable solutions by separating the business rules from the application framework.&amp;#160; This allows for the business logic to more accessible and readable than embedded in BizTalk expressions, maps or custom classes.&amp;#160; &lt;/p&gt;  &lt;p&gt;Because of this I wanted to illustrate how a WCF service could be strongly typed but not require costly rebuilds when the facts or rules change.&amp;#160; Though I believe strongly in SOA, I am not a fan of the un-typed XML in/XML out design.&amp;#160; To achieve this, I took advantage of the KnownTypes attribute to allow WCF to serialize the payloads and to present metadata.&amp;#160; In the example service, the specific classes are retrieved from the web.config, but there is not any reason why this could not have been retrieved from a more dynamic resource.&lt;/p&gt;  &lt;p&gt;Cheers and feedback appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=482490" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="WCF" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/WCF/default.aspx" /><category term="Architecture" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Architecture/default.aspx" /><category term="BizTalk" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/BizTalk/default.aspx" /><category term="SOA Architecture" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/SOA+Architecture/default.aspx" /><category term="BRE" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/BRE/default.aspx" /><category term="Business Rules Engine" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Business+Rules+Engine/default.aspx" /></entry><entry><title>ACSUG Meeting Thursday November 19th - A Practical exploration of the Business Rules Engine in BizTalk Server</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2009/11/16/acsug-meeting-thursday-november-19th-a-practical-exploration-of-the-business-rules-engine-in-biztalk-server.aspx" /><id>/blogs/chilberto/archive/2009/11/16/acsug-meeting-thursday-november-19th-a-practical-exploration-of-the-business-rules-engine-in-biztalk-server.aspx</id><published>2009-11-16T07:42:00Z</published><updated>2009-11-16T07:42:00Z</updated><content type="html">&lt;p&gt;I decided it was about time I presented something at the &lt;a target="_self" href="http://connectedthoughts.wordpress.com/2009/11/02/acsug-meeting-thursday-november-19-a-practical-exploration-of-the-business-rules-engine-in-biztalk-server-with-jeffrey-chilberto/" title="Auckland Connected Users Group"&gt;Auckland Connected User Group&lt;/a&gt;&amp;hellip;&lt;/p&gt;
&lt;p&gt;Recently I have been involved with two projects where the Business Rules Engine was exposed as a WCF web service.&amp;nbsp; Though this is the basis for the presentation, most of the examples will be applicable to using the BRE within BizTalk or externally.&lt;/p&gt;
&lt;p&gt;Slides and examples to follow when ready&amp;hellip; I better get to work on them&amp;hellip;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=482469" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="WCF" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/WCF/default.aspx" /><category term="BizTalk" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/BizTalk/default.aspx" /><category term="BRE" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/BRE/default.aspx" /><category term="Business Rules Engine" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Business+Rules+Engine/default.aspx" /></entry><entry><title>Movember</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2009/11/16/movember.aspx" /><id>/blogs/chilberto/archive/2009/11/16/movember.aspx</id><published>2009-11-16T07:32:17Z</published><updated>2009-11-16T07:32:17Z</updated><content type="html">&lt;p&gt;I am growing a moustache for Movember to join the fight against prostate cancer and men&amp;#39;s depression. Please give so that my Mo may grow: &lt;a href="http://nz.movember.com/mospace/187663/"&gt;http://nz.movember.com/mospace/187663/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=482468" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author></entry><entry><title>Force NTLM protocol instead of Kerberos in IIS</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2009/07/03/force-ntlm-protocol-instead-of-kerberos-in-iis.aspx" /><id>/blogs/chilberto/archive/2009/07/03/force-ntlm-protocol-instead-of-kerberos-in-iis.aspx</id><published>2009-07-03T04:06:00Z</published><updated>2009-07-03T04:06:00Z</updated><content type="html">&lt;p&gt;Recently I deployed a WCF service using NTLM transport authentication.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.metablogapi/7776.image_5F00_7F5B69C8.png"&gt;&lt;img height="123" width="405" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.metablogapi/5633.image_5F00_thumb_5F00_5D8F9137.png" alt="image" border="0" title="image" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;An issue arose when calling the service from a remote server where Kerberos authentication was not working correctly.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.metablogapi/8475.image_5F00_3AEB52BC.png"&gt;&lt;img height="452" width="407" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.metablogapi/0243.image_5F00_thumb_5F00_4AAAE7C0.png" alt="image" border="0" title="image" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;After contacting the infrastructure team, I was informed to use NTLM and not Kerberos as the authentication provider.&lt;/p&gt;
&lt;p&gt;By default, IIS uses Kerberos and NTLM for network authentication.&amp;nbsp; It will choose to use Kerberos if the client is thought to support Kerberos as in this case.&amp;nbsp; To force IIS to use NTLM only is relatively simple.&lt;/p&gt;
&lt;p&gt;First, open IIS to determine the website identify.&amp;nbsp; This can be done by navigating to the Websites folder:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.metablogapi/5482.image_5F00_78D4BDAD.png"&gt;&lt;img height="131" width="417" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.metablogapi/7433.image_5F00_thumb_5F00_7E330884.png" alt="image" border="0" title="image" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The adsutil.vbs admin script can be used to set the authentication provider.&amp;nbsp; The screenshot below illustrates:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.metablogapi/5224.image_5F00_1B58B08F.png"&gt;&lt;img height="222" width="455" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.metablogapi/7028.image_5F00_thumb_5F00_77DC0C29.png" alt="image" border="0" title="image" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Also, different virtual folders can have different NTAuthenticationProviders settings.&amp;nbsp; For example, if the virtual folder &amp;ldquo;HelloWorld&amp;rdquo; was to be modified only, the command would be: &lt;/p&gt;
&lt;p&gt;C:\&amp;gt;cscript c:\inetpub\adminscripts\adsutil.vbs //nologo SET &amp;quot;W3SVC/1/Root/&lt;strong&gt;HelloWorld&lt;/strong&gt;/NTAuthenticationProviders&amp;quot; &amp;quot;NTLM&amp;quot;&lt;/p&gt;
&lt;p&gt;Notes:&lt;/p&gt;
&lt;p&gt;Related Knowledge Base: &lt;a href="http://support.microsoft.com/kb/215383"&gt;http://support.microsoft.com/kb/215383&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481890" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="Error" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Error/default.aspx" /><category term="WCF" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/WCF/default.aspx" /><category term="ASP.Net" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/ASP.Net/default.aspx" /><category term="IIS" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/IIS/default.aspx" /></entry><entry><title>WCF Test Harness: Release 1.2.2.0</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2009/04/01/wcf-test-harness-release-1-2-2-0.aspx" /><id>/blogs/chilberto/archive/2009/04/01/wcf-test-harness-release-1-2-2-0.aspx</id><published>2009-04-01T07:55:51Z</published><updated>2009-04-01T07:55:51Z</updated><content type="html">&lt;p&gt;A new version of the &lt;a href="http://www.codeplex.com/WCFTestHarness" target="_blank"&gt;test harness&lt;/a&gt; has been added to codeplex.&amp;#160; &lt;/p&gt;  &lt;p&gt;This release corrects some bugs and adds some new usability features (e.g., the ability to edit the client configuration via a menu item).&lt;/p&gt;  &lt;p&gt;Feedback appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481449" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="WCF" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/WCF/default.aspx" /><category term="Test Harness" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Test+Harness/default.aspx" /></entry><entry><title>WCF Test Harness: Release 1.1.1.1</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2009/02/24/wcf-test-harness-release-1-1-1-1.aspx" /><id>/blogs/chilberto/archive/2009/02/24/wcf-test-harness-release-1-1-1-1.aspx</id><published>2009-02-24T03:11:21Z</published><updated>2009-02-24T03:11:21Z</updated><content type="html">&lt;p&gt;The WCF Test Harness has been &lt;a href="http://www.codeplex.com/WCFTestHarness/Release/ProjectReleases.aspx?ReleaseId=23714" target="_blank"&gt;updated&lt;/a&gt;.&amp;nbsp; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;The previous version would fail to build the dynamic proxy for some services.&amp;nbsp; In particular BizTalk isolated host service endpoints.&amp;nbsp; The new version will still attempt to build the proxy even if warnings are encountered when downloading the metadata.&lt;/li&gt; &lt;li&gt;This version uses an untyped channel to send the requests and responses (see below).&amp;nbsp; This allows for the messages to be more easily constructed and for more flexibility (or leniency) on the receive.&amp;nbsp; As a test tool this is useful for debugging and determining when an application does not conform to the metadata.&amp;nbsp; For example, the subtle differences between Java and .Net base soap solutions.&lt;/li&gt; &lt;li&gt;DataContractSerialization is now used for building the input message.&lt;/li&gt;&lt;/ul&gt; &lt;h3&gt;Untyped Channel&lt;/h3&gt; &lt;p&gt;After a TestCase has been created that indicates the contract to call and the input, the InvokeProxyMethod method is used to call the service using an untyped channel.&amp;nbsp; By untyped, I mean conforming to the following signature:&lt;/p&gt; &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;"&gt; &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;[ServiceContract]&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;interface&lt;/span&gt; IUntypedChannel&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;{&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    [OperationContract(Action = &lt;span style="color:#006080;"&gt;&amp;quot;*&amp;quot;&lt;/span&gt;, ReplyAction = &lt;span style="color:#006080;"&gt;&amp;quot;*&amp;quot;&lt;/span&gt;)]&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    Message Post(Message content);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The following code is used to create a ContractChannelFactory&amp;lt;T&amp;gt; using reflection.&amp;nbsp; Reflection is necessary as the contract type (T) is not known until runtime.&amp;nbsp; The ContractChannelFactory is based on the ClientChannelFactory&amp;lt;T&amp;gt; from the Microsoft WCF Samples.&amp;nbsp; The main difference is it can be used to create a IUntypedChannel channel.&amp;nbsp; This can be used to post a Message based on the contract type&amp;#39;s message properties.&lt;/p&gt;
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;"&gt;
&lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; InvokeProxyMethod(TestCase test)&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;{&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; ret = &lt;span style="color:#006080;"&gt;&amp;quot;Failed to call test case...&amp;quot;&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#008000;"&gt;// determine the contract type&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    ServiceClientContract contract = _contracts[test.ContractName];&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    ClientEndpoint endpoint = contract.Endpoints[test.EndpointName];&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    Type contractType = Assemblies[test.Assembly].GetType(endpoint.Contract);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#008000;"&gt;// create the factory to generate the channel&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    Type factoryType = &lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;(ContractChannelFactory&amp;lt;&amp;gt;).MakeGenericType(contractType);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    Object factory = Activator.CreateInstance(factoryType, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;[] {test.EndpointName, contract.FileName});&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;   &lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#008000;"&gt;// create the channel&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    IUntypedChannel channel = (IUntypedChannel)factoryType.InvokeMember(&lt;span style="color:#006080;"&gt;&amp;quot;CreateUntypedChannel&amp;quot;&lt;/span&gt;, BindingFlags.Public | BindingFlags.InvokeMethod | BindingFlags.Instance, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;, factory, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;[] { test.URL });&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#008000;"&gt;// determine the action&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    MemberInfo s = contractType.GetMethod(test.Method);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;[] attributes = s.GetCustomAttributes(&lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;(OperationContractAttribute), &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (attributes.Length == 1)&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    {&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (StringReader sr = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; StringReader(test.Input))&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        {&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;// build an untyped message with the same message version, input and action&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            XmlReader xr = XmlTextReader.Create(sr);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            OperationContractAttribute attribute = (OperationContractAttribute)attributes[0];&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            MessageVersion version = (MessageVersion)factoryType.InvokeMember(&lt;span style="color:#006080;"&gt;&amp;quot;GetMessageVersion&amp;quot;&lt;/span&gt;, BindingFlags.Public | BindingFlags.InvokeMethod | BindingFlags.Instance, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;, factory, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;[] { });&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            Message request = Message.CreateMessage(version, attribute.Action, xr);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            &lt;span style="color:#008000;"&gt;// call the service&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            Message response = channel.Post(request);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            ret = response.ToString();&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            xr.Close();&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;            sr.Close();&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        }&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    }&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; ret;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;ContractChannelFactory&amp;lt;T&amp;gt;&lt;/h3&gt;
&lt;p&gt;The ContractChannelFactory&amp;lt;T&amp;gt; is used to build the ChannelFactory&amp;lt;T&amp;gt; using a supplied configuration file.&amp;nbsp; The new methods, CreateUntypedChanee() and GetMessageVersion() are used to create a channel that will send a untyped message.&lt;/p&gt;
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;"&gt;
&lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; ContractChannelFactory&amp;lt;T&amp;gt; : ChannelFactory&amp;lt;T&amp;gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;{&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#008000;"&gt;// contructor and methods to build channelfactory based on supplied configuration file&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    ...&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; IUntypedChannel CreateUntypedChannel(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; overrideUrl)&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    {&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        EndpointAddress address = &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Endpoint.Address;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;          &lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#008000;"&gt;// if an override then take the new address&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt;(overrideUrl!=&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Empty)&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            address = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; EndpointAddress(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Uri(overrideUrl), address.Identity, address.Headers, address.GetReaderAtMetadata(), address.GetReaderAtExtensions());&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        ChannelFactory&amp;lt;IUntypedChannel&amp;gt; factory = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ChannelFactory&amp;lt;IUntypedChannel&amp;gt;(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Endpoint.Binding, address);            &lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; factory.CreateChannel();&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    }&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; MessageVersion GetMessageVersion()&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    {&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Endpoint.Binding.MessageVersion;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    }&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;  }&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481218" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="WCF" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/WCF/default.aspx" /><category term="Test Harness" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Test+Harness/default.aspx" /></entry><entry><title>Enterprise Library: Filter on FormattedEventLogTraceListener does not work</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2009/02/23/enterprise-library-filter-on-formattedeventlogtracelistener-does-not-work.aspx" /><id>/blogs/chilberto/archive/2009/02/23/enterprise-library-filter-on-formattedeventlogtracelistener-does-not-work.aspx</id><published>2009-02-23T04:13:00Z</published><updated>2009-02-23T04:13:00Z</updated><content type="html">&lt;p&gt;As the project I am working nears completion, attention is drawn to reporting.&amp;nbsp; In my scenario, I want all logging to be sent to the database and only warning+ to be logged to the event log.&amp;nbsp; No problem, as the reporting is based on Enterprise Library 4.0, this is just configuration.&lt;/p&gt;
&lt;p&gt;Unfortunately there is a defect in 3.0 and 4.0 where the Filter on the FormattedEventLogTraceListener does not influence the logging.&amp;nbsp; Fortunately, using the System.Diagnostics.EventLogTraceListener works a treat.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=30645"&gt;http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=30645&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This appears to be fixed in Enterprise Library 4.1, but I have not confirmed this yet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481210" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="Error" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Error/default.aspx" /><category term="Enterprise Library" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Enterprise+Library/default.aspx" /></entry><entry><title>BizTalk: CreateBTSMessage revisited</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2009/02/05/biztalk-createbtsmessage-revisited.aspx" /><id>/blogs/chilberto/archive/2009/02/05/biztalk-createbtsmessage-revisited.aspx</id><published>2009-02-04T21:41:00Z</published><updated>2009-02-04T21:41:00Z</updated><content type="html">&lt;p&gt;This post is a follow-up to the previous &lt;a target="_blank" href="http://bloggingabout.net/blogs/chilberto/archive/2008/08/01/biztalk-create-message-based-on-deployed-schema.aspx"&gt;BizTalk: Create Message based on deployed schema&lt;/a&gt; post.&lt;/p&gt;
&lt;p&gt;In the current solution I am working on, we are implementing the ability to run versions of the BizTalk application side-by-side.&amp;nbsp; This will allow us to deploy early and verify the solution before any real messages are sent through.&amp;nbsp; This will also allow us to finish the processing of dehydrated orchestrations.&amp;nbsp; Aside: if anyone has some good best practices/techniques around this, please let me know!&lt;/p&gt;
&lt;p&gt;One bit of functionality that has cause a little grief is using the helper utility described in the previous post.&amp;nbsp; Fortunately, this was overcome with a minor code change to filter by the assembly full name:&lt;/p&gt;
&lt;div style="font-size:8pt;margin:20px 0px 10px;overflow:auto;width:97.5%;cursor:text;max-height:200px;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border:gray 1px solid;padding:4px;"&gt;
&lt;div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; XmlDocument CreateMessage(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; schemaName, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; rootNode, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; assembly)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;{&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    XmlDocument doc = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; XmlDocument();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    DocumentSpec docSpec;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    BtsCatalogExplorer catalog = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; BtsCatalogExplorer();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    catalog.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings[BTS_CONNECTION_STRING].ConnectionString;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    Schema schema = &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (assembly == &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Empty)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        schema = catalog.Schemas[schemaName];&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        schema = catalog.Schemas[schemaName, assembly];&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (schema == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; BTSUtilitiesException(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(&lt;span style="color:#006080;"&gt;&amp;quot;Failed to retrieve the {0} schema from the management database.&amp;quot;&lt;/span&gt;, schemaName));&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    {             &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        docSpec = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; DocumentSpec(rootNode, schema.BtsAssembly.DisplayName);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (docSpec == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; BTSUtilitiesException(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(&lt;span style="color:#006080;"&gt;&amp;quot;Failed to build the document {0}.&amp;quot;&lt;/span&gt;, rootNode));&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;        &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            StringBuilder sb = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; StringBuilder();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            StringWriter sw = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; StringWriter(sb);&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                doc.Load(docSpec.CreateXmlInstance(sw));&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;            &lt;span style="color:#0000ff;"&gt;finally&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            {&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;                sw.Dispose();&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;            }                    &lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;        }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt;    }&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:white;border-style:none;padding:0px;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; doc;&lt;/pre&gt;
&lt;pre style="font-size:8pt;margin:0em;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;background-color:#f4f4f4;border-style:none;padding:0px;"&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481121" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="BizTalk" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/BizTalk/default.aspx" /><category term="Tips" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Tips/default.aspx" /></entry><entry><title>WCF Test Harness: DynamicProxyFactory</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2009/01/20/wcf-test-harness-dynamicproxyfactory.aspx" /><id>/blogs/chilberto/archive/2009/01/20/wcf-test-harness-dynamicproxyfactory.aspx</id><published>2009-01-19T22:27:49Z</published><updated>2009-01-19T22:27:49Z</updated><content type="html">&lt;p&gt;This is in response to a &lt;a href="http://www.codeplex.com/WCFTestHarness/Thread/View.aspx?ThreadId=44396" target="_blank"&gt;post&lt;/a&gt; on CodePlex in regards to how to retrieve the metadata of a service.&amp;nbsp; I based this on a WCF Sample create by Vipul Modi.&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h4&gt;DynamicProxyFactory&lt;/h4&gt; &lt;p&gt;In the WCF Test Harness solution, the DynamicProxyFactory class is used to generate a proxy class based on a metadata enabled service.&amp;nbsp; The class performs the following: &lt;/p&gt; &lt;ol&gt; &lt;li&gt;Downloads Metadata - uses the System.Web.Services.Discovery.DiscoveryClientProtocol to retrieve the metadata&lt;/li&gt; &lt;li&gt;Imports Metadata - uses the System.ServiceModel.Description.WsdlImporter to extract the bindings, contracts and endpoints&lt;/li&gt; &lt;li&gt;Creates Proxy - generates the proxy code &lt;/li&gt; &lt;li&gt;Writes Proxy - writes the code into memory&lt;/li&gt; &lt;li&gt;Compiles - compiles the proxy code into a temporary assembly&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;If you are interested in exploring this, I suggest retrieving the source code and investigating the classes located in the Dynamic folder of the Spike.ContractBuilder library.&lt;/p&gt; &lt;p&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_2.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="165" alt="image" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_thumb.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Cheers, Jeff&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481033" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="WCF" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/WCF/default.aspx" /><category term="Test Harness" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Test+Harness/default.aspx" /></entry><entry><title>WCF Test Harness: Creating a Stub Service</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2008/12/09/wcf-test-harness-creating-a-stub-service.aspx" /><id>/blogs/chilberto/archive/2008/12/09/wcf-test-harness-creating-a-stub-service.aspx</id><published>2008-12-09T00:03:00Z</published><updated>2008-12-09T00:03:00Z</updated><content type="html">&lt;p&gt;The following steps can be performed to create a stub service based on the service contract downloaded and compiled in &lt;a target="_blank" href="http://bloggingabout.net/blogs/chilberto/pages/wcf-test-harness-adding-a-new-proxy-via-url.aspx"&gt;Add a New Proxy via URL&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select the menu option Show Hosting Window on the Host menu.&amp;nbsp; This will bring up a non-modal dialog that can be used to manage stubbed services.&lt;br /&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_2.png"&gt;&lt;img border="0" width="206" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_thumb.png" alt="image" height="56" style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" /&gt;&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&amp;nbsp; Select the Add Service Contract menu option on the Host menu of the Hosting Window:&lt;br /&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_4.png"&gt;&lt;img border="0" width="244" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_thumb_5F00_1.png" alt="image" height="76" style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" /&gt;&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;In the dialog, enter in a unique name for the service, select a service contract, and provide an address for the service:&lt;br /&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_6.png"&gt;&lt;img border="0" width="461" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_thumb_5F00_2.png" alt="image" height="208" style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" /&gt;&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Next, click Create Stub to generate an implementation of the service contract:&lt;br /&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_10.png"&gt;&lt;img border="0" width="158" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_thumb_5F00_4.png" alt="image" height="115" style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" /&gt;&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;This will generate a metadata enabled service endpoint at the address specified.&amp;nbsp; Click the Start button to create and open the host:&lt;br /&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_12.png"&gt;&lt;img border="0" width="374" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_thumb_5F00_5.png" alt="image" height="214" style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" /&gt;&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;If the TestHost.exe is currently running, you will get a failure as the Uri has already been allocated:&lt;br /&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_14.png"&gt;&lt;img border="0" width="649" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_thumb_5F00_6.png" alt="image" height="101" style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" /&gt;&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Stop the TestHost by pressing return in the consol application window:&lt;br /&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_16.png"&gt;&lt;img border="0" width="400" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_thumb_5F00_7.png" alt="image" height="116" style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" /&gt;&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Click the Start button again.&amp;nbsp; The host is now running...&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a target="_blank" href="http://bloggingabout.net/blogs/chilberto/pages/wcf-test-harness-overview.aspx"&gt;Overview&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=477328" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="WCF" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/WCF/default.aspx" /><category term="Test Harness" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Test+Harness/default.aspx" /></entry><entry><title>WCF Test Harness: New Release</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2008/12/09/wcf-test-harness-new-release.aspx" /><id>/blogs/chilberto/archive/2008/12/09/wcf-test-harness-new-release.aspx</id><published>2008-12-08T23:52:00Z</published><updated>2008-12-08T23:52:00Z</updated><content type="html">&lt;p&gt;I&amp;#39;ve created a new version of the &lt;a target="_blank" href="http://www.codeplex.com/WCFTestHarness"&gt;WCF Test Harness&lt;/a&gt; including some bug fixes and the ability to create a mock host.&amp;nbsp; This is a stubbed service based on a&amp;nbsp; loaded service contract.&amp;nbsp; This is very limited and its main purpose is to illustrate what is possible.&amp;nbsp; If this proves to be useful, I&amp;#39;ll flush it out and work on its limitations and spend some time on the GUI.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note: This replaces the previous version and is not compatible with the previous version (including the SampleHost.exe).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With this new release it is possible to perform the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First create a new client configuration and proxy by following: &lt;a target="_blank" href="http://bloggingabout.net/blogs/chilberto/pages/wcf-test-harness-adding-a-new-proxy-via-url.aspx"&gt;Add a New Proxy via Url&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Add a new test case and verify the service is valid by following: &lt;a target="_blank" href="http://bloggingabout.net/blogs/chilberto/pages/wcf-test-harness-createing-a-new-test-case.aspx"&gt;Creating a New Test Case&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Create a stubbed service based on the service contract downloaded in Step 1: &lt;a href="http://bloggingabout.net/blogs/chilberto/archive/2008/12/09/wcf-test-harness-creating-a-stub-service.aspx" title="Creating a Stub Service"&gt;Creating a Stub Service&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;After stopping the TestHost service running, run the test created in Step 2 again.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This does have potential for being really useful.&amp;nbsp; The next step is to apply the test harness against some real-world services to see where the holes are...&lt;/p&gt;
&lt;p&gt;As always, any feedback or suggestions appreciated. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=477327" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="WCF" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/WCF/default.aspx" /><category term="Test Harness" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Test+Harness/default.aspx" /></entry><entry><title>For Standard and Branch editions, joining a BizTalk group is not allowed.</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2008/11/25/for-standard-and-branch-editions-joining-a-biztalk-group-is-not-allowed.aspx" /><id>/blogs/chilberto/archive/2008/11/25/for-standard-and-branch-editions-joining-a-biztalk-group-is-not-allowed.aspx</id><published>2008-11-25T04:12:45Z</published><updated>2008-11-25T04:12:45Z</updated><content type="html">&lt;p&gt;The &amp;quot;For Standard and Branch editions, joining a BizTalk group is not allowed.&amp;quot; failure was recently encountered by a colleague while configuring a new implementation of BizTalk.&amp;nbsp; After trudging through countless posts, he came across the solution to this issue.&lt;/p&gt; &lt;p&gt;When encountering this error, just double check the name of the server is 15 characters or less (both NetBios and windows server name).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=477158" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="Error" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Error/default.aspx" /><category term="BizTalk" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/BizTalk/default.aspx" /></entry><entry><title>WCF Test Harness: Sample Contract</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2008/11/21/guide-1.aspx" /><id>/blogs/chilberto/archive/2008/11/21/guide-1.aspx</id><published>2008-11-21T01:04:00Z</published><updated>2008-11-21T01:04:00Z</updated><content type="html">&lt;p&gt;To illustrate the &lt;a href="http://www.codeplex.com/WCFTestHarness"&gt;WCF Test Harness&lt;/a&gt;, I create a service contract with a variety of operations defined.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.WCFTestHarness/ICustomerService.bmp"&gt;&lt;img border="0" src="http://bloggingabout.net/resized-image.ashx/__size/550x0/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.WCFTestHarness/ICustomerService.bmp" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also a service host was created to host the contract at &lt;a href="http://localhost:9991/CustomerService"&gt;http://localhost:9991/CustomerService&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto/image_5F00_4.png"&gt;&lt;/a&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.WCFTestHarness/TestHost.bmp"&gt;&lt;img border="0" src="http://bloggingabout.net/resized-image.ashx/__size/550x0/__key/CommunityServer.Blogs.Components.WeblogFiles/chilberto.WCFTestHarness/TestHost.bmp" alt="" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bloggingabout.net/blogs/chilberto/pages/wcf-test-harness-overview.aspx"&gt;Overview&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=477102" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="WCF" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/WCF/default.aspx" /><category term="Test Harness" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Test+Harness/default.aspx" /></entry><entry><title>WCF Test Harness Guide updated</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2008/11/17/wcf-test-harness-guide-updated.aspx" /><id>/blogs/chilberto/archive/2008/11/17/wcf-test-harness-guide-updated.aspx</id><published>2008-11-16T21:06:17Z</published><updated>2008-11-16T21:06:17Z</updated><content type="html">&lt;p&gt;I&amp;#39;ve added a new page to the Guide: &lt;a href="http://bloggingabout.net/blogs/chilberto/pages/wcf-test-harness-adding-a-new-proxy-via-assembly.aspx"&gt;Adding a New Proxy via Assembly&lt;/a&gt;.&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=477023" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="WCF" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/WCF/default.aspx" /><category term="Test Harness" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Test+Harness/default.aspx" /></entry><entry><title>First CodePlex Project: WCF Test Harness</title><link rel="alternate" type="text/html" href="/blogs/chilberto/archive/2008/11/14/first-codeplex-project-wcf-test-harness.aspx" /><id>/blogs/chilberto/archive/2008/11/14/first-codeplex-project-wcf-test-harness.aspx</id><published>2008-11-14T02:26:48Z</published><updated>2008-11-14T02:26:48Z</updated><content type="html">&lt;p&gt;I&amp;#39;ve just published my first CodePlex project: &lt;a href="http://www.codeplex.com/WCFTestHarness" target="_blank"&gt;WCF Test Harness&lt;/a&gt;.&amp;nbsp; This is a testing utility I have been working on for a while now and I thought it could be helpful for others.&lt;/p&gt; &lt;p&gt;I wrote a short &lt;a href="http://bloggingabout.net/blogs/chilberto/pages/wcf-test-harness-overview.aspx"&gt;Overview&lt;/a&gt; and I plan on adding additional information depending on interest.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=476925" width="1" height="1"&gt;</content><author><name>chilberto</name><uri>http://bloggingabout.net/members/chilberto/default.aspx</uri></author><category term="WCF" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/WCF/default.aspx" /><category term="Test Harness" scheme="http://bloggingabout.net/blogs/chilberto/archive/tags/Test+Harness/default.aspx" /></entry></feed>