<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jason Rowe &#187; C#</title>
	<atom:link href="http://jasonrowe.com/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://jasonrowe.com</link>
	<description>enjoying the web</description>
	<lastBuildDate>Sun, 13 May 2012 14:05:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>NetMsmqBinding Brain Dump</title>
		<link>http://jasonrowe.com/2012/05/13/netmsmqbinding-brain-dump/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=netmsmqbinding-brain-dump</link>
		<comments>http://jasonrowe.com/2012/05/13/netmsmqbinding-brain-dump/#comments</comments>
		<pubDate>Sun, 13 May 2012 06:14:28 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://jasonrowe.com/?p=1940</guid>
		<description><![CDATA[I started experimenting with WCF&#8217;s NetMsmqBinding and found the abstraction to be a bit tricky. WCF takes care of all the MSMQ details and all you need to do is define the contract and do configuration. The following are some &#8230; <a href="http://jasonrowe.com/2012/05/13/netmsmqbinding-brain-dump/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p> I started experimenting with WCF&#8217;s NetMsmqBinding and found the abstraction to be a bit tricky. WCF takes care of all the MSMQ details and all you need to do is define the contract and do configuration. The following are some notes about that process.</p>

<h3>Links</h3>
<p><a href="http://blogs.msdn.com/b/tomholl/archive/2008/07/12/msmq-wcf-and-iis-getting-them-to-play-nice-part-1.aspx">msmq wcf and iis getting them to play nice</a></p>
<p><a href="http://code.google.com/p/autofac/wiki/WcfIntegration#WAS_Hosting_and_Non-HTTP_Activation">AutoFac WAS Hosting and Non-HTTP Activation</a></p>

<h3>Windows Components Installed</h3>
<p>Microsoft Message Queue (MSMQ) Server > MSMQ Server Core</p>
<p>Microsoft .NET Framework > Windows Communication Foundation Non-HTTP Activation</p>

<h3>IIS 7 Configuration</h3>
<ol>
<li>Add net.msmq to the list of enabled protocols. In IIS, Web App -> Advanced Settings -> Enabled Protocols. It is a comma separated list (http,net.msmq).</li>
<li>Make sure Client and Service have correct permissions to access the private queue</li>
</ol>

<h3>MSMQ Config</h3>
<p>Add NETWORK SERVICE to the new MSMQ (windows 7 that is in Computer Managment -> Services and Applications -> Message Queuing</p>

<h3>C# code to create initialize private queue</h3>
<p>The queue name must match the URI of your service&#8217;s .svc file according to <a href="http://blogs.msdn.com/b/tomholl/archive/2008/07/12/msmq-wcf-and-iis-getting-them-to-play-nice-part-1.aspx">this</a></p>

<pre class="brush: csharp; title: ; notranslate">
  // Create and connect to a private Message Queuing queue.
if (!MessageQueue.Exists(@&quot;.\Private$\JangoFettClient/CloneService.svc&quot;))
{
    // Create the queue if it does not exist.
    MessageQueue.Create(@&quot;.\Private$\JangoFettClient/CloneService.svc&quot;);
}
</pre>

<h3>Example Service Config</h3>

<pre class="brush: xml; title: ; notranslate">
&lt;bindings&gt;
    &lt;netMsmqBinding&gt;
        &lt;binding name=&quot;MsmqBindingNonTransactionalNoSecurity&quot;
                        exactlyOnce=&quot;false&quot;&gt;
            &lt;security mode=&quot;None&quot;/&gt;
        &lt;/binding&gt;
    &lt;/netMsmqBinding&gt;
&lt;/bindings&gt;
&lt;services&gt;
&lt;service name=&quot;JangoFettClient.CloneService&quot;&gt;
    &lt;endpoint name=&quot;msmq&quot; 
              address=&quot;net.msmq://localhost/private/JangoFettClient/CloneService.svc&quot;
              binding=&quot;netMsmqBinding&quot; 
              bindingConfiguration=&quot;MsmqBindingNonTransactionalNoSecurity&quot;
              contract=&quot;JangoFettClient.ICloneOrderProcessor&quot; /&gt;
&lt;/service&gt;
&lt;/services&gt;
</pre>

<h3>Example Service</h3>
<p>Example of data contract that would automatically become the listener and pull the items from MSMQ via WCF</p>
<pre class="brush: csharp; title: ; notranslate">
namespace JangoFettClient
{
    public class CloneService : ICloneOrderProcessor
    {
        private readonly ILog _logger;

        public CloneService(ILog logger)
        {
            _logger = logger;
        }

        public void SendMessage(CloneOrder request)
        {
            _logger.Info(&quot;Message received from MSMQ&quot;);
        }
    }
}
</pre>

<h3>Errors with easy fixes</h3>
<p>The protocol &#8216;net.msmq&#8217; is not supported. Add net.msmq to the list of enabled protocols. See IIS 7 Configuration above for more information.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonrowe.com/2012/05/13/netmsmqbinding-brain-dump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shiny New Toys, Visitor Pattern, and Real World Functional Programming</title>
		<link>http://jasonrowe.com/2010/09/06/shiny-new-toys-visitor-pattern-and-real-world-functional-programming/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=shiny-new-toys-visitor-pattern-and-real-world-functional-programming</link>
		<comments>http://jasonrowe.com/2010/09/06/shiny-new-toys-visitor-pattern-and-real-world-functional-programming/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 04:21:41 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Commentary]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[F#]]></category>

		<guid isPermaLink="false">http://jasonrowe.com/?p=1333</guid>
		<description><![CDATA[&#160; Last week in the office I thought to my self, “Holiday weekend coming! I’ll have time to play with WP7 or maybe I’ll play with HTML5”. Then I saw this tweet on twitter. We as developers spend too much &#8230; <a href="http://jasonrowe.com/2010/09/06/shiny-new-toys-visitor-pattern-and-real-world-functional-programming/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p> <p>Last week in the office I thought to my self, “Holiday weekend coming! I’ll have time to play with WP7 or maybe I’ll play with HTML5”. Then I saw this <a href="http://twitter.com/jeremydmiller/status/22798775378">tweet</a> on twitter.</p> <blockquote> <p>We as developers spend too much time playing with baubles and shiny new tools and not enough time on core skills and fundamentals</p></blockquote> <p>I thought well, instead of using some free time this holiday weekend to build something why not do a little research. I happened to have a problem at work which someone suggested using the Visitor Pattern. So I spent some time looking over a few resources and <a href="http://en.wikipedia.org/wiki/Visitor_pattern">Wikipedia</a> has a great explanation. I won’t try to repeat that. One area I was stuck on though was the concept of double dispatch. I found this <a href="http://bit.ly/bZRM74">example</a> on <a href="http://stackoverflow.com/questions/479923/is-c-a-single-dispatch-or-multiple-dispatch-language">StackOverflow.com</a> which solidified the concept. For some reason <a href="http://bit.ly/bZRM74">learning by spaceship and rebel alliance</a> works for me.</p> <p>So now that I had a good understand all I needed to was implement it right? I thought about it and figured that could wait. Now is an opportunity to work on my fundamentals. The Wikipedia article mentioned Common Lisp and how the Visitor Pattern simplified when using dynamic languages. This got me to thinking what would this look like in F# or a functional language? </p> <p>While looking into functional languages I came across this Stack Overflow question “<a href="http://stackoverflow.com/questions/3642328/i-am-a-c-developer-should-i-start-looking-more-on-f-closed">I am a C# developer, Should I start looking more on F# [closed]</a>”.&nbsp; Jon Skeet’s answer influenced me and I figured I would pick up a book <a href="http://manning.com/petricek">Real World Functional Programming</a>. It fits into the category of fundamentals because it’s using C# and F# to teach functional programming. Which I haven’t used in many years.</p> <p>So I start reading with the goal in mind that I would make a quick example of the visitor pattern in F#. Don’t think I am a super geek (not that you would be confused because of my skills). I did take time to drink a few of <a href="http://www.surlybrewing.com/beer/year-round-beers.html">these</a> and go to the Crowded House concert this weekend. By the fourth chapter or so things started to sink in with F# and functional programming. </p> <p>If I were using a declarative functional style of programming, I wouldn’t even need the visitor pattern at all!&nbsp; I don’t have objects that would need to be separated from the algorithm. I would only have types and could use pattern matching and discriminated unions to perform my algorithm. The visitor pattern is needed in my current project because I’m using an implicit OO coding approach.</p> <p>It was really shocking to me that this wasn’t obvious right away. I’ve been doing OO for so long now I’ve completely become accustomed to dealing with objects and state. A programming world without objects had completely slipped from my mind. Glad I took the time to get started on this book as it’s already giving me new ideas and techniques I can use in my daily C# and OO programming. Now to start working on some of the other <a href="http://www.indiangeek.net/wp-content/uploads/Programmer%20competency%20matrix.htm">programmer competencies</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonrowe.com/2010/09/06/shiny-new-toys-visitor-pattern-and-real-world-functional-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intro to Propositional Logic Using C#</title>
		<link>http://jasonrowe.com/2009/08/28/intro-to-propositional-logic-using-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=intro-to-propositional-logic-using-c</link>
		<comments>http://jasonrowe.com/2009/08/28/intro-to-propositional-logic-using-c/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 03:18:20 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Propositional Logic]]></category>

		<guid isPermaLink="false">http://jasonrowe.com/?p=628</guid>
		<description><![CDATA[I&#8217;ve been reading about propositional (or sentential) logic in the book &#8220;The Annotated Turing&#8221;. I put together a quick console app to write out truth tables. It helped me get the hang of the mathematical notation &#8220;v&#8221;, &#8220;&#038;&#8221;, and &#8220;->&#8221;. &#8230; <a href="http://jasonrowe.com/2009/08/28/intro-to-propositional-logic-using-c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[I&#8217;ve been reading about propositional (or sentential) logic in the book &#8220;The Annotated Turing&#8221;.  I put together a quick console app to write out truth tables. It helped me get the hang of the mathematical notation &#8220;v&#8221;, &#8220;&#038;&#8221;, and &#8220;->&#8221;. In C# those would be ||, &#038;&#038;, and !x || y respectively. I hope someone else finds it useful.

<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;

namespace PropositionalLogic
{
    public class Program
    {
        public class truthvalue
        {
            public bool X { get; set; }
            public bool Y { get; set; }
        }

        public static bool XorY(bool x, bool y)
        {
            return (x || y);
        }

        public static bool XandY(bool x, bool y)
        {
            return (x &amp;&amp; y);
        }

        public static bool Exclusive(bool x, bool y)
        {
            return (x &amp;&amp; y) &amp;&amp; !(x &amp;&amp; y);// always false
        }

        public static bool Tautoloty(bool x, bool y)
        {
            return x || y || (!x &amp;&amp; !y);// always true
        }

        public static bool Contradition(bool x, bool y)
        {
            return x || (y &amp;&amp; !y);
        }

        public static bool MaterialImplication(bool x, bool y)
        {
            return !x || y; 
            //this can also be expressed as the following conjunction !(x &amp;&amp; !y);
        }

        public static bool BiConditional(bool x, bool y)
        {
            return MaterialImplication(x, y) &amp;&amp; MaterialImplication(y, x); //&quot;if and only if&quot;
        }

        static void Main(string[] args)
        {
            var truthTable = new List&lt;truthvalue&gt;
                                 {
                                     new truthvalue() {X = false, Y = false},
                                     new truthvalue() {X = false, Y = true},
                                     new truthvalue() {X = true, Y = false},
                                     new truthvalue() {X = true, Y = true}
                                 };

            var sentences = new Dictionary&lt;string , Func&lt;bool, bool, bool&gt;&gt;
                                {
                                    {&quot;X v Y&quot;, XorY},
                                    {&quot;X &amp; Y&quot;, XandY},
                                    {&quot;(x v y)&amp; -(x &amp; y)&quot;, Exclusive},
                                    {&quot;x v y v (-x &amp; -y)&quot;, Tautoloty},
                                    {&quot;x -&gt; y&quot;, MaterialImplication},
                                    {&quot;x ~ y&quot;, BiConditional}
                                };

            CalculateTruthTable(truthTable, sentences);

            Console.ReadLine();
        }

        private static void CalculateTruthTable(IEnumerable&lt;truthvalue&gt; truthTable, 
Dictionary&lt;string , Func&lt;bool, bool, bool&gt;&gt; sentences)
        {
            foreach (var sentence in sentences)
            {
                Console.WriteLine(&quot;&quot;);
                Console.WriteLine(&quot;|X      |Y      |{0}  |&quot;, sentence.Key);

                foreach (var value in truthTable)
                {
                    var x = value.X;
                    var y = value.Y;

                    var result = sentence.Value(x, y);

                    Console.WriteLine(&quot;|{0}  |{1}  |{2}  |&quot;, PrettyPrint(x), PrettyPrint(y), 
                                       PrettyPrint(result));
                }
            }
        }

        private static string PrettyPrint(bool input)
        {
            return input ? input + &quot; &quot; : input.ToString();
        }
    }
}
</pre>]]></content:encoded>
			<wfw:commentRss>http://jasonrowe.com/2009/08/28/intro-to-propositional-logic-using-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decrypt QueryString &#8211; Space + Issue = Uri.EscapeDataString</title>
		<link>http://jasonrowe.com/2008/07/29/decrypt-querystring-space-issue-uriescapedatastring/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=decrypt-querystring-space-issue-uriescapedatastring</link>
		<comments>http://jasonrowe.com/2008/07/29/decrypt-querystring-space-issue-uriescapedatastring/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 04:24:17 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://rowejason.com/?p=122</guid>
		<description><![CDATA[While working with encrypted querystrings in ASP.NET I noticed people doing this: The &#8220;strScramble.Replace(&#8221; &#8220;, &#8220;+&#8221;)&#8221; is a scary way to get around the request.querystring automatically changing the &#8220;+&#8221; into a space.   A better way is to use System.Uri.EscapeDataString before adding the querystring value. &#8230; <a href="http://jasonrowe.com/2008/07/29/decrypt-querystring-space-issue-uriescapedatastring/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While working with encrypted querystrings in ASP.NET I noticed people doing this:</p>

<pre class="brush: csharp; title: ; notranslate">
string strValues = &quot;search term&quot;;
string strURL = &quot;http://mysite.com?search=&quot;
+ encryptQueryString(strValues);
Response.Redirect(strURL);
</pre>

<pre class="brush: csharp; title: ; notranslate">
string strScramble = Request.QueryString[&quot;search&quot;];
string strdeCrypt = decryptQueryString(strScramble.Replace(&quot; &quot;, &quot;+&quot;));
</pre>

<p>The &#8220;strScramble.Replace(&#8221; &#8220;, &#8220;+&#8221;)&#8221; is a scary way to get around the request.querystring automatically changing the &#8220;+&#8221; into a space.   A better way is to use System.Uri.EscapeDataString before adding the querystring value. Then HttpUtility.UrlDecode<strong> </strong>works as expected returning the &#8220;+&#8221;.</p>

<p>According to this blog on MSDN (<a href="http://blogs.msdn.com/yangxind/default.aspx">http://blogs.msdn.com/yangxind/default.aspx</a>), when encoding the URL use &#8220;<strong style="mso-bidi-font-weight: normal;">System.Uri.EscapeDataString&#8221;, </strong>when decoding the URL use<strong style="mso-bidi-font-weight: normal;"> &#8220;</strong> <strong style="mso-bidi-font-weight: normal;">HttpUtility.UrlDecode</strong>&#8220;.</p>

<p>Example using Uri.EscapeDataString and taking out replace:</p>

<pre class="brush: csharp; title: ; notranslate">
string strValues = &quot;search term&quot;;
string strURL = &quot;http://mysite.com?search=&quot;
+ encryptQueryString(Uri.EscapeDataString(strValues));
Response.Redirect(strURL);
</pre>

<pre class="brush: csharp; title: ; notranslate">
string strScramble = Request.QueryString[&quot;search&quot;];
string strdeCrypt = decryptQueryString(strScramble);
</pre>

<span style="font-size: x-small;">NET encoding methods</span>
<table class="MsoTableGrid" style="border-collapse: collapse; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes;">
<td style="border: 1pt solid black; padding: 0in 5.4pt; width: 107.55pt; background-color: transparent;" width="143" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-family: Calibri;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;">Characters</span></strong></span></p>
</td>
<td style="border-color: black black black #ece9d8; border-top: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 116.05pt; background-color: transparent;" width="155" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">HttpUtility.UrlEncode</span></span></strong></p>
</td>
<td style="border-color: black black black #ece9d8; border-top: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 131.15pt; background-color: transparent;" width="175" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">System.Uri.EscapeDataString</span></span></strong></p>
</td>
<td style="border-color: black black black #ece9d8; border-top: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 124.05pt; background-color: transparent;" width="165" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">System.Uri.EscapeUriString</span></span></strong></p>
</td>
</tr>
<tr style="mso-yfti-irow: 1;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 107.55pt; background-color: transparent;" width="143" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">&amp;</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 116.05pt; background-color: transparent;" width="155" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%26</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 131.15pt; background-color: transparent;" width="175" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%26</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 124.05pt; background-color: transparent;" width="165" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">&amp;</span></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 2;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 107.55pt; background-color: transparent;" width="143" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">$</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 116.05pt; background-color: transparent;" width="155" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%24</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 131.15pt; background-color: transparent;" width="175" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%24</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 124.05pt; background-color: transparent;" width="165" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">$</span></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 3;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 107.55pt; background-color: transparent;" width="143" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">+</span></span></strong></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 116.05pt; background-color: transparent;" width="155" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%2b</span></span></strong></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 131.15pt; background-color: transparent;" width="175" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%2B</span></span></strong></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 124.05pt; background-color: transparent;" width="165" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">+</span></span></strong></p>
</td>
</tr>
<tr style="mso-yfti-irow: 4;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 107.55pt; background-color: transparent;" width="143" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">Space</span></span></strong></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 116.05pt; background-color: transparent;" width="155" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">+</span></span></strong></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 131.15pt; background-color: transparent;" width="175" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%20</span></span></strong></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 124.05pt; background-color: transparent;" width="165" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%20</span></span></strong></p>
</td>
</tr>
<tr style="mso-yfti-irow: 5;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 107.55pt; background-color: transparent;" width="143" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 116.05pt; background-color: transparent;" width="155" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%25</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 131.15pt; background-color: transparent;" width="175" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%25</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 124.05pt; background-color: transparent;" width="165" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%25</span></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 6; mso-yfti-lastrow: yes;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 107.55pt; background-color: transparent;" width="143" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">&lt; </span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 116.05pt; background-color: transparent;" width="155" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%3c</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 131.15pt; background-color: transparent;" width="175" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%3C</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 124.05pt; background-color: transparent;" width="165" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%3C</span></span></p>
</td>
</tr>
</tbody></table>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"></p>

<div class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;"> </span></span></div>
<div></div>
<span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"></span>
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">There are two decoding methods in .NET</span></span></p>

<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;">
<table class="MsoTableGrid" style="border-collapse: collapse; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes;">
<td style="border: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" width="127" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">Encoded Characters</span></span></p>
</td>
<td style="border-color: black black black #ece9d8; border-top: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 112.5pt; background-color: transparent;" width="150" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">HttpUtility.UrlDecode</span></span></p>
</td>
<td style="border-color: black black black #ece9d8; border-top: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 148.5pt; background-color: transparent;" width="198" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">System.Uri.UnescapeDataString</span></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 1;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" width="127" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%26</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 112.5pt; background-color: transparent;" width="150" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">&amp;</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 148.5pt; background-color: transparent;" width="198" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">&amp;</span></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 2;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" width="127" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%24</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 112.5pt; background-color: transparent;" width="150" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">$</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 148.5pt; background-color: transparent;" width="198" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">$</span></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 3;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" width="127" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%2b</span></span></strong></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 112.5pt; background-color: transparent;" width="150" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">+</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 148.5pt; background-color: transparent;" width="198" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">+</span></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 4;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" width="127" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%20</span></span></strong></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 112.5pt; background-color: transparent;" width="150" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">Space</span></span></strong></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 148.5pt; background-color: transparent;" width="198" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">Space</span></span></strong></p>
</td>
</tr>
<tr style="mso-yfti-irow: 5;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" width="127" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">+</span></span></strong></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 112.5pt; background-color: transparent;" width="150" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">Space</span></span></strong></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 148.5pt; background-color: transparent;" width="198" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: #ff0000; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">+</span></span></strong></p>
</td>
</tr>
<tr style="mso-yfti-irow: 6;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" width="127" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%25</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 112.5pt; background-color: transparent;" width="150" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 148.5pt; background-color: transparent;" width="198" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%</span></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 7; mso-yfti-lastrow: yes;">
<td style="border-color: #ece9d8 black black; border-left: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" width="127" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">%3c</span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 112.5pt; background-color: transparent;" width="150" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">&lt; </span></span></p>
</td>
<td style="border-color: #ece9d8 black black #ece9d8; border-right: 1pt solid black; border-bottom: 1pt solid black; padding: 0in 5.4pt; width: 148.5pt; background-color: transparent;" width="198" valign="top">
<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">&lt; </span></span></p>
</td>
</tr>
</tbody></table>
</p><p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"></p>]]></content:encoded>
			<wfw:commentRss>http://jasonrowe.com/2008/07/29/decrypt-querystring-space-issue-uriescapedatastring/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

