<?xml version="1.0"?>
<!-- RSS generated by Radio UserLand v8.2.1 on Wed, 09 Apr 2008 17:36:12 GMT -->
<rss version="2.0">
	<channel>
		<title>Nielsen&apos;s Weblog</title>
		<link>http://radio.weblogs.com/0122832/</link>
		<description>.NET [use your Context dude]</description>
		<language>en-us</language>
		<copyright>Copyright 2008 Allan Nielsen</copyright>
		<lastBuildDate>Wed, 09 Apr 2008 17:36:12 GMT</lastBuildDate>
		<docs>http://backend.userland.com/rss</docs>
		<generator>Radio UserLand v8.2.1</generator>
		<managingEditor>an@jcsharp.net</managingEditor>
		<webMaster>an@jcsharp.net</webMaster>
		<category domain="http://rpc.weblogs.com/shortChanges.xml">rssUpdates</category> 
		<skipHours>
			<hour>1</hour>
			<hour>2</hour>
			<hour>3</hour>
			<hour>4</hour>
			<hour>5</hour>
			<hour>0</hour>
			<hour>6</hour>
			<hour>16</hour>
			</skipHours>
		<cloud domain="radio.xmlstoragesystem.com" port="80" path="/RPC2" registerProcedure="xmlStorageSystem.rssPleaseNotify" protocol="xml-rpc"/>
		<ttl>60</ttl>
		<item>
			<title>WWF</title>
			<link>http://radio.weblogs.com/0122832/2008/04/09.html#a93</link>
			<description>&lt;P&gt;Just back from Vietnam yesterday, jetlag... darn tired. Next week I am taking some time off, going to London on a small vacation...so what&apos;s up in London ?&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=PageHead&gt;&lt;A href=&quot;http://www.develop.com&quot;&gt;Essential Windows Workflo&lt;/A&gt;&lt;A href=&quot;http://www.develop.com&quot;&gt;w Foundation&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;what else is there to do in London ?&lt;/P&gt;
&lt;P&gt;:-D&lt;/P&gt;</description>
			<guid>http://radio.weblogs.com/0122832/2008/04/09.html#a93</guid>
			<pubDate>Wed, 09 Apr 2008 17:32:02 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=122832&amp;amp;p=93&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0122832%2F2008%2F04%2F09.html%23a93</comments>
			</item>
		<item>
			<title>IncomingMessageHeaders </title>
			<link>http://radio.weblogs.com/0122832/2008/01/23.html#a92</link>
			<description>&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt&quot;&gt;The project we&apos;re working on currently is using &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; COLOR: #2b91af; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;ServiceAuthorizationManager &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt&quot;&gt;for authorizing incoming request. &lt;?xml:namespace prefix = o ns = &quot;urn:schemas-microsoft-com:office:office&quot; /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt&quot;&gt;&lt;FONT face=Consolas&gt;The current implementation is expecting the RequestMessage.Headers.Action field to contain the incoming soap action. Here is the catch, if you have a method that is decorated with IsOneWay=true, then guess what the RequestContext is null!...&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt&quot;&gt;&lt;FONT face=Consolas&gt;This makes sense as one way calls is not the usual request/response pattern, but it sure did break our implementation :).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt&quot;&gt;&lt;FONT face=Consolas&gt;So a quick fix would be to look at the IncomingMessageHeaders instead like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;for&lt;/SPAN&gt; (&lt;SPAN style=&quot;COLOR: blue&quot;&gt;int&lt;/SPAN&gt; i = 0; i &amp;lt; operationContext.IncomingMessageHeaders.Count; ++i)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;MessageHeaderInfo&lt;/SPAN&gt; h = operationContext.IncomingMessageHeaders[i];&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;if&lt;/SPAN&gt; (h.Name == &lt;SPAN style=&quot;COLOR: #a31515&quot;&gt;&quot;Action&quot;&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;XmlReader&lt;/SPAN&gt; xr = operationContext.IncomingMessageHeaders.GetReaderAtHeader(i);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;action = xr.ReadElementContentAsString();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;BTW. Happy new year!, we spend the holidays in New York. We stayed at the Hilton &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Consolas; mso-bidi-font-family: Arial&quot;&gt;Millenium&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: &apos;Arial&apos;,&apos;sans-serif&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;on 54&lt;SUP&gt;th&lt;/SUP&gt; floor. Amazing view, we had the governor suite (I think it was called that way). On my right side we could see the Brooklyn bridge, strait out the window we could see the Empire State Building (upper Manhattan) and on our left side we had the Statue of Liberty and of course Ground Zero.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;Okay I don&apos;t get it, what fun is it standing on Times Square from 13.00 to 23.59 waiting for a ball drop ?!? &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;; mso-ascii-font-family: Consolas; mso-hansi-font-family: Consolas; mso-char-type: symbol; mso-symbol-font-family: Wingdings&quot;&gt;&lt;SPAN style=&quot;mso-char-type: symbol; mso-symbol-font-family: Wingdings&quot;&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;. &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes&quot;&gt;Well glad I was watching this from my room instead &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-ascii-font-family: Consolas; mso-hansi-font-family: Consolas; mso-char-type: symbol; mso-symbol-font-family: Wingdings&quot;&gt;&lt;SPAN style=&quot;mso-char-type: symbol; mso-symbol-font-family: Wingdings&quot;&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes&quot;&gt;. We&apos;re definitely going to visit New York again.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; mso-no-proof: yes&quot;&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNoSpacing style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt&quot;&gt;&lt;FONT face=Calibri&gt;Start spreading the news I&apos;m leaving&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Consolas; mso-bidi-font-family: Arial&quot;&gt; today &amp;#133; .&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
			<guid>http://radio.weblogs.com/0122832/2008/01/23.html#a92</guid>
			<pubDate>Wed, 23 Jan 2008 12:39:41 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=122832&amp;amp;p=92&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0122832%2F2008%2F01%2F23.html%23a92</comments>
			</item>
		<item>
			<title>UserNamePasswordClientCredential</title>
			<link>http://radio.weblogs.com/0122832/2007/09/22.html#a91</link>
			<description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Say you are doing a banking &lt;A href=&quot;http://msdn.microsoft.com/smartclient/&quot;&gt;SmartClient&lt;/A&gt; application, people finally got tired of phissing and &quot;fat&quot; clients is the answer here. &lt;/P&gt;
&lt;P&gt;Now my SmartClient uses WCF (duh) as the communication infrastructure between the end user and the bank. The end user is presented with the usual login box + some extra security id RSA key she must enter.&lt;/P&gt;
&lt;P&gt;The credentials is then stored in memory and each time I call out to my WCF proxy I pass in those credentials + the extra rsa custom token. I am holding on to the username token in memory using &lt;A href=&quot;http://msdn2.microsoft.com/en-us/library/system.security.securestring.aspx&quot;&gt;SecureString&lt;/A&gt; of course.&lt;/P&gt;
&lt;P&gt;So here is my concern, say I am holding on to my session aware channelfactory for many reasons, performance amongst other things. Obviously I have to set the Username and Password on the channel, fine but the &lt;A href=&quot;http://msdn2.microsoft.com/en-us/library/system.servicemodel.security.usernamepasswordclientcredential.aspx&quot;&gt;UserNamePasswordClientCredential&lt;/A&gt; class uses string to hold my identity!! WTF. Great eh, out goes the SecureString idea.&lt;/P&gt;
&lt;P&gt;We&apos;re not talking about securing the token when it crosses the wire, that part is secured, but I am talking about the fact that my password and &lt;A href=&quot;http://msdn2.microsoft.com/en-us/library/system.servicemodel.description.clientcredentials.username.aspx&quot;&gt;username&lt;/A&gt; is visible to prying eyes in memory, the second I set my credentials on the channelfactory.&lt;/P&gt;
&lt;P&gt;Might not be a big deal, but why not use SecureString on the UserNamePasswordClientCredential in the first place!.&lt;/P&gt;
&lt;P&gt;I might be missing the obvious reason as why UserNamePasswordClientCredential is designed like this, comments are welcome here.&lt;/P&gt;
&lt;P&gt;Btw: a possible implementation of the cached identity could be written like this (given the fact that UserNamePasswordClientCredential uses System.String ;-)).&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;public&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;sealed&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;class&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;CacheClientCredentials&lt;?xml:namespace prefix = o ns = &quot;urn:schemas-microsoft-com:office:office&quot; /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;private&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;static&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;SecureString&lt;/SPAN&gt; usr = &lt;SPAN style=&quot;COLOR: blue&quot;&gt;new&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;SecureString&lt;/SPAN&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;private&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;static&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;SecureString&lt;/SPAN&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;pwd= &lt;SPAN style=&quot;COLOR: blue&quot;&gt;new&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;SecureString&lt;/SPAN&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;static&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;string&lt;/SPAN&gt; UserName&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;get&lt;/SPAN&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;{ &lt;SPAN style=&quot;COLOR: blue&quot;&gt;return&lt;/SPAN&gt; SecureStringToString(usr); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;set&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&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;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;char&lt;/SPAN&gt;[] chars = &lt;SPAN style=&quot;COLOR: blue&quot;&gt;value&lt;/SPAN&gt;.ToCharArray();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&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;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;foreach&lt;/SPAN&gt; (&lt;SPAN style=&quot;COLOR: blue&quot;&gt;char&lt;/SPAN&gt; c &lt;SPAN style=&quot;COLOR: blue&quot;&gt;in&lt;/SPAN&gt; chars)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&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;/SPAN&gt;usr.AppendChar(c);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&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;/SPAN&gt;usr.MakeReadOnly();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;static&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;string&lt;/SPAN&gt; Password&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;get&lt;/SPAN&gt; { &lt;SPAN style=&quot;COLOR: blue&quot;&gt;return&lt;/SPAN&gt; SecureStringToString(pwd);&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;set&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&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;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;char&lt;/SPAN&gt;[] chars = &lt;SPAN style=&quot;COLOR: blue&quot;&gt;value&lt;/SPAN&gt;.ToCharArray();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&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;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;foreach&lt;/SPAN&gt; (&lt;SPAN style=&quot;COLOR: blue&quot;&gt;char&lt;/SPAN&gt; c &lt;SPAN style=&quot;COLOR: blue&quot;&gt;in&lt;/SPAN&gt; chars)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&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; &lt;/SPAN&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&lt;/SPAN&gt;pwd.AppendChar(c);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&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;/SPAN&gt;pwd.MakeReadOnly();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;private&lt;/SPAN&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;static&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;string&lt;/SPAN&gt; SecureStringToString(&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;SecureString&lt;/SPAN&gt; value)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;IntPtr&lt;/SPAN&gt; bstr = &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;Marshal&lt;/SPAN&gt;.SecureStringToBSTR(value);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;try&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&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;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;return&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;Marshal&lt;/SPAN&gt;.PtrToStringBSTR(bstr);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;finally&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&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;/SPAN&gt;&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;Marshal&lt;/SPAN&gt;.FreeBSTR(bstr);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The average, healthy, well-adjusted adult gets up at seven-thirty in the morning feeling just plain terrible. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Jean Kerr &lt;BR&gt;&lt;BR&gt;&lt;/P&gt;</description>
			<guid>http://radio.weblogs.com/0122832/2007/09/22.html#a91</guid>
			<pubDate>Sat, 22 Sep 2007 08:41:57 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=122832&amp;amp;p=91&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0122832%2F2007%2F09%2F22.html%23a91</comments>
			</item>
		<item>
			<title>SecurityAccessDeniedException</title>
			<link>http://radio.weblogs.com/0122832/2007/09/19.html#a90</link>
			<description>&lt;P&gt;Sigh, it&apos;s the client proxy that throws the exception.&lt;/P&gt;
&lt;P&gt;We have setup the usual universal error handler implementing the &lt;A href=&quot;http://msdn2.microsoft.com/en-us/library/system.servicemodel.dispatcher.ierrorhandler.aspx&quot;&gt;IErrorHandler&lt;/A&gt; interface, all good I figured.&lt;/P&gt;
&lt;P&gt;The ProvideFault implementation is strait forward, if any exception occurs, wrap it up in a &lt;A href=&quot;http://msdn2.microsoft.com/en-us/library/ms576199.aspx&quot;&gt;FaultException&lt;/A&gt; and return that to the client. I believed that this was it, no faulted channels on my shift and client was happy.&lt;/P&gt;
&lt;P&gt;The problem we ran into was the implementation of the ProvideFault. The symptoms was that, when ever a &lt;A href=&quot;http://msdn2.microsoft.com/en-us/library/system.servicemodel.security.securityaccessdeniedexception.aspx&quot;&gt;SecurityAccessDeniedException&lt;/A&gt; was thrown, the client would catch that exception and show a localized message to the enduser, except the client never got the &lt;A href=&quot;http://msdn2.microsoft.com/en-us/library/system.servicemodel.security.securityaccessdeniedexception.aspx&quot;&gt;SecurityAccessDeniedException&lt;/A&gt;, it got an untyped FaultException!.&lt;/P&gt;
&lt;P&gt;The reason why is actually obvious, if the exception thrown by the service is already an exception derived from the CommunicationException aka a FaultException, the ProvideFault should of course not wrap that fault up into yet another FaultException, it should simply just return from the ProvideFault and let the faultexception travel.&lt;/P&gt;
&lt;P&gt;So the implementation must have the following check:&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;public&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;void&lt;/SPAN&gt; ProvideFault(&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;Exception&lt;/SPAN&gt; error, System.ServiceModel.Channels.MessageVersion version, &lt;SPAN style=&quot;COLOR: blue&quot;&gt;ref&lt;/SPAN&gt; System.ServiceModel.Channels.Message fault)&lt;?xml:namespace prefix = o ns = &quot;urn:schemas-microsoft-com:office:office&quot; /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;if&lt;/SPAN&gt; (error &lt;SPAN style=&quot;COLOR: blue&quot;&gt;is&lt;/SPAN&gt; FaultException)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;return&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;
&lt;P&gt;this way the faultexception is propagated to the client proxy and then the client proxy will turn the FaultException into the SecurityAccessDeniedException and then re throw it.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;My theory is that all of Scottish cuisine is based on a dare. &lt;BR&gt;-- Mike Myers&lt;BR&gt;&lt;/P&gt;&lt;/P&gt;</description>
			<guid>http://radio.weblogs.com/0122832/2007/09/19.html#a90</guid>
			<pubDate>Wed, 19 Sep 2007 14:43:54 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=122832&amp;amp;p=90&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0122832%2F2007%2F09%2F19.html%23a90</comments>
			</item>
		<item>
			<title>Custom binding</title>
			<link>http://radio.weblogs.com/0122832/2007/09/15.html#a89</link>
			<description>&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;Back from Vietnam. I survived the first 6 days without any stomach trouble, but then oh boy... for another 5 consecutive days I was in deep shit sort of speak. Long live Coca Cola!.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;?xml:namespace prefix = o ns = &quot;urn:schemas-microsoft-com:office:office&quot; /&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;Okay we ran into the &lt;A href=&quot;http://msdn2.microsoft.com/en-us/library/aa738641.aspx&quot;&gt;TimeStampHasCreationTimeInFuture&lt;/A&gt;, cool. Now it&apos;s not possible to extend the default bindings with the maxClockSkew setting, so you have to resort to custom bindings.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;We are using basicHttpBinding for maximum interoperability, so creating a similar custom binding given this default binding here:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;basicHttpBinding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;binding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;name&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;basic&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;security&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;mode&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;TransportWithMessageCredential&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;message&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;clientCredentialType&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;UserName&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;security&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;binding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;basicHttpBinding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;is strait forward converting this into a custom binding like this:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;customBinding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;binding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;name&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;basic&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;security&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;authenticationMode&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;UserNameOverTransport&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;localClientSettings&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;maxClockSkew&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;00:10:00&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;localServiceSettings&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;maxClockSkew&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;00:10:00&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;security&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;textMessageEncoding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;messageVersion&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;Soap11&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;httpsTransport&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;binding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;customBinding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;First you apply the security element which enables you to set the maxClockSkew values. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;MaxClockSkew has a default value of 5 minutes and using svcutil to generate the client config, it stays that way ;-), correct svcutil does not pick up the server side values so you would have to set them manually afterwards.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;Next we setup the mandatory encoding element and the soap version, in our case we use text encoding and soap 1.1 for maximum interoperability with external clients.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;We finish our custom binding with specifying the mandatory transport element, which in our case is HTTPS securing a username token.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;&lt;FONT color=blue&gt;Off topic&lt;/FONT&gt;:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;Say you&apos;re not concerned about interoperability but instead are picking a battles with the paranoid it-guys responsible for the all the firewalls in the company. These guys tends to lock down every port but port 80, 443.&amp;nbsp;&amp;lt;rant&amp;gt;They even close port 1433 behind firewalls forcing us to write &quot;rpc&quot; services! don&apos;t get me started. ;-)&amp;lt;/rant&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;In situations like that I would recommend using a custom binding also but with a binary encoding instead.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;For example given the above bindings you could build your custom binding exactly the same way but with a binary message encoding instead.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;o:p&gt;&lt;FONT face=Consolas&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;customBinding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;binding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;name&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;basic&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;security&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;authenticationMode&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;UserNameOverTransport&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;localClientSettings&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;maxClockSkew&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;00:10:00&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;localServiceSettings&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;maxClockSkew&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;=&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;00:10:00&lt;/SPAN&gt;&quot;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;security&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;binaryMessageEncoding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;httpsTransport&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;binding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: #a31515; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;customBinding&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;gt; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; COLOR: blue; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT color=black&gt;Performance is optimal with the binary encoder and you keep the it-guys happy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;FONT color=black&gt;&quot;As long as you&apos;re going to be thinking anyway, THINK BIG.&quot;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;BR&gt;&lt;FONT color=black&gt;- Donald Trump&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;</description>
			<guid>http://radio.weblogs.com/0122832/2007/09/15.html#a89</guid>
			<pubDate>Sat, 15 Sep 2007 19:38:38 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=122832&amp;amp;p=89&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0122832%2F2007%2F09%2F15.html%23a89</comments>
			</item>
		<item>
			<title>IInteractiveChannelInitializer</title>
			<link>http://radio.weblogs.com/0122832/2007/07/13.html#a88</link>
			<description>&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;?xml:namespace prefix = o ns = &quot;urn:schemas-microsoft-com:office:office&quot; /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;Say you have a service which requires a UsernameToken, the client would be responsible for passing in this token. Where do you get this token from, well usually the user is prompted for her credentials. There is the standard UI &lt;A href=&quot;http://msdn2.microsoft.com/EN-US/library/aa375177.aspx&quot;&gt;dialogbox&lt;/A&gt; for this kind of thing here.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none; tab-stops: 71.3pt&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-tab-count: 1&quot;&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;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;So let&apos;s try and complicate things a bit by NOT just passing in the username and password on the proxy.&lt;FONT color=blue&gt;ClientCredentials.UserName.UserName&lt;/FONT&gt;, oh no, not this time. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;Now&amp;nbsp;the WCF team have provided us with this little (rarely used imo) interface called &lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: &apos;Lucida Console&apos;; mso-bidi-font-family: &apos;Courier New&apos;&quot;&gt;&lt;A href=&quot;http://msdn2.microsoft.com/en-us/library/system.servicemodel.dispatcher.iinteractivechannelinitializer.aspx&quot;&gt;IInteractiveChannelInitializer&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: &apos;Lucida Console&apos;; mso-bidi-font-family: &apos;Courier New&apos;&quot;&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: &apos;Lucida Console&apos;; mso-bidi-font-family: &apos;Courier New&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;This interface helps us implement the &quot;lets bother the user with a tedious login box&quot; but &lt;FONT color=red&gt;BEFORE&lt;/FONT&gt; a channel is opened, this is the key thing to remember here and the sole motivation for this interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;The documentation on this interface is rather weak and I completely missed out on the fact that I had to implement a &lt;FONT color=blue&gt;ClientCredentialsSecurityTokenManager&lt;/FONT&gt; also, so I got some hard to understand exceptions on my first implemention.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;Okay the basic song goes like this, create a class that derives from &lt;FONT color=blue&gt;ClientCredentials&lt;/FONT&gt; and override the &lt;FONT color=blue&gt;ApplyClientBehavior&lt;/FONT&gt; by adding your own class which implements the IInteractiveChannelInitializer interface&amp;#133; and yes override the CreateSecurityTokenManager with your own SecurityTokenManager (I messed that part up initially).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;So a sparse implementation of the ClientCredentials would turn out this way :&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;public&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;class&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ClientCredentialsEx&lt;/SPAN&gt; : &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ClientCredentials&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; ClientCredentialsEx(): &lt;SPAN style=&quot;COLOR: blue&quot;&gt;base&lt;/SPAN&gt;() {}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; ClientCredentialsEx(&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ClientCredentialsEx&lt;/SPAN&gt; other): &lt;SPAN style=&quot;COLOR: blue&quot;&gt;base&lt;/SPAN&gt;(other){}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;override&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;SecurityTokenManager&lt;/SPAN&gt; CreateSecurityTokenManager()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;return&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;new&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;MyClientCredentialsSecurityTokenManager&lt;/SPAN&gt;(&lt;SPAN style=&quot;COLOR: blue&quot;&gt;this&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt 21.05pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;public&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;override&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;void&lt;/SPAN&gt; ApplyClientBehavior(&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ServiceEndpoint&lt;/SPAN&gt; serviceEndpoint, &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ClientRuntime&lt;/SPAN&gt; behavior)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;behavior.InteractiveChannelInitializers.Add(&lt;SPAN style=&quot;COLOR: blue&quot;&gt;new&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ShowCredentialsUI&lt;/SPAN&gt;());&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;base&lt;/SPAN&gt;.ApplyClientBehavior(serviceEndpoint, behavior);&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;protected&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;override&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ClientCredentials&lt;/SPAN&gt; CloneCore()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;return&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;new&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ClientCredentialsEx&lt;/SPAN&gt;(&lt;SPAN style=&quot;COLOR: blue&quot;&gt;this&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;And then your implementation of the &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;IInteractiveChannelInitializer&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;Would look something like this, note I didn&apos;t go all the way with the standard &lt;A href=&quot;http://msdn2.microsoft.com/EN-US/library/aa375177.aspx&quot;&gt;CreUIPromptForCredentials&lt;/A&gt; dialogbox, google it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;public&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;class&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ShowCredentialsUI&lt;/SPAN&gt; : &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;IInteractiveChannelInitializer&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;IAsyncResult&lt;/SPAN&gt; BeginDisplayInitializationUI(&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;IClientChannel&lt;/SPAN&gt; channel, &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 36pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; COLOR: #2b91af; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;AsyncCallback&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; callback, &lt;SPAN style=&quot;COLOR: blue&quot;&gt;object&lt;/SPAN&gt; state)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: green&quot;&gt;&lt;a href=&quot;//call&quot;&gt;//call&lt;/a&gt; the CredUIPromptForCredentials and get back a user and password.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ChannelParameterCollection&lt;/SPAN&gt; col = channel.GetProperty&amp;lt;&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ChannelParameterCollection&lt;/SPAN&gt;&amp;gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 36pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;col.Add(&lt;SPAN style=&quot;COLOR: blue&quot;&gt;new&lt;/SPAN&gt; System.Net.&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;NetworkCredential&lt;/SPAN&gt;(username, password));&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 36pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;return&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;new&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;AsyncResult&lt;/SPAN&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;void&lt;/SPAN&gt; EndDisplayInitializationUI(&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;IAsyncResult&lt;/SPAN&gt; result)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;AsyncResult&lt;/SPAN&gt; ar = (&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;AsyncResult&lt;/SPAN&gt;)result;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ar.isCompleted = &lt;SPAN style=&quot;COLOR: blue&quot;&gt;true&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; LINE-HEIGHT: 115%; FONT-FAMILY: &apos;Calibri&apos;,&apos;sans-serif&apos;; mso-bidi-font-family: &apos;Times New Roman&apos;; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi&quot;&gt;&lt;BR style=&quot;PAGE-BREAK-BEFORE: always; mso-special-character: line-break&quot; clear=all&gt;&lt;/SPAN&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 10pt&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; LINE-HEIGHT: 115%&quot;&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;Now a very sparse implemention of the IAsyncResult, I &lt;A href=&quot;http://radio.weblogs.com/0122832/2005/10/22.html#a77&quot;&gt;blogged&lt;/A&gt; about this long time ago.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;public&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;class&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;AsyncResult&lt;/SPAN&gt; : &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;IAsyncResult&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;bool&lt;/SPAN&gt; isCompleted = &lt;SPAN style=&quot;COLOR: blue&quot;&gt;false&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;object&lt;/SPAN&gt; AsyncState&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;get&lt;/SPAN&gt; { &lt;SPAN style=&quot;COLOR: blue&quot;&gt;throw&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;new&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;Exception&lt;/SPAN&gt;(&lt;SPAN style=&quot;COLOR: #a31515&quot;&gt;&quot;The method or operation is not implemented.&quot;&lt;/SPAN&gt;); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; System.Threading.&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;WaitHandle&lt;/SPAN&gt; AsyncWaitHandle&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;get&lt;/SPAN&gt; { &lt;SPAN style=&quot;COLOR: blue&quot;&gt;throw&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;new&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;Exception&lt;/SPAN&gt;(&lt;SPAN style=&quot;COLOR: #a31515&quot;&gt;&quot;The method or operation is not implemented.&quot;&lt;/SPAN&gt;); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;bool&lt;/SPAN&gt; CompletedSynchronously{&lt;SPAN style=&quot;COLOR: blue&quot;&gt;get&lt;/SPAN&gt;{&lt;SPAN style=&quot;COLOR: blue&quot;&gt;return&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;true&lt;/SPAN&gt;;}}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;bool&lt;/SPAN&gt; IsCompleted { &lt;SPAN style=&quot;COLOR: blue&quot;&gt;get&lt;/SPAN&gt; { &lt;SPAN style=&quot;COLOR: blue&quot;&gt;return&lt;/SPAN&gt; isCompleted; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 10pt&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; LINE-HEIGHT: 115%; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;Now for the implementation of the custom &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ClientCredentialsSecurityTokenManager.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;The crux of this is you would dig out the &lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;NetworkCredential &lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;f&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;rom the &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ChannelParameterCollection which &lt;/SPAN&gt;was set by the&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt; &lt;/SPAN&gt;&lt;FONT color=red&gt;BeginDisplayInitializationUI&lt;/FONT&gt;.&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;class&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;MyClientCredentialsSecurityTokenManager&lt;/SPAN&gt; : &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ClientCredentialsSecurityTokenManager&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; MyClientCredentialsSecurityTokenManager(&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ClientCredentials&lt;/SPAN&gt; parent): &lt;SPAN style=&quot;COLOR: blue&quot;&gt;base&lt;/SPAN&gt;(parent){}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;public&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;override&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;SecurityTokenProvider&lt;/SPAN&gt; CreateSecurityTokenProvider(&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;SecurityTokenRequirement&lt;/SPAN&gt; tokenRequirement)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;if&lt;/SPAN&gt; (tokenRequirement.KeyUsage == &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;SecurityKeyUsage&lt;/SPAN&gt;.Signature)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;NetworkCredential&lt;/SPAN&gt; token = &lt;SPAN style=&quot;COLOR: blue&quot;&gt;null&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ChannelParameterCollection&lt;/SPAN&gt; obj = (&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ChannelParameterCollection&lt;/SPAN&gt;)tokenRequirement.Properties[&lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;ServiceModelSecurityTokenRequirement&lt;/SPAN&gt;.ChannelParametersCollectionProperty];&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;token = obj[0] &lt;SPAN style=&quot;COLOR: blue&quot;&gt;as&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;NetworkCredential&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;if&lt;/SPAN&gt; (tokenRequirement.TokenType == &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;SecurityTokenTypes&lt;/SPAN&gt;.UserName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&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;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;return&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: blue&quot;&gt;new&lt;/SPAN&gt; &lt;SPAN style=&quot;COLOR: #2b91af&quot;&gt;MyUsernameSecurityTokenProvider&lt;/SPAN&gt;(token);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none&quot;&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;COLOR: blue&quot;&gt;return&lt;/SPAN&gt; &lt;SPAN styl