<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.windowsclient.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>Zuker On Foundations</title><link>http://blogs.windowsclient.net/zuker/default.aspx</link><description>The realm of .NET (WPF, WCF and all around)</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20423.869)</generator><item><title>Execute code within timeout using threads</title><link>http://blogs.windowsclient.net/zuker/archive/2008/08/21/execute-code-within-timeout-using-threads-and-lambda.aspx</link><pubDate>Thu, 21 Aug 2008 06:20:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:52660</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=52660</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/08/21/execute-code-within-timeout-using-threads-and-lambda.aspx#comments</comments><description>&lt;p&gt;Via this &lt;a class="" href="http://weblogs.asp.net/avnerk/archive/2007/07/24/waiting-for-a-return-value-from-an-asynchronous-method.aspx"&gt;post&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Following is a quick way to execute code and limiting it within a certain timeout.&lt;/p&gt;
&lt;p&gt;Note that the code spawns a new thread.&lt;br /&gt;A better safer code would be using the ThreadPool and wait on the WaitHandle.&lt;/p&gt;
&lt;p&gt;&lt;font color="#2b91af" size="2"&gt;Thread&lt;/font&gt;&lt;font size="2"&gt; t = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Thread&lt;/font&gt;&lt;font size="2"&gt;(&lt;br /&gt;&amp;nbsp;&amp;nbsp; () =&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;//Do Stuff Here&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; });&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; t.Start();&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp; &lt;/font&gt;bool&lt;/font&gt;&lt;font size="2"&gt; success = t.Join(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;TimeSpan&lt;/font&gt;&lt;font size="2"&gt;.FromSeconds(10));&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp; &lt;/font&gt;if&lt;/font&gt;&lt;font size="2"&gt; (success)&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;//Thread completed successfully&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp; &lt;/font&gt;else&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;throw&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;TimeoutException&lt;/font&gt;&lt;font size="2"&gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=52660" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/.NET/default.aspx">.NET</category></item><item><title>PNG Transparency for IE6</title><link>http://blogs.windowsclient.net/zuker/archive/2008/08/11/png-transparency-for-ie6.aspx</link><pubDate>Mon, 11 Aug 2008 08:09:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:49353</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=49353</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/08/11/png-transparency-for-ie6.aspx#comments</comments><description>&lt;p&gt;Internet Explorer 6 has problems displaying a PNG image with alpha transparency.&lt;/p&gt;
&lt;p&gt;Follow the instructions detailed in &lt;a class="" href="http://christopherschmitt.com/2007/10/30/png-transparency-for-internet-explorer-ie6-and-beyond/"&gt;this post&lt;/a&gt; to solve the issue.&lt;/p&gt;
&lt;p&gt;Note that you should apply width &amp;amp; height for every image you apply the style to. (At least from my experience)&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=49353" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/Web/default.aspx">Web</category></item><item><title>Hosting WCF Service in IIS w/ Windows Authentication</title><link>http://blogs.windowsclient.net/zuker/archive/2008/08/10/hosting-wcf-service-in-iis-w-windows-authentication.aspx</link><pubDate>Sun, 10 Aug 2008 11:00:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:49212</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=49212</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/08/10/hosting-wcf-service-in-iis-w-windows-authentication.aspx#comments</comments><description>&lt;p&gt;I can&amp;#39;t believe I wasted 10minutes on something that should be the simplest ever.&lt;/p&gt;
&lt;p&gt;You might encounter an exception when trying to host a WCF service in IIS with windows authentication where it would say the IIS isn&amp;#39;t configured with windows auth so the service itself can&amp;#39;t be configured with windows auth.&lt;/p&gt;
&lt;p&gt;I had that exception.&lt;/p&gt;
&lt;p&gt;The problem is that the IIS vdir was configured with windows auth! and it still blew up.&lt;/p&gt;
&lt;p&gt;After a quick searching, I found this &lt;a class="" href="http://blogs.msdn.com/appsec/archive/2007/05/21/what-to-do-when-iis-mmc-doesn-t-do-the-work.aspx"&gt;post&lt;/a&gt; which did the trick.&lt;/p&gt;
&lt;p&gt;So.. if you do encounter this, I hope I saved you some time.&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=49212" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/WCF/default.aspx">WCF</category></item><item><title>LINQ to SQL Dynamic Mapping</title><link>http://blogs.windowsclient.net/zuker/archive/2008/08/10/linq-to-sql-dynamic-mapping.aspx</link><pubDate>Sun, 10 Aug 2008 08:18:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:49204</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=49204</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/08/10/linq-to-sql-dynamic-mapping.aspx#comments</comments><description>&lt;p&gt;Via this &lt;a class="" href="http://weblogs.asp.net/guybarrette/archive/2008/07/23/linq-to-sql-dynamic-mapping.aspx"&gt;post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The post discusses the issue of using LINQ-to-SQL with dynamic mappings.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;The problem&lt;br /&gt;&lt;/strong&gt;You have SQL Servers for each of your environments (development, test, pre-prod, production) and in each one, the table names are different.&amp;nbsp; In fact, it’s not the table names that are different but the schema names but since the schema name is part of the table name, it must be specified.&lt;br /&gt;Ex : dev.ZeTable et prod.ZeTable&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Easy to solve, right?&amp;nbsp; Just put the schema value in the config file and do a simple concatenation at runtime.&amp;nbsp; Well, it’s not as easy as it seams because the table name is stored in an attribute of the partial class generated by the LINQ to SQL designer and Microsoft didn’t provide a way or method to change it at runtime.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;[Table(Name=&amp;quot;dev.ZeTable&amp;quot;)]&lt;br /&gt;public partial class TheTable &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Solution&lt;/strong&gt;&lt;br /&gt;The solution is to dynamically load at runtime a mapping specific for each environment.&lt;br /&gt;Here’s how to do it:. (Go to the post..)&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=49204" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>Hosting WCF Service in IIS - 404 / Get Plain Text</title><link>http://blogs.windowsclient.net/zuker/archive/2008/08/06/hosting-wcf-service-in-iis-404-get-plain-text.aspx</link><pubDate>Wed, 06 Aug 2008 07:42:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:47988</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=47988</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/08/06/hosting-wcf-service-in-iis-404-get-plain-text.aspx#comments</comments><description>&lt;p&gt;If you&amp;#39;re trying to host a WCF service with a .svc extension and you get a 404 response or get plain text, it means your IIS had not been configured with the .svc extension.&lt;/p&gt;
&lt;p&gt;Follow &lt;a class="" href="http://blogs.msdn.com/wenlong/archive/2006/09/10/748294.aspx"&gt;this post&lt;/a&gt; instructions.&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=47988" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/WCF/default.aspx">WCF</category></item><item><title>IntelliSense for Expression Blend </title><link>http://blogs.windowsclient.net/zuker/archive/2008/08/05/intellisense-for-expression-blend.aspx</link><pubDate>Tue, 05 Aug 2008 05:48:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:47636</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=47636</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/08/05/intellisense-for-expression-blend.aspx#comments</comments><description>&lt;p&gt;Via &lt;a class="" href="http://blogs.telerik.com/StefanDobrev/Posts/08-08-04/IntelliSense_for_Expression_Blend.aspx"&gt;Stefan&amp;#39;s post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Wonderful News! You can enable intellisense in blend&lt;/p&gt;
&lt;p&gt;You need to install a plug-in and there&amp;#39;s a few gotcha&amp;#39;s so do read Stefan&amp;#39;s post for all the details.&lt;/p&gt;
&lt;p&gt;A&amp;nbsp;great discovery :)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=47636" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.windowsclient.net/zuker/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>Text Trimming Using CSS</title><link>http://blogs.windowsclient.net/zuker/archive/2008/07/29/text-trimming-using-css.aspx</link><pubDate>Tue, 29 Jul 2008 11:44:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:45663</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=45663</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/07/29/text-trimming-using-css.aspx#comments</comments><description>&lt;p&gt;There is a non-so-familiar way to apply trimming to text in HTML using simple CSS.&lt;/p&gt;
&lt;p&gt;In order to apply a certain width on&amp;nbsp;an element and together ensure that its innerText will be bound to that and will be trimmed accordingly, we can do the following:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;span&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;class&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;LongTextContainer&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;Very long text here.. Bla Bla Bla&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;span&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt; 
&lt;p&gt;.LongTextContainer&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;{&lt;br /&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;nbsp;&amp;nbsp; width&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;: &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;300px&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;br /&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;nbsp;&amp;nbsp; position&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;: &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;fixed&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;br /&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;nbsp;&amp;nbsp; overflow&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;: &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;hidden&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;br /&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;nbsp;&amp;nbsp; text-overflow&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;: &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;ellipsis&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;br /&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;nbsp;&amp;nbsp; white-space&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;: &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;nowrap&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;br /&gt;}&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;The text-overflow determines that the text will be trimmed while showing ellipsis in the end.&lt;/p&gt;
&lt;p&gt;This seems to do the trick quite perfect.&lt;/p&gt;
&lt;p&gt;Read additional information in this &lt;a class="" href="http://blogs.atlassian.com/developer/2007/08/post.html"&gt;post&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=45663" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/Web/default.aspx">Web</category></item><item><title>Building a WCF Smart Router - The Beginning</title><link>http://blogs.windowsclient.net/zuker/archive/2008/07/25/building-a-wcf-smart-router-the-beginning.aspx</link><pubDate>Fri, 25 Jul 2008 15:04:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:44660</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=44660</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/07/25/building-a-wcf-smart-router-the-beginning.aspx#comments</comments><description>&lt;p&gt;In one of my projects I was working on building a smart router facade using WCF.&lt;/p&gt;
&lt;p&gt;The general idea -&lt;br /&gt;The consumer will have an&amp;nbsp;actual endpoint to the router.&lt;br /&gt;The router intercepts the client messages, performs all sort of necessary operations and processing, then sends the message to the actual service.&lt;/p&gt;
&lt;p&gt;This is called a &amp;quot;smart&amp;quot; router since it&amp;#39;s not playing the part as a simple pass-through router.&lt;br /&gt;It actually provides service virtualization, interception of messages and passing it along to the appropriate endpoint, taking into mind Management, Monitoring and Governance. A sort of ESB.&lt;br /&gt;The idea was to support most configurations and profiles of common services all around.&lt;/p&gt;
&lt;p&gt;The project was not trivial to write. Plus, it&amp;#39;s pretty far from being truly 100% complete.&lt;/p&gt;
&lt;p&gt;I will write a series of posts illustrating the key points I had encountered throughout the project, there were quite many.&lt;/p&gt;
&lt;p&gt;For the meantime, a good place to start would be reading the following articles by Michele Leroux Bustamante -&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://msdn.microsoft.com/en-us/magazine/cc500646.aspx"&gt;Building a WCF Router, Part 1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://msdn.microsoft.com/en-us/magazine/cc546553.aspx"&gt;Building a WCF Router, Part 2&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=44660" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/WCF/default.aspx">WCF</category></item><item><title>Text manipulation - Title Case</title><link>http://blogs.windowsclient.net/zuker/archive/2008/07/22/text-manipulation-title-case.aspx</link><pubDate>Tue, 22 Jul 2008 16:08:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:43554</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=43554</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/07/22/text-manipulation-title-case.aspx#comments</comments><description>&lt;p&gt;A nice way to convert text to title-case using the .NET framework.&lt;/p&gt;
&lt;p&gt;Title Case - First Letter Of Every Word Is Upper&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CultureInfo&lt;font size="2"&gt;&lt;font color="#000000"&gt;.CurrentCulture.TextInfo.ToTitleCase(&amp;quot;some text&amp;quot;);&lt;/font&gt;&lt;/font&gt;&amp;nbsp;//Returns &amp;quot;Some Text&amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Note that you should ensure the input passed to the method is all in lower case, otherwise you will encounter scenarios where this would not work.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=43554" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Mimetypes required for VSTO and ClickOnce</title><link>http://blogs.windowsclient.net/zuker/archive/2008/07/22/mimetypes-required-for-vsto-and-clickonce.aspx</link><pubDate>Tue, 22 Jul 2008 16:06:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:43553</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=43553</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/07/22/mimetypes-required-for-vsto-and-clickonce.aspx#comments</comments><description>&lt;p&gt;Via this &lt;a class="" href="http://developers.de/blogs/damir_dobric/archive/2008/07/22/mimetypes-required-for-vsto-and-clickonce.aspx"&gt;post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Following mime types should be registered in ISS, when using VSTO and ClickOnce:&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;.application&lt;/strong&gt;&lt;br /&gt;application/x-ms-application&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;.manifest&lt;/strong&gt;&lt;br /&gt;application/x-ms-manifest&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;.deploy&lt;/strong&gt;&lt;br /&gt;application/octet-stream&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;.deploy&lt;/strong&gt;&lt;br /&gt;application/x-ms-vsto&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=43553" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Get executing assembly file path location</title><link>http://blogs.windowsclient.net/zuker/archive/2008/07/15/get-executing-assembly-file-path-location.aspx</link><pubDate>Tue, 15 Jul 2008 08:01:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:41272</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=41272</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/07/15/get-executing-assembly-file-path-location.aspx#comments</comments><description>&lt;p&gt;Very simple piece of code to get the path where the executing assembly is located.&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;private&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;static&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; GetApplicationPath()&lt;br /&gt;{&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp; return&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Path&lt;/font&gt;&lt;font size="2"&gt;.GetDirectoryName(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Assembly&lt;/font&gt;&lt;font size="2"&gt;.GetExecutingAssembly().Location);&lt;br /&gt;}&lt;/p&gt;&lt;/font&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=41272" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Velocity Cache Project</title><link>http://blogs.windowsclient.net/zuker/archive/2008/07/05/velocity-cache-project.aspx</link><pubDate>Sat, 05 Jul 2008 10:57:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:38319</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=38319</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/07/05/velocity-cache-project.aspx#comments</comments><description>&lt;p&gt;The CTP version of Velocity had been released a while back.&lt;/p&gt;
&lt;p&gt;It certainly has great benefits.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a link to &lt;a class="" href="http://community.bartdesmet.net/blogs/bart/archive/2008/06/30/a-lap-around-microsoft-quot-velocity-quot-cache-it-now.aspx"&gt;Bart&amp;#39;s post&lt;/a&gt; going over this release, worths the check.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;From Bart&amp;#39;s post&lt;/u&gt;&lt;/strong&gt;:&lt;/p&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;But first... what&amp;#39;s in a name? Multi-tiered distributed applications are common-sense nowadays and with cloud computing within reach the need to build scalable distributed services has never been bigger. One of the core aspects in enabling those scenarios is to have intelligent caching of objects, not only to reduce the number of accesses to the underlying data source but also to boost availability by employing scale out techniques. Obviously, developers want to be able to do all of this without having to worry about the complexities that this brings, having to deal with load balancing and availability themselves. That&amp;#39;s where Velocity comes into play.&lt;/p&gt;
&lt;p&gt;The core idea is very straightforward: we have a &lt;em&gt;cache &lt;/em&gt;that behind the scenes is distributed and replicated across a bunch of machines called the &lt;em&gt;cluster&lt;/em&gt;. Storing data in the distributed cache is as easy as calling some &lt;em&gt;Add&lt;/em&gt; or &lt;em&gt;Put&lt;/em&gt; method, and retrieving it is as easy as calling &lt;em&gt;Get&lt;/em&gt;. With some creative stealing from the documentation we end up with the following picture:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://bartdesmet.info/images_wlw/ALapAroundMicrosoftVelocityCacheItNOW_6AE/image.png"&gt;&lt;img style="BORDER-TOP-WIDTH:0px;BORDER-LEFT-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;WIDTH:353px;HEIGHT:274px;BORDER-RIGHT-WIDTH:0px;" height="373" alt="image" src="http://bartdesmet.info/images_wlw/ALapAroundMicrosoftVelocityCacheItNOW_6AE/image_thumb_6.png" width="555" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;An important thing to emphasize is the fact the cache clients deal with regular .NET objects all the time and don&amp;#39;t have to worry about storing those objects. Indeed, .NET serialization takes care of the rest. There are more concepts to it such as &lt;em&gt;cache eviction policies &lt;/em&gt;(when objects are removed from the cache, such as least-recently used or LRU), the distribution mechanism where &lt;em&gt;simple clients&lt;/em&gt; just contact the cluster &amp;quot;in the cloud&amp;quot; through any cache host and get redirected to whatever host the object is available on versus &lt;em&gt;routing clients&lt;/em&gt; that have awareness of object placement through a &lt;em&gt;routing table&lt;/em&gt;. Other important pieces include the supported concurrency models and associated locking mechanisms but let&amp;#39;s not go there in this introductory post.&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=38319" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.windowsclient.net/zuker/archive/tags/SOA/default.aspx">SOA</category></item><item><title>Managing Multiple Configuration File Environments with Pre-Build Events</title><link>http://blogs.windowsclient.net/zuker/archive/2008/06/29/managing-multiple-configuration-file-environments-with-pre-build-events.aspx</link><pubDate>Sun, 29 Jun 2008 05:06:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:36265</guid><dc:creator>zuker</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=36265</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/06/29/managing-multiple-configuration-file-environments-with-pre-build-events.aspx#comments</comments><description>&lt;p&gt;Almost every project I write&amp;nbsp;has a configuration file and its content varies from one&amp;nbsp;environment to another.&lt;br /&gt;In this case, managing multiple configuration files can make life a lot easier.&lt;/p&gt;
&lt;p&gt;There are different approaches for doing this, I&amp;#39;ll link to a demonstration made by Scott Hanselman a while back - Click &lt;a class="" href="http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx"&gt;Here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;In short&lt;/u&gt;:&lt;br /&gt;1 - Create configuration builds.&lt;br /&gt;2 - Add a batch file at the root of the project as written below.&lt;br /&gt;3 - Add a Pre-Build action to execute it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The batch file &amp;#39;copyifnewer.bat&amp;#39; content&lt;/strong&gt;:&lt;br /&gt;&lt;em&gt;@echo off&lt;br /&gt;echo Comparing two files: %1 with %2&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; not exist %1 goto File1NotFound&lt;br /&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; not exist %2 goto File2NotFound&lt;br /&gt;&lt;br /&gt;fc %1 %2 &lt;br /&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; %ERRORLEVEL%==0 GOTO NoCopy&lt;br /&gt;&lt;br /&gt;echo Files are not the same.&amp;nbsp; Copying %1 over %2&lt;br /&gt;copy %1 %2 /y &amp;amp; goto END&lt;br /&gt;&lt;br /&gt;:NoCopy&lt;br /&gt;echo Files are the same.&amp;nbsp; Did nothing&lt;br /&gt;goto END&lt;br /&gt;&lt;br /&gt;:File1NotFound&lt;br /&gt;echo %1 not found.&lt;br /&gt;goto END&lt;br /&gt;&lt;br /&gt;:File2NotFound&lt;br /&gt;copy %1 %2 /y&lt;br /&gt;goto END&lt;br /&gt;&lt;br /&gt;:END&lt;br /&gt;echo Done.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The pre-build action to be inserted:&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&amp;quot;$(ProjectDir)copyifnewer.bat&amp;quot; &amp;quot;$(ProjectDir)web.config.$(ConfigurationName)&amp;quot; &amp;quot;$(ProjectDir)web.config&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=36265" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>WCF - Creating a certificate</title><link>http://blogs.windowsclient.net/zuker/archive/2008/06/29/wcf-creating-a-certificate.aspx</link><pubDate>Sun, 29 Jun 2008 04:38:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:36261</guid><dc:creator>zuker</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=36261</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/06/29/wcf-creating-a-certificate.aspx#comments</comments><description>&lt;p&gt;I implemented a Security Token Service in WCF as part of our WS-Trust solution here in our project.&lt;/p&gt;
&lt;p&gt;I needed a certificate to apply the message security and all that WS-Federation requires.&lt;br /&gt;I needed to set it up quickly for a temporary purpose,&amp;nbsp;thus I created a certificate using &amp;#39;makecert.exe&amp;#39; (accessible through VS2008 Command Prompt).&lt;/p&gt;
&lt;p&gt;&lt;u&gt;One of the valid set of arguments to create a certificate for such use is&lt;/u&gt;:&lt;br /&gt;&lt;em&gt;makecert.exe -sr LocalMachine -ss My -a sha1 -n CN=WCFCert2 -sky exchange -pe&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You can change the store name / location and certificate name as you like.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll end by saying that using such certificates in production is not recomended.&lt;br /&gt;The best thing to do is to get a chain-trusted certificate for your STS and services.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;One additional thing - in order to add a certificate to the trusted people store execute the following&lt;/u&gt;:&lt;br /&gt;&lt;em&gt;certmgr.exe -add -r LocalMachine -s My -c -n localhost -r CurrentUser -s TrustedPeople&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=36261" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.windowsclient.net/zuker/archive/tags/WCF/default.aspx">WCF</category></item><item><title>PInvoke Interop Assistant</title><link>http://blogs.windowsclient.net/zuker/archive/2008/06/25/pinvoke-interop-assistant.aspx</link><pubDate>Wed, 25 Jun 2008 16:36:00 GMT</pubDate><guid isPermaLink="false">f1c07d22-4184-4df1-9c40-8dd04b52e796:35019</guid><dc:creator>zuker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.windowsclient.net/zuker/rsscomments.aspx?PostID=35019</wfw:commentRss><comments>http://blogs.windowsclient.net/zuker/archive/2008/06/25/pinvoke-interop-assistant.aspx#comments</comments><description>&lt;p&gt;Via Nicholas Allen&amp;#39;s &lt;a class="" href="http://blogs.msdn.com/drnick/archive/2008/06/25/pinvoke-interop-assistant.aspx"&gt;post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;new tool on CodePlex the other day called the &lt;/em&gt;&lt;a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=clrinterop&amp;amp;ReleaseId=14120"&gt;&lt;em&gt;PInvoke Interop Assistant&lt;/em&gt;&lt;/a&gt;&lt;em&gt; that automatically converts between managed and unmanaged type signatures. In addition to converting API functions, it also pulls together all of the structures and types used by the API. Here&amp;#39;s a sample showing how it handles CoCreateInstance.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This is a common action&amp;nbsp;I find myself&amp;nbsp;in need for here and then, this looks like a handy tool for doing that.&lt;/p&gt;&lt;img src="http://blogs.windowsclient.net/aggbug.aspx?PostID=35019" width="1" height="1"&gt;</description><category domain="http://blogs.windowsclient.net/zuker/archive/tags/.NET/default.aspx">.NET</category></item></channel></rss>