<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Erwin's Blog : .NET</title><link>http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx</link><description>Tags: .NET</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>How to get detailed connection logging info in .NET</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2009/12/07/how-to-get-detailed-connection-logging-info-in-net.aspx</link><pubDate>Mon, 07 Dec 2009 13:34:31 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7272968</guid><dc:creator>erwin21</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=7272968</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2009/12/07/how-to-get-detailed-connection-logging-info-in-net.aspx#comments</comments><description>&lt;p&gt;Sometimes when you connect to an external host and you get for example the error “The request was aborted: Could not create SSL/TLS secure channel”, you want to have more detailed info about what causes the error. &lt;/p&gt;  &lt;p&gt;.NET has a build in diagnostics meganism that will give you more detailed info. The following have to be added to de web.config:&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre&gt;&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;configuration&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;system.diagnostics&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;trace&lt;/span&gt; &lt;span class="attr"&gt;autoflush&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;sources&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;source&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;System.Net&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;maxdatasize&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1024&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;listeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MyTraceFile&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;listeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;source&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;source&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;System.Net.Sockets&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;maxdatasize&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1024&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;listeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MyTraceFile&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;listeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;source&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;source&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;System.Net.HttpListener&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;listeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MyTraceFile&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;listeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;source&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;source&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;System.Net.Cache&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;listeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MyTraceFile&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;listeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;source&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;sources&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;sharedListeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;              &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MyTraceFile&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;              &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;System.Diagnostics.TextWriterTraceListener&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;              &lt;span class="attr"&gt;initializeData&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;System.Net.trace.log&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;                &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;sharedListeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;switches&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;System.Net&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Verbose&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;System.Net.Sockets&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Verbose&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;switches&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;system.diagnostics&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  41:  &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;configuration&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;The detailed log info will be written to a file “System.Net.trace.log” in the root of your web application. In the log you will find info like for example this:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;System.Net Information: 0 : [1796] SecureChannel#53793566 - Certificate is of type X509Certificate2 and contains the private key.
System.Net Information: 0 : [1796] AcquireCredentialsHandle(package = Microsoft Unified Security Protocol Provider, intent  = Outbound, scc     = System.Net.SecureCredential)
System.Net Error: 0 : [1796] AcquireCredentialsHandle() failed with error 0X8009030D.
System.Net Information: 0 : [1796] AcquireCredentialsHandle(package = Microsoft Unified Security Protocol Provider, intent  = Outbound, scc     = System.Net.SecureCredential)
System.Net Error: 0 : [1796] AcquireCredentialsHandle() failed with error 0X8009030D.
System.Net.Sockets Verbose: 0 : [1796] Socket#17610470::Dispose()
System.Net Error: 0 : [1796] Exception in the HttpWebRequest#30822392:: - The request was aborted: Could not create SSL/TLS secure channel.
System.Net Error: 0 : [1796] Exception in the HttpWebRequest#30822392::EndGetResponse - The request was aborted: Could not create SSL/TLS secure channel.
System.Net.Sockets Verbose: 0 : [4632] Socket#24383397::Dispose()&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;More info about system.diagnostics you will find &lt;a href="http://msdn.microsoft.com/en-us/library/1txedc80.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7272968" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET+Framework/default.aspx">.NET Framework</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>Creating a delimiter separated list from list of strings</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2009/06/24/creating-a-delimiter-separated-list-from-list-of-strings.aspx</link><pubDate>Wed, 24 Jun 2009 09:15:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7133298</guid><dc:creator>erwin21</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=7133298</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2009/06/24/creating-a-delimiter-separated-list-from-list-of-strings.aspx#comments</comments><description>&lt;P&gt;When you have a list of strings like IList&amp;lt;string&amp;gt; of IEnumerable&amp;lt;string&amp;gt; and you want to convert it to for example a comma separated list you can easily do that with the &lt;A href="http://msdn.microsoft.com/en-us/library/57a79xd0.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/57a79xd0.aspx"&gt;String.Join&lt;/A&gt; method.&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;List&amp;lt;&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt;&amp;gt; list = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; List&amp;lt;&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt;&amp;gt;() { &lt;SPAN class=str&gt;"A"&lt;/SPAN&gt; , &lt;SPAN class=str&gt;"B"&lt;/SPAN&gt;, &lt;SPAN class=str&gt;"C"&lt;/SPAN&gt;, &lt;SPAN class=str&gt;"D"&lt;/SPAN&gt;, &lt;SPAN class=str&gt;"E"&lt;/SPAN&gt; };&lt;/PRE&gt;&lt;PRE&gt;            &lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; commaSeparated = String.Join(&lt;SPAN class=str&gt;","&lt;/SPAN&gt;, list.ToArray());&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;The output will be like this:&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;A,B,C,D,E&lt;/PRE&gt;&lt;/DIV&gt;
&lt;DIV class=csharpcode&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;This is an easy and clean way to create a delimiter separeated list of strings.&lt;/P&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7133298" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET+Framework/default.aspx">.NET Framework</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category></item><item><title>DevDays ‘09 The Netherlands day #2</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2009/05/29/devdays-09-the-netherlands-day-2.aspx</link><pubDate>Fri, 29 May 2009 18:41:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7102037</guid><dc:creator>erwin21</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=7102037</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2009/05/29/devdays-09-the-netherlands-day-2.aspx#comments</comments><description>&lt;p&gt;&lt;img style="display: inline; margin-left: 0px; margin-right: 0px" align="right" src="http://weblogs.asp.net/blogs/erwingriekspoor/logo_thumb_7CD7051A.jpg" /&gt;The second day of DevDays and 5 more interesting sessions to follow.&lt;/p&gt;  &lt;p&gt;At 9:15 the first session of this day started it called “Functional Programming in C#” from &lt;a href="http://www.sturmnet.org/blog/" target="_blank"&gt;Oliver Sturm&lt;/a&gt;. In this session we dived deep in to C# with a lot of C# 3.5 LINQ and lambda expressions. The question was, why would we use functional programming in C#, the answer was given with some practical examples.&lt;/p&gt;  &lt;p&gt;The second session of today was about “Building RESTful services with the ADO.NET Data Services “given by &lt;a href="http://blogs.msdn.com/jurgen_postelmans/" target="_blank"&gt;Jurgen Postelmans&lt;/a&gt;. ADO.NET Data Services is build on top of the Web Programming Model of WCF. In this session we find out how easily it is to create and consume REST data services on the web. In a few minutes you can create a service that exposed your data to the web.&lt;/p&gt;  &lt;p&gt;A funny and cool session was the third session of today, “Make Yourself Rich with &lt;a href="http://msdn.microsoft.com/en-us/xna/default.aspx" target="_blank"&gt;XNA&lt;/a&gt;” from &lt;a href="http://www.robmiles.com/" target="_blank"&gt;Rob Miles&lt;/a&gt;. He shows us in a funny way how you easily create a game in XNA. He uses the PC and a xbox controller to control the game, he also deployed the game on a &lt;a href="http://www.zune.net/en-US/" target="_blank"&gt;Zune&lt;/a&gt; player. In the session we build a pong game from scratch that can be controlled with the wireless xbox controller, it was surprisingly easy to create. Oh and I think I should mention his &lt;a href="http://www.amazon.co.uk/Programming-Microsoft-Studio-Express-PRO-Developer/dp/0735625220/ref=pd_bbs_sr_6?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199897096&amp;amp;sr=8-6" target="_blank"&gt;book&lt;/a&gt; ;-).&lt;/p&gt;  &lt;p&gt;The fourth session of today “IE8 and Web Standards” given by &lt;a href="http://www.quirksmode.org/blog/index.html" target="_blank"&gt;Peter-Paul Koch&lt;/a&gt;. What is the purpose of using web standards of today? He gives some examples how to implement the &lt;a href="http://www.w3.org/" target="_blank"&gt;W3C&lt;/a&gt; web standards and give some tips and tricks. He also talked about the new IE8 browser from Microsoft and how it implements the web standards.&lt;/p&gt;  &lt;p&gt;Last and fifth session of today in the great hall (with great chairs, i needed that after this long day) about “&lt;a href="http://www.asp.net/mvc/" target="_blank"&gt;ASP.NET MVC&lt;/a&gt; Introduction” from &lt;a href="http://www.pluralsight.com/community/blogs/fritz/default.aspx" target="_blank"&gt;Fritz Onion&lt;/a&gt;. This talk was about the ASP.NET MVC framework, he talked about the differences between typical ASP.NET applications and the ASP.NET MVC application. How do we use models, views and controllers to create a functional web application and what advantages does this model offer over the standard web forms model?&lt;/p&gt;  &lt;p&gt;After this long day DevDays ‘09 came to an end, it was very interesting to attend all these sessions.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7102037" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/ASP.NET+MVC/default.aspx">ASP.NET MVC</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/DevDays/default.aspx">DevDays</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/XNA/default.aspx">XNA</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Standards/default.aspx">Standards</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/REST/default.aspx">REST</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/ADO.NET/default.aspx">ADO.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>DevDays ‘09 The Netherlands day #1</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2009/05/28/devdays-09-the-netherlands-day-1.aspx</link><pubDate>Thu, 28 May 2009 19:19:57 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7100967</guid><dc:creator>erwin21</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=7100967</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2009/05/28/devdays-09-the-netherlands-day-1.aspx#comments</comments><description>&lt;img style="border-right-width: 0px; margin: 0px 0px 10px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="logo" border="0" alt="logo" align="right" src="http://weblogs.asp.net/blogs/erwingriekspoor/logo_thumb_7CD7051A.jpg" width="135" height="79" /&gt;Today was the first day of DevDays ‘09 in the World Forum in The Hague city. There are around 80 sessions in these two days, from cloud computing, .NET, Ajax to Silverlight and a lot more subjects.   &lt;p&gt;The first sessions of today was the key note session with &lt;a href="http://www.davidchappell.com/blog/index.php" target="_blank"&gt;David Chappel&lt;/a&gt;, the talk was about Microsoft's cloud computing platform &lt;a href="http://www.microsoft.com/azure/default.mspx" target="_blank"&gt;Azure&lt;/a&gt;. He told us what this new technology means and what it can do, like how do we use it in practice. The technologies that came by are Windows Azure, .NET Services and SQL services. He also mentioned some alternatives like &lt;a href="http://aws.amazon.com/ec2/" target="_blank"&gt;Amazone&amp;#160; EC2&lt;/a&gt;, &lt;a href="http://code.google.com/appengine/" target="_blank"&gt;Google Appengine&lt;/a&gt; and &lt;a href="http://www.salesforce.com/platform/" target="_blank"&gt;Salesforce Platform&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The second talk I went to was C# 4.0 and the Future of C# from &lt;a href="http://www.krishworld.com/" target="_blank"&gt;Krishnan Subramanian&lt;/a&gt;, in a very packed hall he talked about dynamic &amp;amp; functional languages and concurrent programming. Some topics where dynamically typed objects, optional and named parameters, improved to COM interoperability and co and contra-variance. He also talked about the future of C# and gives use some cool demo’s about on the fly compiling and running of C# code.&lt;/p&gt;  &lt;p&gt;The third talk was about attack and defense and securing ASP.NET applications from &lt;a href="http://www.pluralsight.com/community/blogs/keith/default.aspx" target="_blank"&gt;Keith Brown&lt;/a&gt;, after some very nice yo-yo tricks Keith talked about how-to secure our Web applications from potential hackers. The topics that came along are server side validation, user rights, filtering, SQL injection and XSS. He also showed us how easy it was to hack a product database search web application with SQL injection if you doesn’t use parameterized queries.&lt;/p&gt;  &lt;p&gt;In forth and last talk &lt;a href="http://www.pluralsight.com/fritz/" target="_blank"&gt;Fritz Onion&lt;/a&gt; talked about ASP.NET AJAX 4.0. How do we improve our client-side development experience this was the main subject of the talk. The talk covers subjects like the new client-side template and data binding model, declarative control instantiation, the new DataView control, markup extensions, and bindings. With ASP.NET AJAX 4.0 we can faster build quickly responding web application without creating a lot of client side code your self.&lt;/p&gt;  &lt;p&gt;The event is very well organized at a nice location, tomorrow day two with a lot of new interesting sessions. &lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7100967" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Azure/default.aspx">Azure</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Security/default.aspx">Security</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/DevDays/default.aspx">DevDays</category></item><item><title>Convert string to byte array and byte array to string</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2009/05/01/convert-string-to-byte-array-and-byte-array-to-string.aspx</link><pubDate>Fri, 01 May 2009 11:19:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7069794</guid><dc:creator>erwin21</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=7069794</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2009/05/01/convert-string-to-byte-array-and-byte-array-to-string.aspx#comments</comments><description>&lt;p&gt;How do we convert a string to a byte array (byte[]) and the other way around. The most simple way to do this is with the &lt;a href="http://msdn.microsoft.com/en-us/library/system.text.encoding.aspx" target="_blank"&gt;Encoding&lt;/a&gt; class:&lt;/p&gt; &lt;div class="csharpcode"&gt;&lt;em&gt;String to bytes:&lt;/em&gt;&lt;/div&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;byte&lt;/span&gt;[] bytes = Encoding.UTF8.GetBytes(&lt;span class="str"&gt;"foo"&lt;/span&gt;);&lt;/pre&gt;&lt;br&gt;&lt;em&gt;Bytes to string:&lt;/em&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; foo = Encoding.ASCII.GetString(bytes);&lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;But what if you don’t know the encoding type? Well you can use the following code snippet to change the string to byte array and byte array to string:&lt;/p&gt;
&lt;div class="csharpcode"&gt;&lt;em&gt;String to bytes:&lt;/em&gt;&lt;br&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;byte&lt;/span&gt;[] ConvertStringToBytes(&lt;span class="kwrd"&gt;string&lt;/span&gt; input)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;  MemoryStream stream = &lt;span class="kwrd"&gt;new&lt;/span&gt; MemoryStream();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;  &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;  &lt;span class="kwrd"&gt;using&lt;/span&gt; (StreamWriter writer = &lt;span class="kwrd"&gt;new&lt;/span&gt; StreamWriter(stream))&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;  {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    writer.Write(input);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    writer.Flush();&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;  }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;  &lt;span class="kwrd"&gt;return&lt;/span&gt; stream.ToArray();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;}&lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;&lt;/p&gt;
&lt;div class="csharpcode"&gt;&lt;em&gt;Bytes to string:&lt;/em&gt;&lt;br&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ConvertBytesToString(&lt;span class="kwrd"&gt;byte&lt;/span&gt;[] bytes)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;  &lt;span class="kwrd"&gt;string&lt;/span&gt; output = String.Empty;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;  MemoryStream stream = &lt;span class="kwrd"&gt;new&lt;/span&gt; MemoryStream(bytes);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;  stream.Position = 0;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;  &lt;span class="kwrd"&gt;using&lt;/span&gt; (StreamReader reader = &lt;span class="kwrd"&gt;new&lt;/span&gt; StreamReader(stream))&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;  {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    output = reader.ReadToEnd();&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;  }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;  &lt;span class="kwrd"&gt;return&lt;/span&gt; output;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;}&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;With this snippets you can convert if you don’t know the encoding of a certain string.&lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7069794" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET+Framework/default.aspx">.NET Framework</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Umbraco Demo</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2009/04/17/umbraco-demo.aspx</link><pubDate>Fri, 17 Apr 2009 07:36:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7048673</guid><dc:creator>erwin21</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=7048673</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2009/04/17/umbraco-demo.aspx#comments</comments><description>&lt;p&gt;Last week I have seen a Demo about &lt;a href="http://umbraco.org" target="_blank"&gt;Umbraco&lt;/a&gt;, the demo was given by &lt;a href="http://www.richardsoeteman.net" target="_blank"&gt;Richard Soeteman&lt;/a&gt; from &lt;a href="http://www.soetemansoftware.nl/" target="_blank"&gt;Soetemansoftware&lt;/a&gt; an experienced Umbraco developer.&lt;/p&gt;  &lt;p&gt;Umbraco is a CMS that fully integrated with .NET, it’s supports .NET out of the out-of-the-box, you can use .NET Custom Controls and .NET User Controls without extra effort. You can place your controls everywhere in the template and even in the rich text editor, Umbraco can also send data to your controls via Public Properties. Umbraco is fully compatible with ASP.NET Ajax and javascript frameworks like jQuery and prototype.    &lt;br /&gt;    &lt;br /&gt;The templates in Umbraco are build with XSLT, with XSLT so you are very flexible to create your html. Umbraco supports also XSLT extension methods, so when you miss some functionality in XSLT you can create methods it in .NET and call them from your XSLT templates.&lt;/p&gt;  &lt;p&gt;What’s also great about Umbraco is the event model, you can hook up at a lot of &lt;a href="http://www.richardsoeteman.net/PermaLink,guid,f470b6cf-40da-4aa9-a0d9-7b984fe9bf59.aspx" target="_blank"&gt;events&lt;/a&gt; and create your own logic. Hooking into these events is simply a matter of creating a .NET class that implements an interface.&lt;/p&gt;  &lt;p&gt;What i haven’t mentioned yet is that Umbraco is licensed under the &lt;a href="http://en.wikipedia.org/wiki/MIT_License" target="_blank"&gt;MIT license&lt;/a&gt;, so you can see and modify all the source code, but isn’t likely that you will change the source because it support mostly all features that are needed.&lt;/p&gt;  &lt;p&gt;Richard Soeteman have given us Demo that includes most of aspects of Umbraco. First we did the installation of Umbraco. It’s very easy to install Umbraco, you only have to unzip Umbraco to the wwwroot and request the website and follow the configuration wizard. You can start with a empty Umbraco or with a starter kit.    &lt;br /&gt;    &lt;br /&gt;In the demo we started with the starter kit Umbraco installation and we added also some packages that are needed for the demo, we modified some templates and created some usercontrols in Visual Studio and added them to Umbraco.&lt;/p&gt;  &lt;p&gt;With this demo I get a good impression about Umbraco, Umbraco is very easy to use and to implement. So if your are searching for a open source .NET CMS, try it out at &lt;a href="http://umbraco.org/" target="_blank"&gt;umbraco.org&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7048673" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/CMS/default.aspx">CMS</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Umbraco/default.aspx">Umbraco</category></item><item><title>Add Web Reference with certificates on https</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2009/01/27/add-web-reference-with-certificates-on-https.aspx</link><pubDate>Tue, 27 Jan 2009 18:53:39 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6861980</guid><dc:creator>erwin21</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=6861980</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2009/01/27/add-web-reference-with-certificates-on-https.aspx#comments</comments><description>&lt;p&gt;Today I was adding a webservice via &amp;quot;Add Web Reference&amp;quot; to my project. The webservice was only accessible on https with a client certificate. When I did &amp;quot;Add Web Reference&amp;quot; I got a &amp;quot;The underlying connection was closed: Could not establish secure channel for SSL/TLS&amp;quot;, but in IE it's works perfect. After some research I found an other way to add the webservice via &amp;quot;Add Web Reference&amp;quot;. You can do it like this:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Save the WSDL to a location on your machine.&lt;/li&gt;    &lt;li&gt;Copy the path.&lt;/li&gt;    &lt;li&gt;Go to the Add Web Reference in your project.&amp;#160; &lt;/li&gt;    &lt;li&gt;Paste the path you copied into the URL.&lt;/li&gt;    &lt;li&gt;Click on Go.&lt;/li&gt;    &lt;li&gt;Click on Add Reference&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Don't forget to change the webservice url in your Web.config or App.config.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6861980" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET+Framework/default.aspx">.NET Framework</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Tips+Tricks/default.aspx">Tips Tricks</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Webservice/default.aspx">Webservice</category></item><item><title>One web setup project for deploying on multiple environments</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2009/01/21/one-web-setup-project-for-deploying-on-multiple-environments.aspx</link><pubDate>Wed, 21 Jan 2009 20:48:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6852163</guid><dc:creator>erwin21</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=6852163</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2009/01/21/one-web-setup-project-for-deploying-on-multiple-environments.aspx#comments</comments><description>&lt;p&gt;A common task in a project is preparing your for a deployment. The easiest way to do this is making use of a &lt;a href="http://msdn.microsoft.com/en-us/library/wx3b589t.aspx" mce_href="http://msdn.microsoft.com/en-us/library/wx3b589t.aspx" target="_blank"&gt;Web Setup Project&lt;/a&gt;. But how do we make this Web Setup Project suitable for multiple environments, because it's most likely that there are environments like Development, Test, Acceptance and Production.&lt;/p&gt;  &lt;p&gt;The key to this solution is the "Condition" property. If you add a file to the Web Setup Project (In the File System view right mouse button on the Web Application Folder, then Add -&amp;gt; File) and select it you can find the "Condition" property in the properties window.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/erwingriekspoor/WindowsLiveWriter/Onewebsetupformultipleenvironments_14CEC/vs_4.jpg" mce_href="http://weblogs.asp.net/blogs/erwingriekspoor/WindowsLiveWriter/Onewebsetupformultipleenvironments_14CEC/vs_4.jpg"&gt;&lt;img src="http://weblogs.asp.net/blogs/erwingriekspoor/WindowsLiveWriter/Onewebsetupformultipleenvironments_14CEC/vs_thumb_1.jpg" style="border-width: 0px;" alt="vs" mce_src="http://weblogs.asp.net/blogs/erwingriekspoor/WindowsLiveWriter/Onewebsetupformultipleenvironments_14CEC/vs_thumb_1.jpg" width="541" border="0" height="317"&gt;&lt;/a&gt;     &lt;br&gt;    &lt;br&gt;We add the following value to the "Condition" property ENV="Prod", this is for the production environment, for the test environment it will be something like this ENV="Test".&lt;/p&gt;  &lt;p&gt;We also set the "TargetName" propery to Web.Config so the Web Setup Project will output the configuration file as Web.Config.&lt;/p&gt;  &lt;p&gt;Well you can add unlimited Web.Config files to your Web Setup Project, they are all output as Web.Config but not all at the same time. So how can we choose the correct Web.Config for your environment, well like this:    &lt;br&gt;    &lt;br&gt;&lt;i&gt;%windir%\system32\msiexec.exe /i "Setup.msi" ENV="Prod"&lt;/i&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;i&gt;&lt;a href="http://technet.microsoft.com/nl-nl/library/cc759262.aspx" mce_href="http://technet.microsoft.com/nl-nl/library/cc759262.aspx" target="_blank"&gt;msiexec.exe&lt;/a&gt;&lt;/i&gt; (the Windows installer) &lt;/li&gt;    &lt;li&gt;&lt;i&gt;/i&lt;/i&gt; (is the install switch) &lt;/li&gt;    &lt;li&gt;&lt;i&gt;"Setup.msi"&lt;/i&gt; (compiled output of the Web Setup Project) &lt;/li&gt;    &lt;li&gt;&lt;i&gt;ENV="Prod"&lt;/i&gt; (the condition value). &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you run this the setup will be started, after the setup is finished you will notice that only the Web.Config is installed with the "Condition" property set to ENV="Prod".&lt;/p&gt;  &lt;p&gt;To make this all fool proof you can make a shortcut to this command line, like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/erwingriekspoor/WindowsLiveWriter/Onewebsetupformultipleenvironments_14CEC/shortcut_4.jpg" mce_href="http://weblogs.asp.net/blogs/erwingriekspoor/WindowsLiveWriter/Onewebsetupformultipleenvironments_14CEC/shortcut_4.jpg"&gt;&lt;img src="http://weblogs.asp.net/blogs/erwingriekspoor/WindowsLiveWriter/Onewebsetupformultipleenvironments_14CEC/shortcut_thumb_1.jpg" style="border-width: 0px;" alt="shortcut" mce_src="http://weblogs.asp.net/blogs/erwingriekspoor/WindowsLiveWriter/Onewebsetupformultipleenvironments_14CEC/shortcut_thumb_1.jpg" width="379" border="0" height="520"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now when you click on this shortcut you get the same result.&lt;/p&gt;  &lt;p&gt;So with this solution you can make one Web Setup Project for all your environments and create a better and stable deployment solution.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6852163" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Tips+Tricks/default.aspx">Tips Tricks</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Configuration/default.aspx">Configuration</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Deployment/default.aspx">Deployment</category></item><item><title>Ajax.NET debugging</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2009/01/13/ajax-net-debugging.aspx</link><pubDate>Tue, 13 Jan 2009 11:04:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6833312</guid><dc:creator>erwin21</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=6833312</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2009/01/13/ajax-net-debugging.aspx#comments</comments><description>&lt;p&gt;Most people use alert() to debug their JavaScript, but the Microsoft Ajax Library has a better alterative &lt;a href="http://msdn.microsoft.com/en-us/library/bb397422.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb397422.aspx" target="_blank"&gt;Sys.Debug&lt;/a&gt;. Sys.Debug has some methods for logging messages to the browser console. Like this:&lt;/p&gt;
  
To log a message:&lt;br&gt;&lt;pre class="csharpcode"&gt;Sys.Debug.trace(“Log to the console”)&lt;/pre&gt;

To log an object:&lt;br&gt;&lt;pre class="csharpcode"&gt;Sys.Debug.traceDump(someObject);&lt;/pre&gt;

&lt;p&gt;You can use Web Development Helper for IE, and Firebug for Firefox to see your console messages. Or use textarea element with the id "TraceConsole" to trace your messages:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;textarea&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;=”&lt;span class="attr"&gt;TraceConsole&lt;/span&gt;” &lt;span class="attr"&gt;rows&lt;/span&gt;=”&lt;span class="attr"&gt;50&lt;/span&gt;” &lt;span class="attr"&gt;cols&lt;/span&gt;=”&lt;span class="attr"&gt;50&lt;/span&gt;”&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;textarea&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;pre class="csharpcode"&gt;From:&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/alnurismail/archive/2009/01/12/a-better-alternative-to-using-alert-for-debugging.aspx" mce_href="http://weblogs.asp.net/alnurismail/archive/2009/01/12/a-better-alternative-to-using-alert-for-debugging.aspx" target="_blank"&gt;http://weblogs.asp.net/alnurismail/archive/2009/01/12/a-better-alternative-to-using-alert-for-debugging.aspx&lt;/a&gt;&lt;/p&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6833312" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Debugging/default.aspx">Debugging</category></item><item><title>25 excellent tips to improve your jQuery</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2008/12/24/25-excellent-tips-to-improve-your-jquery.aspx</link><pubDate>Wed, 24 Dec 2008 08:59:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6805885</guid><dc:creator>erwin21</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=6805885</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2008/12/24/25-excellent-tips-to-improve-your-jquery.aspx#comments</comments><description>&lt;p&gt;More and more ASP.NET developers are going to use &lt;a href="http://jquery.com/" target="_blank" mce_href="http://jquery.com/"&gt;jQuery&lt;/a&gt;. jQuery is a fast and easy to use javascript framework.&lt;/p&gt;&lt;p&gt;On the tvi design blog a nice &lt;a href="http://www.tvidesign.co.uk/blog/improve-your-jquery-25-excellent-tips.aspx" target="_blank" mce_href="http://www.tvidesign.co.uk/blog/improve-your-jquery-25-excellent-tips.aspx"&gt;article&lt;/a&gt; has been posted with some very excellent tips how to improve your jQuery. All tips are very useful and gives you easy improvements, so take a look!&lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6805885" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/jQuery/default.aspx">jQuery</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Tips+Tricks/default.aspx">Tips Tricks</category></item><item><title>Edit existing assemblies when you have no source code</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2008/12/15/edit-existing-assemblies-when-you-have-no-source-code.aspx</link><pubDate>Mon, 15 Dec 2008 23:33:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6788816</guid><dc:creator>erwin21</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=6788816</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2008/12/15/edit-existing-assemblies-when-you-have-no-source-code.aspx#comments</comments><description>&lt;p&gt;Every now and then there are situations when you have no source code available, because you lost it or you don't get it. There are some solutions to see or get the source code, with &lt;a href="http://www.red-gate.com/products/reflector/" target="_blank" mce_href="http://www.red-gate.com/products/reflector/"&gt;Reflector&lt;/a&gt; you can see the source code but you can't edit it, but with reflector you can do a lot more. &lt;/p&gt;&lt;p&gt;You can add add-ins to Reflector, like &lt;a href="http://www.denisbauer.com/NETTools/FileDisassembler.aspx" target="_blank" mce_href="http://www.denisbauer.com/NETTools/FileDisassembler.aspx"&gt;FileDissembler&lt;/a&gt; this plugin dump all source code of the assembly to a folder and create a solution file so you can open it Visual Studio. &lt;/p&gt;&lt;p&gt;Sometimes the recompile won't work or it's a lot of extra work, then you can use the Reflector plugin &lt;a href="http://reflexil.sourceforge.net" target="_blank" mce_href="http://reflexil.sourceforge.net"&gt;Reflexil&lt;/a&gt; with this assembly you able to edit the IL (Intermediate Language) code of the assembly and save it back to a dll file. This is very handy to solve little issues, like changing plain text that's compiled within the assembly and yes then you know why it isn't handy to put plain text in your source code.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6788816" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Reflector/default.aspx">Reflector</category></item><item><title>Parse QueryString with the HttpUtility</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2008/11/21/parse-querystring-with-the-httputility.aspx</link><pubDate>Fri, 21 Nov 2008 12:45:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6749317</guid><dc:creator>erwin21</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=6749317</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2008/11/21/parse-querystring-with-the-httputility.aspx#comments</comments><description>&lt;p&gt;If you have a querystring from for example the &lt;a href="http://msdn.microsoft.com/en-us/library/system.uri.aspx" target="_blank" mce_href="http://msdn.microsoft.com/en-us/library/system.uri.aspx"&gt;Uri&lt;/a&gt; class (&lt;a href="http://msdn.microsoft.com/en-us/library/system.uri.query.aspx" target="_blank" mce_href="http://msdn.microsoft.com/en-us/library/system.uri.query.aspx"&gt;Uri.Query&lt;/a&gt;) and you want to parse it so you can get al the params and values, instead of doing al lot of string manipulation you can use a very handy utility class, the &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.httputility.aspx" target="_blank" mce_href="http://msdn.microsoft.com/en-us/library/system.web.httputility.aspx"&gt;HttpUtility&lt;/a&gt;. The HttpUtility class has a method &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.httputility.parsequerystring.aspx" target="_blank" mce_href="http://msdn.microsoft.com/en-us/library/system.web.httputility.parsequerystring.aspx"&gt;&lt;span class="nu"&gt;&lt;/span&gt;ParseQueryString&lt;/a&gt;, this method parse a query string into a namevaluecollection. Like this:&lt;br&gt;&lt;br&gt; 
&lt;/p&gt;
&lt;div class="csharp" style="border: 1px solid rgb(208, 208, 208); font-family: monospace; color: rgb(0, 0, 102); background-color: rgb(240, 240, 240);"&gt;
&lt;ol&gt;
&lt;li style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;&lt;div style="margin: 0pt; padding: 0pt; background: transparent none repeat scroll 0% 0%; font-family: monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 1em; line-height: 1.2em; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: top; color: rgb(0, 0, 32);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;string&lt;/span&gt; querystring &lt;span style="color: rgb(0, 128, 0);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102);"&gt;"?var1=test&amp;amp;var2=test2"&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;

&lt;li style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;&lt;div style="margin: 0pt; padding: 0pt; background: transparent none repeat scroll 0% 0%; font-family: monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 1em; line-height: 1.2em; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: top; color: rgb(0, 0, 32);"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;

&lt;li style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;&lt;div style="margin: 0pt; padding: 0pt; background: transparent none repeat scroll 0% 0%; font-family: monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 1em; line-height: 1.2em; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: top; color: rgb(0, 0, 32);"&gt;NameValueCollection nvColl &lt;span style="color: rgb(0, 128, 0);"&gt;=&lt;/span&gt; HttpUtility.&lt;span style="color: rgb(0, 0, 255);"&gt;ParseQueryString&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;querystring&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;

&lt;li style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;&lt;div style="margin: 0pt; padding: 0pt; background: transparent none repeat scroll 0% 0%; font-family: monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 1em; line-height: 1.2em; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: top; color: rgb(0, 0, 32);"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;

&lt;li style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;&lt;div style="margin: 0pt; padding: 0pt; background: transparent none repeat scroll 0% 0%; font-family: monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 1em; line-height: 1.2em; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: top; color: rgb(0, 0, 32);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;string&lt;/span&gt; var1 &lt;span style="color: rgb(0, 128, 0);"&gt;=&lt;/span&gt; nvColl&lt;span style="color: rgb(0, 0, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;"var1"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;

&lt;li style="vertical-align: top; font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;&lt;div style="margin: 0pt; padding: 0pt; background: transparent none repeat scroll 0% 0%; font-family: monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 1em; line-height: 1.2em; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: top; color: rgb(0, 0, 32);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;string&lt;/span&gt; var2 &lt;span style="color: rgb(0, 128, 0);"&gt;=&lt;/span&gt; nvColl&lt;span style="color: rgb(0, 0, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;"var2"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;&lt;p&gt;&amp;nbsp;The string "var1" contains "test" and the "var2" contains "test2".&lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6749317" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/Framework/default.aspx">Framework</category></item><item><title>New .NET Logo</title><link>http://weblogs.asp.net/erwingriekspoor/archive/2008/10/27/new-net-logo.aspx</link><pubDate>Mon, 27 Oct 2008 18:29:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6721956</guid><dc:creator>erwin21</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/erwingriekspoor/rsscomments.aspx?PostID=6721956</wfw:commentRss><comments>http://weblogs.asp.net/erwingriekspoor/archive/2008/10/27/new-net-logo.aspx#comments</comments><description>&lt;p&gt;&amp;nbsp;&lt;br&gt;
After 8 years it was time to change the .NET logo. The new logo stand for consistency, robustness and great user experiences.&lt;br&gt;
&lt;br&gt;
&lt;img src="http://geekswithblogs.net/images/geekswithblogs_net/erwin/blog/newdotnetlogo_2.png" alt="" _fcksavedurl="/images/geekswithblogs_net/erwin/blog/newdotnetlogo_2.png" width="500" height="234"&gt;&lt;br&gt;
The design look like a "wave" with a suggestion of the letter 'N' that
will become recognizable over time as shorthand for the .NET brand name.&lt;br&gt;
&lt;br&gt;
From: &lt;a href="http://blogs.msdn.com/msmossyblog/archive/2008/10/25/embrace-the-new-net-logo.aspx" _fcksavedurl="http://blogs.msdn.com/msmossyblog/archive/2008/10/25/embrace-the-new-net-logo.aspx"&gt;http://blogs.msdn.com/msmossyblog/archive/2008/10/25/embrace-the-new-net-logo.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6721956" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/erwingriekspoor/archive/tags/.NET/default.aspx">.NET</category></item></channel></rss>