<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.dotnet6.com/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>www.dotNET6.com</title><link>http://www.dotnet6.com/blogs/</link><description>Generic Collection of disconnected members.</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP2 (Build: 20611.960)</generator><item><title>Microsoft BI stack growing fast</title><link>http://www.dotnet6.com/blogs/erik_lenaerts/archive/2008/10/10/microsoft-bi-stack-growing-fast.aspx</link><pubDate>Fri, 10 Oct 2008 07:17:17 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:2019</guid><dc:creator>ErikL</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Few days ago Microsoft announced at the annual BI conference the news of Kilimanjaro, the next version of SQL Server due in 2010. This will include the foundation of &amp;quot;&lt;strong&gt;Madison&lt;/strong&gt;&amp;quot;, the data warehouse appliance based on the recent acquisition of DATAllegro. With Madison, Microsoft will join Oracle, Netezza, Teradata, and others in the growing data warehouse appliance market.&lt;/p&gt;  &lt;p&gt;Additionally &lt;strong&gt;Gemini&lt;/strong&gt;, wil be included as well in Kilimanjaro an in Memore Dimensional Model similar to Cognos TM1. &lt;/p&gt;  &lt;p&gt;From reporting side they bought &lt;a href="http://www.90degreesoftware.com/"&gt;90 Degree Software&lt;/a&gt;, a company that built a simmilar but better tool than Report Designer 2.0. It has more end user tools and better support for SSAS.&lt;/p&gt;  &lt;p&gt;Another acquisition is &lt;a href="http://www.softartisans.com/"&gt;SoftArtisans&lt;/a&gt; for its OfficeWriter for managed report authoring in Microsoft Office.&lt;/p&gt;  &lt;p&gt;On the domain of data cleansing, Microsoft acquired &lt;a href="http://www.zoomix.com/"&gt;Zoomix&lt;/a&gt; in August 2008. Microsoft&amp;#39;s plan to add automated data-quality technology to its database product, especially to the data-entry workflow, could greatly help the overall quality of data and reduce errors and inconsistencies.&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=2019" width="1" height="1"&gt;</description></item><item><title>Why does my website requires a client authentication certificate?</title><link>http://www.dotnet6.com/blogs/erik_lenaerts/archive/2008/09/23/my-website-requires-a-client-authentication-certificate.aspx</link><pubDate>Tue, 23 Sep 2008 08:50:16 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1785</guid><dc:creator>ErikL</dc:creator><slash:comments>0</slash:comments><description>&lt;table cellspacing="5" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p align="justify"&gt;The other day, I got a call from a customer who recently renewed his certificates on his server farm. He mailed me with a snapshot of a new issue he had like in the screenshot here.&lt;/p&gt;          &lt;p align="justify"&gt;Whenever you see this, it means that the webserver accept or even requires a client certificate. Since I have no certificate for this website issued by a CA, I can&amp;#39;t select anything. if I click cancel, 2 things can occur depending on the requirements setup by the server:&lt;/p&gt;          &lt;p align="justify"&gt;&lt;strong&gt;accept client certificates:&lt;/strong&gt; The user can cancel and continue to the website             &lt;br /&gt;&lt;strong&gt;require client certificates:&lt;/strong&gt; You get a message that you aren&amp;#39;t allowed to access the site.&lt;/p&gt;          &lt;p align="justify"&gt;The problem in our case was that this system was turned on accidentially and the customer in case wanted to know how to get rid of it.&lt;/p&gt;          &lt;p align="justify"&gt;To fix this, start up IIS Manager (note that I took screenshots from an IIS 6 as this was the case for our customer site).&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/Mywebsiterequiresaclientauthenticationce_9851/image_4.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="411" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/Mywebsiterequiresaclientauthenticationce_9851/image_thumb_1.png" width="411" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p align="justify"&gt;Select the website and open its &lt;em&gt;properties&lt;/em&gt;. On the &lt;em&gt;Directory security&lt;/em&gt; tab &lt;em&gt;edit&lt;/em&gt; the &lt;em&gt;secure communications&lt;/em&gt; options and make sure &lt;em&gt;Client Certificates&lt;/em&gt; settings are set to &lt;strong&gt;Ignore Client certificates. &lt;/strong&gt;That&amp;#39;s it, you should be relieved of the identification prompt for your site.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/Mywebsiterequiresaclientauthenticationce_9851/image_6.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="437" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/Mywebsiterequiresaclientauthenticationce_9851/image_thumb_2.png" width="731" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1785" width="1" height="1"&gt;</description></item><item><title>Retrieving output values from an Execute SQL Task in SSIS</title><link>http://www.dotnet6.com/blogs/erik_lenaerts/archive/2008/09/22/retrieving-output-values-from-an-execute-sql-task-in-ssis.aspx</link><pubDate>Mon, 22 Sep 2008 10:15:53 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1778</guid><dc:creator>ErikL</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;m creating a demo here for an event we&amp;#39;re giving later this year and I figured to start crafting my own ETL for it using SSIS.&lt;/p&gt;  &lt;p&gt;The first task I created took me like one hour to get it running... (pfeew if all tasks will be like this :S )&lt;/p&gt;  &lt;p&gt;My goal was to retrieve a start and finish date from the last etl run comming from an audit table. so I created an Execute SQL Task with the following statement:&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;SELECT @started = Started, @finished = Finished FROM dwh_system.EtlRun WHERE Name = @name.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I got an error &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&amp;quot;[Execute SQL Task] Error: Executing the query &amp;quot;SELECT Started, Finished FROM dwh_system.EtlRun WH...&amp;quot; failed with the following error: &amp;quot;Must declare the scalar variable &amp;quot;@started&amp;quot;.&amp;quot;. Possible failure reasons: Problems with the query, &amp;quot;ResultSet&amp;quot; property not set correctly, parameters not set correctly, or connection not established correctly.&amp;quot;&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;After some search I found that I was using an OLEDB connection and these require different syntax than ADO.Net connections (&lt;a title="http://msdn.microsoft.com/en-us/library/cc280502.aspx" href="http://msdn.microsoft.com/en-us/library/cc280502.aspx"&gt;http://msdn.microsoft.com/en-us/library/cc280502.aspx&lt;/a&gt;). So I changed the syntax accordingly:&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;SELECT ? = Started, ? = Finished FROM dwh_system.EtlRun WHERE Name = ?.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;In my parameter mappings I added the following:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/RetrievingoutputvaluesfromanExecuteSQLTa_AC66/image_6.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="249" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/RetrievingoutputvaluesfromanExecuteSQLTa_AC66/image_thumb_2.png" width="672" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I figured the first 2 should be output params but I got lots of errors like&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&amp;quot;Error HRESULT E_FAIL has been returned from a call to a COM component.&amp;quot;&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;or&lt;/p&gt;    &lt;p&gt;&lt;em&gt;&amp;quot;The type of the value being assigned to variable &amp;quot;User::ExtractStart&amp;quot; differs from the current variable type&amp;quot;&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And finaly I got the solution. I should get my results from the &lt;strong&gt;Result Set&lt;/strong&gt; instead of getting them from the OUTPUT parameters.&lt;/p&gt;  &lt;p&gt;So, new query is : &lt;/p&gt;  &lt;p&gt;&lt;font face="cour" color="#0000ff" size="2"&gt;SELECT Started, Finished FROM dwh_system.EtlRun WHERE Name = ?&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I&amp;#39;ve set the Result set to single row&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/RetrievingoutputvaluesfromanExecuteSQLTa_AC66/image_10.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="340" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/RetrievingoutputvaluesfromanExecuteSQLTa_AC66/image_thumb_4.png" width="663" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In the Result Set tab I added the following:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/RetrievingoutputvaluesfromanExecuteSQLTa_AC66/image_12.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="296" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/RetrievingoutputvaluesfromanExecuteSQLTa_AC66/image_thumb_5.png" width="534" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;All good at the end :) Some additional reading that helped me : &lt;a title="http://www.sqlis.com/58.aspx" href="http://www.sqlis.com/58.aspx"&gt;http://www.sqlis.com/58.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1778" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/BI/default.aspx">BI</category><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/Development/default.aspx">Development</category></item><item><title>Entity Framework originates from WinFS</title><link>http://www.dotnet6.com/blogs/erik_lenaerts/archive/2008/09/18/entity-framework-originates-from-winfs.aspx</link><pubDate>Thu, 18 Sep 2008 22:42:47 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1721</guid><dc:creator>ErikL</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;As I started to learn more about Entity Framework, i stumbled upon an interview with Quentin Clark who led the WinFS project from 2002 to 2006. WinFS was shut down in 2006 but much of the work done their lives today in several area&amp;#39;s as QC mentions&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;quot;Now let&amp;#39;s look under the covers, and ask what was required to deliver on that goal. It&amp;#39;s about schemas, it&amp;#39;s about integrated storage, it&amp;#39;s about object/relational, a bunch of things. And that&amp;#39;s the layer you can look at and say, OK, the WinFS project, which went from ... well, it depends who you ask, but I think it went from 2002 until we shut it down in 2006 ... what was the technology that was being built for that effort, in order to meet those goals? And what happened to all that stuff?&lt;/p&gt;    &lt;p&gt;You can catalog that stuff, and look at work that we&amp;#39;re doing now for SQL Server 2008, or ADO.NET, or VS 2008 SP1, and trace its lineage back to WinFS.&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Read the full interview here: &lt;a href="http://perspectives.on10.net/blogs/jonudell/Where-is-WinFS-now/"&gt;http://perspectives.on10.net/blogs/jonudell/Where-is-WinFS-now/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Additionally I learned a lot from &lt;a href="http://blogs.teamb.com/craigstuntz/2008/07/17/37825"&gt;Craig Stuntz post&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/dsimmons/archive/2008/05/17/why-use-the-entity-framework.aspx"&gt;Danny Simmons post&lt;/a&gt; about the purpose of EF and comparison between other ORM&amp;#39;s.&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1721" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/Development/default.aspx">Development</category></item><item><title>Event Raising the good, the bad and the ugly ...</title><link>http://www.dotnet6.com/blogs/nexus/archive/2008/09/15/event-raising-the-good-the-bad-and-the-ugly.aspx</link><pubDate>Mon, 15 Sep 2008 10:14:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1676</guid><dc:creator>Nexus</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;So you need to raise an event, and wanna do it in a threadsafe way, or safer way :)&lt;br /&gt;&lt;br /&gt;Not so long ago i wrote this code :&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-FAMILY:courier new;"&gt;...&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY:courier new;"&gt;public event EventHandler Save;&lt;br /&gt;...&lt;br /&gt;private void OnSave(EventArgs e)&lt;br /&gt;{&lt;br /&gt;if(Save != null) Save(this,EventArgs.Empty);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What is wrong here, the fact that the point between the not null check and the eventual event raising can has changes in between.&lt;br /&gt;&lt;br /&gt;So from now just write this :&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-FAMILY:courier new;"&gt;private void OnSave(EventArgs e)&lt;br /&gt;{&lt;br /&gt;EventHandler handlers = Save;&lt;br /&gt;if (handlers != null) handlers(this, e);&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This makes a copy into the handlers variable and cannot change between check and raise. &lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1676" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/nexus/archive/tags/Languages/default.aspx">Languages</category><category domain="http://www.dotnet6.com/blogs/nexus/archive/tags/Usage/default.aspx">Usage</category><category domain="http://www.dotnet6.com/blogs/nexus/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>PowerCommands 1.1 for Visual Studio 2008</title><link>http://www.dotnet6.com/blogs/wesley_walraeve/archive/2008/09/01/powercommands-1-1-for-visual-studio-2008.aspx</link><pubDate>Mon, 01 Sep 2008 11:18:38 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1570</guid><dc:creator>wesleyw</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;A collegue .NET consultant, Tim Cools, gave me a tip about a good VS.NET 2008 extension.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/PowerCommands" target="_blank"&gt;PowerCommands 1.1&lt;/a&gt; is a set of useful extensions for the Visual Studio 2008 adding additional functionality to various areas of the IDE.&lt;/p&gt;  &lt;p&gt;Some examples:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Clear All Panes&lt;/li&gt;    &lt;li&gt;Copy Path&lt;/li&gt;    &lt;li&gt;Email CodeSnippet&lt;/li&gt;    &lt;li&gt;Insert Guid Attribute&lt;/li&gt;    &lt;li&gt;Show All Files&lt;/li&gt;    &lt;li&gt;Undo Close&lt;/li&gt;    &lt;li&gt;Collapse Projects&lt;/li&gt;    &lt;li&gt;Copy Class&lt;/li&gt;    &lt;li&gt;Paste Class&lt;/li&gt;    &lt;li&gt;Copy References&lt;/li&gt;    &lt;li&gt;...&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;- Wesley&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1570" width="1" height="1"&gt;</description></item><item><title>Naming convention for DB2 OLEDB Connection</title><link>http://www.dotnet6.com/blogs/erik_lenaerts/archive/2008/09/01/naming-convention-for-db2-oledb-connection.aspx</link><pubDate>Mon, 01 Sep 2008 08:29:14 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1568</guid><dc:creator>ErikL</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;When connecting to a DB2 using OLEDB, we can set since V5R3 the Naming convention option. With this we can indicate if we need to specify the schema name or not in our queries. The option can have these values:&lt;/p&gt;  &lt;p&gt;0 : (default) SQL Naming should be used which is LIBRARY.TABLE and using the TABLE name only won&amp;#39;t work&lt;/p&gt;  &lt;p&gt;1: System Naming TABLE can be used if the schema(s) is specified in the &amp;quot;Library List&amp;quot; part of the connection. When you want to specify a schema for some queries, you need to use the forward slash LIBRARY/TABLE.&lt;/p&gt;  &lt;p&gt;Don&amp;#39;t get confused with the &amp;quot;Catalog Library List&amp;quot; because this is a list of schema&amp;#39;s where DB2 will look for objects. This is good to minimize its search time. &lt;/p&gt;  &lt;p&gt;Basically choosing the system naming convention (option 1) is more flexible since the schema set for the user of the connection can be changed on DB2 side, making it easy to switch from test to production for example. Drawback of this is that some tools like the Typed Dataset Designer doesn&amp;#39;t know about this naming convention and it internally generates SQL named queries :(.&lt;/p&gt;  &lt;p&gt;Check the IBM site for a full list of details of the connection options: &lt;a title="http://www-912.ibm.com/s_dir/slkbase.NSF/00e42b791a3dab7b862565c9004ec1af/c52e46013ce1ded286256a3b006a38c5?OpenDocument" href="http://www-912.ibm.com/s_dir/slkbase.NSF/00e42b791a3dab7b862565c9004ec1af/c52e46013ce1ded286256a3b006a38c5?OpenDocument"&gt;http://www-912.ibm.com/s_dir/slkbase.NSF/00e42b791a3dab7b862565c9004ec1af/c52e46013ce1ded286256a3b006a38c5?OpenDocument&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1568" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/Development/default.aspx">Development</category><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/IBM/default.aspx">IBM</category><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/DB2/default.aspx">DB2</category></item><item><title>Microsoft : from idea to release</title><link>http://www.dotnet6.com/blogs/erik_lenaerts/archive/2008/08/29/microsoft-from-idea-to-release.aspx</link><pubDate>Fri, 29 Aug 2008 19:37:21 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1549</guid><dc:creator>ErikL</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Ever wondered where microsoft stores its code while it goes from idea to release stages? Have a look at this diagram:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/Microsoftfromideatorelease_1311D/clip_image001_3_2.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="141" alt="clip_image001_3" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/Microsoftfromideatorelease_1311D/clip_image001_3_thumb.jpg" width="677" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1549" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/Development/default.aspx">Development</category><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/Microsoft/default.aspx">Microsoft</category></item><item><title>Visual Studio discovery does not detect my WCF Service</title><link>http://www.dotnet6.com/blogs/erik_lenaerts/archive/2008/08/27/visual-studio-discovery-does-not-detect-my-wcf-service.aspx</link><pubDate>Wed, 27 Aug 2008 07:18:05 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1543</guid><dc:creator>ErikL</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Recently I needed to create a windows service application for one of my customers and I decided to use WCF for both incomming as outgoing communication mechanism. The problem I had was that I could not discover any WCF services in my solution. Only WCF service created on the WCF Project templates where discovered but hand crafted WCF services based on any other project type (a regular class library) where not detected by the Visual Studio discovery system.&lt;/p&gt;  &lt;p&gt;After a while I found out where the problem lies, but I&amp;#39;ll guide you through some steps here to reproduce the issue and the solution.&lt;/p&gt;  &lt;p&gt;Create a new console project and add 2 projects to the solution; one WCF Service Library project and one regular Class Library.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_4.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="338" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_thumb_1.png" width="529" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Copy the following 3 files (App.config, IService1.cs and Service1.cs) to the class library project. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_6.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="366" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_thumb_2.png" width="297" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Reconfigure the App.config from the Class Library project so it uses a different Service Address.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_8.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="179" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_thumb_3.png" width="669" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Add 2 &lt;strong&gt;References&lt;/strong&gt; to the Class Library project (System.Runtime.Serialization and System.ServiceModel)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_10.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="238" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_thumb_4.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Build the solution. Add a &lt;strong&gt;Service Reference&lt;/strong&gt; to the Test console project and click on the Discover button.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_12.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="362" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_thumb_5.png" width="431" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The result of the discovery is only one WCF Service, the one from the WCFLibrary project.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_14.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="456" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_thumb_6.png" width="565" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Now where is my other WCF service???&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To fix this, open the ClassLibrary.csproj file in notepad and add the following xml element&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;ProjectTypeGuids&amp;gt;{3D9AD99F-2412-4246-B90B-4EAA41C64699};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&amp;lt;/ProjectTypeGuids&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_16.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="232" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_thumb_7.png" width="698" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;When going back to Visual Studio, it will probably ask you to reload the project which you just accept. Rebuild the solution and try to add a new Service Reference.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_20.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="409" alt="image" src="http://www.dotnet6.com/blogs/erik_lenaerts/WindowsLiveWriter/VisualStudiodiscoverydoesnotdetectmyWCFS_8332/image_thumb_9.png" width="524" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;voila, the 2 WCF services appear !&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1543" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/Development/default.aspx">Development</category><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/WCF/default.aspx">WCF</category></item><item><title>Keeping track of your personal projects</title><link>http://www.dotnet6.com/blogs/jokke/archive/2008/06/24/keeping-track-of-your-personal-projects.aspx</link><pubDate>Tue, 24 Jun 2008 14:30:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1493</guid><dc:creator>Jokke</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;m sure a lot of you know the drag of keeping track of personal ToDo-lists. You write down some stuff on a piece of paper and the next day, this paper has mysteriously vanished. Or you save them in an excel sheet, which is probably only available on your home PC. As I currently have a lot going on, I began a search for an online system that could fulfill my needs. Nothing fancy, just some basic functionalities. In my search, I landed on &lt;a href="http://www.tadalist.com/" target="_blank"&gt;Tada List&lt;/a&gt;. This is a very basic online ToDo-list system. &lt;a href="http://www.techcrunch.com/2006/05/08/do-more-online-to-do-lists-compared/" target="_blank"&gt;This article&lt;/a&gt; compares a few online systems. The Tada list comes in first and I can see why. It&amp;#39;s a good tip to keep your personal life a little more organized.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Greetings. &lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1493" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/jokke/archive/tags/Organization/default.aspx">Organization</category></item><item><title>New BMW concept GINA.</title><link>http://www.dotnet6.com/blogs/wesley_walraeve/archive/2008/06/10/new-bmw-concept-gina.aspx</link><pubDate>Tue, 10 Jun 2008 13:42:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1486</guid><dc:creator>wesleyw</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;As I&amp;#39;m a BMW freak, I follow the BMW technology and new models a little. But this, this is amazing. I hope they bring this kind of cars in production very fast.&lt;/p&gt;
&lt;p&gt;You can have design cars en fancy cars, but this is more, MORE, MUCH MORE.&lt;/p&gt;
&lt;p&gt;You can see it here on &lt;a href="http://www.bmw-web.tv/en/channel/new"&gt;http://www.bmw-web.tv/en/channel/new&lt;/a&gt;&amp;nbsp;or directly on &lt;a href="http://www.bmw-web.tv/en/video/gbiXGRR/BMW%20GINA%20Light%20Visionary%20Model%3A%20Premiere"&gt;http://www.bmw-web.tv/en/video/gbiXGRR/BMW%20GINA%20Light%20Visionary%20Model%3A%20Premiere&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;- Wesley&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1486" width="1" height="1"&gt;</description></item><item><title>A good blog for .NET assembly debugging</title><link>http://www.dotnet6.com/blogs/wesley_walraeve/archive/2008/06/10/a-good-blog-for-net-assembly-debugging.aspx</link><pubDate>Tue, 10 Jun 2008 08:59:18 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1485</guid><dc:creator>wesleyw</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;While looking for a solution I found a good blog about hardcore debugging in .NET.   &lt;br /&gt;On the right side you can even find some labs for debugging. Think this is really handy if you run in some &amp;quot;non standard .NET (bug) behaviour&amp;quot; or memory problems.&lt;/p&gt;  &lt;p&gt;It&amp;#39;s a blog from Tess, she&amp;#39;s working for Microsoft.&lt;/p&gt;  &lt;p&gt;You can find the blog here &lt;a title="http://blogs.msdn.com/tess/" href="http://blogs.msdn.com/tess/"&gt;http://blogs.msdn.com/tess/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;-Wesley&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1485" width="1" height="1"&gt;</description></item><item><title>Resharper 4.0 RC is available!</title><link>http://www.dotnet6.com/blogs/jeroen/archive/2008/06/06/resharper-4-0-rc-is-available.aspx</link><pubDate>Fri, 06 Jun 2008 08:50:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1484</guid><dc:creator>jeroen</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;FINALLY!! Get it here: &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.jetbrains.com/resharper/beta/beta.html" title="http://www.jetbrains.com/resharper/beta/beta.html"&gt;http://www.jetbrains.com/resharper/beta/beta.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1484" width="1" height="1"&gt;</description></item><item><title>Validators on AJAX updatepanel not working on IIS</title><link>http://www.dotnet6.com/blogs/wesley_walraeve/archive/2008/06/04/validators-on-ajax-updatepanel-not-working-on-iis.aspx</link><pubDate>Wed, 04 Jun 2008 11:41:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1482</guid><dc:creator>wesleyw</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I&amp;#39;ve been looking for hours to find a solution for this problem. Well first of all defining what the problem exaclty is and then finding a solution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;The Problem:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve an dynamic loaded usercontrol(ascx) with textboxes and rangevalidators and requiredFieldValidators on an Ajax UpdatePanel. &lt;br /&gt;I was developing and of course running the site in my VS.NET 2005 Cassini web server. &lt;br /&gt;On a post-back the in the update panel my validators were not working anymore on my IIS (Win2k3). On my Cassini everyhting was fine. &lt;br /&gt;I was using the latest AjaxToolkit for ASP.NET 2.0, thought there was a fix in it, but not.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;The Solution:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I found the solution on the site of Matt Gibbs: &lt;a title="http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx" href="http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx"&gt;http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;From previous experience (post that were deleted after linking them) I post the solution also here (All credits goes to Matt):&lt;/p&gt;
&lt;p&gt;&lt;em&gt;ASP.NET AJAX provides new APIs for registering script with the ScriptManager.&amp;nbsp; Using these APIs allows controls to work well with partial rendering.&amp;nbsp; Without them, controls placed inside an UpdatePanel won&amp;#39;t work as expected. In previous CTP releases of ASP.NET AJAX, we had a set of validator controls that derived from the v2.0 controls and used the new APIs. This made them work well with ASP.NET AJAX. WindowsUpdate will &lt;strong&gt;soon&lt;/strong&gt; include a version of System.Web that can take advantage of the new APIs.&amp;nbsp; So the new controls which would have been redundant have been removed.&amp;nbsp; However, the update isn&amp;#39;t available yet and ASP.NET AJAX has been released.&amp;nbsp; So, in the short-term, the source code for a set of custom validator controls that work with partial rendering is available &lt;/em&gt;&lt;a href="http://blogs.msdn.com/mattgi/attachment/1516974.ashx"&gt;&lt;em&gt;here&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The .zip file includes a solution and .csproj file as well as the compiled DLL.&amp;nbsp; Just put the DLL in the /bin directory of your application and include the following &amp;lt;tagMapping section in the pages section of the web.config.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tagMapping&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add tagType=&amp;quot;System.Web.UI.WebControls.CompareValidator&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mappedTagType=&amp;quot;Sample.Web.UI.Compatibility.CompareValidator, Validators, Version=1.0.0.0&amp;quot;/&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add tagType=&amp;quot;System.Web.UI.WebControls.CustomValidator&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mappedTagType=&amp;quot;Sample.Web.UI.Compatibility.CustomValidator, Validators, Version=1.0.0.0&amp;quot;/&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add tagType=&amp;quot;System.Web.UI.WebControls.RangeValidator&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mappedTagType=&amp;quot;Sample.Web.UI.Compatibility.RangeValidator, Validators, Version=1.0.0.0&amp;quot;/&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add tagType=&amp;quot;System.Web.UI.WebControls.RegularExpressionValidator&amp;quot; mappedTagType=&amp;quot;Sample.Web.UI.Compatibility.RegularExpressionValidator, Validators, Version=1.0.0.0&amp;quot;/&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add tagType=&amp;quot;System.Web.UI.WebControls.RequiredFieldValidator&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mappedTagType=&amp;quot;Sample.Web.UI.Compatibility.RequiredFieldValidator, Validators, Version=1.0.0.0&amp;quot;/&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add tagType=&amp;quot;System.Web.UI.WebControls.ValidationSummary&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mappedTagType=&amp;quot;Sample.Web.UI.Compatibility.ValidationSummary, Validators, Version=1.0.0.0&amp;quot;/&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tagMapping&amp;gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;As you can see Matt is mentioning SOON, his post was from 27/01/2007. And as i know now it&amp;#39;s still not working. :-)&lt;/p&gt;
&lt;p&gt;Maybe somebody else has a solution or I&amp;#39;m I using a wrong or rather old version of Ajax (extensions) you think?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TIP: Never or ever use the Cassini in development. Use IIS. &lt;br /&gt;Also, an IIS 6.0 has different behaviour on a Windows XP and on a Windows 2003 server. So if you develop and test on your IIS 6 on XP also try it on a Win2k3 IIS 6.0 if you plan to deploy it on such a server.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;- Wesley&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1482" width="1" height="1"&gt;</description><enclosure url="http://www.dotnet6.com/blogs/wesley_walraeve/attachment/1482.ashx" length="32950" type="application/x-zip-compressed" /><category domain="http://www.dotnet6.com/blogs/wesley_walraeve/archive/tags/VS.NET+2005/default.aspx">VS.NET 2005</category><category domain="http://www.dotnet6.com/blogs/wesley_walraeve/archive/tags/.NET/default.aspx">.NET</category><category domain="http://www.dotnet6.com/blogs/wesley_walraeve/archive/tags/Ajax/default.aspx">Ajax</category><category domain="http://www.dotnet6.com/blogs/wesley_walraeve/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Assemble your own Ajax progress image</title><link>http://www.dotnet6.com/blogs/jokke/archive/2008/05/14/assemble-your-own-ajax-progress-image.aspx</link><pubDate>Wed, 14 May 2008 09:33:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1463</guid><dc:creator>Jokke</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I was looking for a nice loading image to show the progress of my page when making an Ajax call.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I found &lt;a href="http://www.ajaxload.info/" target="_blank"&gt;a nice website&lt;/a&gt; on which we can assemble our own progress images to use in combination with the UpdateProgress Ajax control.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;An example below:&lt;br /&gt;&lt;img src="http://www.dotnet6.com/blogs/jokke/ajax-loader.gif" height="66" width="66" alt="" /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regards,&lt;br /&gt;Joris.&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1463" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/jokke/archive/tags/Ajax/default.aspx">Ajax</category><category domain="http://www.dotnet6.com/blogs/jokke/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>ASP.NET Multi file upload</title><link>http://www.dotnet6.com/blogs/wesley_walraeve/archive/2008/05/09/asp-net-multi-file-upload.aspx</link><pubDate>Fri, 09 May 2008 10:27:35 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1462</guid><dc:creator>wesleyw</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;For a project I was working on I needed to be able to upload multiple files via HTTP to a website.&lt;/p&gt;  &lt;p&gt;You can put X Http FileUpload controls on your page but then you need to select the files one by one. So a busy job if you need to upload +100 files.&lt;/p&gt;  &lt;p&gt;So I was looking on the web and found this great control on the code project from &lt;b&gt;&lt;a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=1200229"&gt;darick_c&lt;/a&gt;.&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Here you have the URL: &lt;a title="http://www.codeproject.com/KB/aspnet/FlashUpload.aspx" href="http://www.codeproject.com/KB/aspnet/FlashUpload.aspx"&gt;http://www.codeproject.com/KB/aspnet/FlashUpload.aspx&lt;/a&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;And attached the code and an example. I know you can download it from the code project site but you never know.&lt;/p&gt;  &lt;p&gt;Have fun.&lt;/p&gt;  &lt;p&gt;-Wesley&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1462" width="1" height="1"&gt;</description></item><item><title>Flash text font on your site.</title><link>http://www.dotnet6.com/blogs/wesley_walraeve/archive/2008/05/04/flash-text-font-on-your-site.aspx</link><pubDate>Sun, 04 May 2008 09:27:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1454</guid><dc:creator>wesleyw</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;m writing a website for restaurants and got a tip from a graphical guy to use flash for my fonts. Well it sounds strange but it is great. &lt;/p&gt;
&lt;p&gt;The thing/technology is called Sifr and can be found here &lt;a title="http://www.mikeindustries.com/blog/sifr/" href="http://www.mikeindustries.com/blog/sifr/"&gt;http://www.mikeindustries.com/blog/sifr/&lt;/a&gt; and &lt;a title="http://novemberborn.net/sifr/2.0.5" href="http://novemberborn.net/sifr/2.0.5"&gt;http://novemberborn.net/sifr/2.0.5&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s easy to use, add 2 scripts to your page and some stylesheet items, you also need a swf file with your font. The script will replace the specific tags, ex. h1 with the flash movie with your text. &lt;br /&gt;You can even change the font size of the tag in the CSS and the font in the flash will be changed aswell.&lt;/p&gt;
&lt;p&gt;A must have if you want fancy fonts on your website.&lt;/p&gt;
&lt;p&gt;- Wesley&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1454" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/wesley_walraeve/archive/tags/CSS/default.aspx">CSS</category><category domain="http://www.dotnet6.com/blogs/wesley_walraeve/archive/tags/Flash/default.aspx">Flash</category></item><item><title>Practice your LINQ expressions</title><link>http://www.dotnet6.com/blogs/erik_lenaerts/archive/2008/04/16/practice-your-linq-expressions.aspx</link><pubDate>Wed, 16 Apr 2008 07:14:10 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1450</guid><dc:creator>ErikL</dc:creator><slash:comments>0</slash:comments><description>&lt;p align="justify"&gt;Reading through my daily blogs I&amp;#39;ve stumbled upon this very nice LINQ application. It basically allows you to write LINQ statements and execute them right away.&lt;/p&gt; &lt;p&gt;&lt;a title="http://www.linqpad.net/" href="http://www.linqpad.net/"&gt;http://www.linqpad.net/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.linqpad.net/linqpadscreen.png"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://www.linqpad.net/linqpadscreen.png"&gt;&lt;img src="http://www.linqpad.net/linqpadscreen.png" width="240" height="201" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1450" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>Using Subversion in a VSS-only shop </title><link>http://www.dotnet6.com/blogs/jeroen/archive/2008/04/05/using-subversion-in-a-vss-only-shop.aspx</link><pubDate>Sat, 05 Apr 2008 19:22:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1423</guid><dc:creator>jeroen</dc:creator><slash:comments>0</slash:comments><description>&lt;p id="zeuc"&gt;Once upon a time, I was used to Visual SourceSafe and the way it handles concurrent versioning problems: if you need to edit a file, you lock it in the VSS &amp;#39;database&amp;#39; (ahum), change it and finally check it back in. If someone else has already placed a lock, tough luck: you have to wait. When you&amp;#39;re alone or in very small teams, that situation does not happen too often, so you can probably live with it. When your team grows however, you really run into trouble, with ugly &amp;#39;dead-lock&amp;#39; situations: I have files that you need, you have files that I need, and we both can&amp;#39;t check in without breaking the build. So you start implementing ways to circumvent the system, making files writable without checking out, with the risk of improper merging, possibly even undoing each other&amp;#39;s changes when not paying enough attention. Been there, done that.&lt;/p&gt;
&lt;p id="m.3_"&gt;Then I learned about how subversion uses a completely different philosophy to tackle this problem, called &amp;#39;copy-modify-merge&amp;#39; (sometimes also called &amp;#39;edit-merge-commit&amp;#39;), as opposed to &amp;#39;lock-modify-unlock&amp;#39;.&amp;nbsp;If you haven&amp;#39;t heard of this before, read&amp;nbsp;&lt;a id="ae92" title="the chapter about versioning models in the svn book" href="http://svnbook.red-bean.com/en/1.4/svn.basic.vsn-models.html"&gt;&lt;font color="#551a8b"&gt;the chapter about versioning models in the svn book&lt;/font&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p id="bzro"&gt;A new world went open, the world of &amp;quot;version control done right&amp;quot;.&lt;/p&gt;
&lt;ul id="abke"&gt;
&lt;li id="m8dk"&gt;
&lt;div id="t430"&gt;Atomic commits (&amp;#39;change sets&amp;#39;) &lt;/div&gt;
&lt;li id="vtmz"&gt;
&lt;div id="uk.p"&gt;Log: &amp;#39;svn log&amp;#39;&amp;nbsp;has become&amp;nbsp;part of my daily toolset. I consider the history of a project almost as important as it&amp;#39;s current state in order to be able to fully understand the code. However, history in VSS is essentially file-oriented, not change-set oriented as in svn. This makes searching in the VSS history&amp;nbsp;awkward and&amp;nbsp;painful. As a result, people typically don&amp;#39;t enter any check-in comments, making the version history even less accessible.&lt;/div&gt;
&lt;li id="x:uw"&gt;
&lt;div id="iwnj"&gt;Blame (or Annotate): there is no such feature in VSS, except again a painful &amp;#39;binary search&amp;#39; through the file&amp;#39;s history (as opposed to a one-click operation&amp;nbsp;with TortoiseSVN)&lt;/div&gt;
&lt;li id="p7tk"&gt;
&lt;div id="h23g"&gt;Easy branching (and merging!)&lt;/div&gt;
&lt;li id="bift"&gt;
&lt;div id="c50h"&gt;Concurrent checkout&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p id="fdz6"&gt;But unfortunately, you don&amp;#39;t always get to choose the version control system to be used. For&amp;nbsp;my current assignment,&amp;nbsp;VSS is a given. Obviously, as a new team member you can&amp;#39;t simply come in and change the version control system they&amp;#39;re used to working with for 5 years: such a conversion is a project on it&amp;#39;s own. &lt;/p&gt;
&lt;p id="shrf"&gt;So&amp;nbsp;I started thinking: wouldn&amp;#39;t it be nice to set up a local svn repository for my own use, so I can work in some isolation, and&amp;nbsp;take advantage of&amp;nbsp;at least some of the powerful svn functionality?&amp;nbsp;&lt;/p&gt;
&lt;h2 id="sv45"&gt;&lt;font size="3"&gt;Scope&lt;/font&gt;&lt;/h2&gt;
&lt;p id="qwfl"&gt;First, let&amp;#39;s elaborate a bit on what we&amp;#39;re trying to do here: the idea is obviously&amp;nbsp;not to replace VSS. Instead, I want a local svn repository, where I&amp;nbsp;can leverage some subversion functionality. First and foremost, I wanted to get rid of the &amp;#39;lock-modify-unlock&amp;#39; hassle, and second, I wanted a better view on the history, especially&amp;nbsp;for my own changes and, as far as possible, also on the changes made by other team members.&lt;/p&gt;
&lt;p id="wl6q"&gt;So&amp;nbsp;how could we implement this?&amp;nbsp;Here is how I went along:&lt;/p&gt;
&lt;ul id="j4-t"&gt;
&lt;li id="srwq"&gt;
&lt;div id="v52l"&gt;I set up&amp;nbsp;a local subversion repository, in which I imported the sources from VSS&amp;nbsp;&lt;/div&gt;
&lt;li id="mpdw"&gt;
&lt;div id="ykst"&gt;I set up a &amp;#39;VSS+SVN&amp;#39; working copy, which I use to synchronize changes back and forth between VSS and svn&lt;/div&gt;
&lt;li id="x883"&gt;
&lt;div id="fgyd"&gt;Finally, I have a&amp;nbsp;&amp;#39;svn-only&amp;#39; working copy, in which I do my day-to-day development work&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id="pnor"&gt;&lt;font size="3"&gt;A note about local svn repositories&lt;/font&gt;&lt;/h2&gt;
&lt;p id="n3gs"&gt;It&amp;#39;s a little-known fact that you don&amp;#39;t really need a subversion server to make use of subversion. Subversion repositories can be accessed in essentially three ways:&lt;/p&gt;
&lt;ul id="z26e"&gt;
&lt;li id="bxw-"&gt;
&lt;div id="fwe8"&gt;using the native svn:// (or svn+ssh) protocol through &lt;i id="ucuu"&gt;svnserve&lt;/i&gt;&lt;/div&gt;
&lt;li id="pk4h"&gt;
&lt;div id="ybyv"&gt;using http(s):// through apache&lt;/div&gt;
&lt;li id="o_sz"&gt;
&lt;div id="e_im"&gt;using the &lt;a id="i:lk"&gt;file:///&lt;/a&gt;&amp;nbsp;protocol&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p id="iump"&gt;The last option is not&amp;nbsp;very well known, I guess since it&amp;#39;s only useful in single-user environments, but since we&amp;#39;re going to be the only physical user accessing this repo, that&amp;#39;s good enough for our purposes. Of course, if you already have a server set up that you can use for this, that will do also, but I will be explaining the case where we use a simple &lt;a id="ajnw"&gt;file:///&lt;/a&gt; repository. And what&amp;#39;s more, the repository format is identical to a repository served through svnserve or apache. So if you would want to migrate later to a real server, you&amp;nbsp;could simply copy the repository to your server and serve it from there.&lt;/p&gt;
&lt;h2 id="my5f"&gt;&lt;font size="4"&gt;Preparations&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/h2&gt;
&lt;p id="huo6"&gt;Let me start with&amp;nbsp;a little warning: if you&amp;#39;re not really comfortable in using svn yet, then don&amp;#39;t start with this immediately on a live project. Make sure you really understand what you&amp;#39;re doing first. If you don&amp;#39;t really understand everything in what follows, learn more about svn first and come back when you&amp;#39;re ready. You don&amp;#39;t want to accidently revert changes from your team members in VSS... However, if you&amp;#39;re reasonably familiar with subversion, you should be just fine. So in what follows, I will assume that this is the case, and that you have your favourite subversion client already installed (for most people this will be either &lt;a id="nid9" title="TortoiseSVN" href="http://tortoisesvn.net/"&gt;&lt;font color="#551a8b"&gt;TortoiseSVN&lt;/font&gt;&lt;/a&gt; or the svn command line client, which you can download &lt;a id="s.yc" title="here" href="http://subversion.tigris.org/"&gt;&lt;font color="#551a8b"&gt;here&lt;/font&gt;&lt;/a&gt;&amp;nbsp;or &lt;a id="bd:g" title="here" href="http://www.open.collab.net/"&gt;&lt;font color="#551a8b"&gt;here&lt;/font&gt;&lt;/a&gt;).&amp;nbsp;For the sake of this article, our project in VSS will be called MyProject (how original, yes I know). &lt;/p&gt;
&lt;h3 id="qawd"&gt;&lt;font size="3"&gt;Creating a repository&amp;nbsp;&lt;/font&gt;&lt;/h3&gt;
&lt;p id="bfsa"&gt;The first step is to create a local repository for your project. If you&amp;#39;re a command line person, you probably know &lt;a class="" href="http://svnbook.red-bean.com/en/1.4/svn.reposadmin.create.html"&gt;how that works using svnadmin&lt;/a&gt;. With TortoiseSVN, simply create a root folder (e.g. C:\SvnRepository, right-click on it in Windows Explorer and select &amp;quot;create repository here&amp;quot;).&lt;/p&gt;
&lt;p id="ms9a"&gt;The structure of the repository does not really matter at this point. For my own use, I typically set up a &amp;quot;single repository for multiple projects&amp;quot;, and I first create a &amp;#39;template&amp;#39; project with a trunk, tags and branches subfolder which I can then simply copy when I want to create a new project. But feel free to use any other repository layout you&amp;#39;re comfortable with.&lt;/p&gt;
&lt;h3 id="fj_e"&gt;&lt;font size="3"&gt;Importing the sources from VSS into SVN&lt;/font&gt;&lt;/h3&gt;
&lt;p id="eoa5"&gt;Now we&amp;nbsp;can import the sources from VSS into our local SVN repository. Start by checking out your (still empty) project trunk from SVN into a folder on your local system, e.g. C:\Projects\MyProject\VSS. Yes, that&amp;#39;s right, VSS. Bear with me.&lt;/p&gt;
&lt;p id="tw3z"&gt;Now,&amp;nbsp;use VSS to &amp;quot;Get&amp;nbsp;Latest Version&amp;quot;&amp;nbsp;the sources from VSS into that very same folder. &amp;#39;Add&amp;#39; all relevant sources to svn. Make sure to exclude all VSS-specific files (*.scc, *.vspscc, *.vssscc, ...), and some other Visual Studio-specific files that are not needed (like *.csproj.user, *.suo, the bin and obj folders, ...). Review what you&amp;#39;ve added before committing the files to svn.&lt;/p&gt;
&lt;p id="g-5h"&gt;What we have now is a svn repository containing all sources of our project, and a combined vss+svn working copy which we&amp;#39;re going to use to synchronize our local svn repository with the VSS database.&lt;/p&gt;
&lt;h3 id="b20g"&gt;&lt;font size="3"&gt;Setting up our &amp;#39;real&amp;#39; working copy&lt;/font&gt;&lt;/h3&gt;
&lt;p id="jbvk"&gt;Next to svn/vss working copy, we need one for our own developments, too. That&amp;#39;s easy of course, simply perform an &amp;#39;svn checkout&amp;#39; into a second working copy (e.g. C:\Projects\MyProject\SVN).&lt;/p&gt;
&lt;h3 id="mchs"&gt;&lt;font size="3"&gt;Synchronizing external changes (VSS -&amp;gt; SVN)&lt;/font&gt;&lt;/h3&gt;
&lt;p id="ynmh"&gt;This is the easier part. To mirror the changes committed into VSS by any team member, you can use&amp;nbsp;the following procedure:&amp;nbsp;&lt;/p&gt;
&lt;ul id="ew8c"&gt;
&lt;li id="dpel"&gt;
&lt;div id="he_d"&gt;Do a recursive VSS &amp;#39;Get Latest Version&amp;#39; in the VSS working copy. VSS will make all files in the svn+vss working copy read-only.&lt;/div&gt;
&lt;li id="blak"&gt;
&lt;div id="l3vn"&gt;Since our working copy is both linked with VSS and SVN at the same time, any files changed in VSS (by other users) will be automatically picked up as &amp;#39;modified&amp;#39; by svn. However, when files are added or deleted from VSS, we still need to communicate this to svn. With TortoiseSVN this is easy (if you don&amp;#39;t care about renames/moves): just open the commit dialog and check the &amp;#39;Select All&amp;#39;&amp;nbsp; checkbox at the bottom. &lt;/div&gt;
&lt;li id="wolf"&gt;
&lt;div id="m-5f"&gt;Commit, with a nice little comment of course (at least put something like &amp;#39;update from VSS&amp;#39;). &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p id="s9bx"&gt;These steps&amp;nbsp;can also be easily automated this&amp;nbsp;in a batch script similar to the following (you need command line svn installed and in the path to make this work; also obviously you&amp;#39;ll need to adjust some variables to adapt it to your own environment:&lt;/p&gt;
&lt;blockquote id="ao1b" dir="ltr" style="MARGIN-RIGHT:0px;"&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;REM set some variables&amp;nbsp; &lt;br /&gt;set SSDIR=path\to\VSS\ (folder containing srcsafe.ini)&lt;br /&gt;set SS=path\to\SS.EXE&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;REM move to VSS+SVN working folder&lt;br /&gt;pushd C:\Projects\MyProject\VSS&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;REM get latest version (recursively)&lt;br /&gt;%SS% GET $/path/to/MyProject/In/VSS -R -O- &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;REM svn add new files, svn delete disappeared files&lt;br /&gt;for /f &amp;quot;tokens=2&amp;quot; %%i in ( &amp;#39;svn status ^| findstr /R &amp;quot;^\?&amp;quot;&amp;#39;) do svn add %%i&lt;br id="ed4y" /&gt;for /f &amp;quot;tokens=2&amp;quot; %%i in ( &amp;#39;svn status ^| findstr /R &amp;quot;^\!&amp;quot;&amp;#39;) do svn del %%i&lt;/font&gt;&lt;/p&gt;
&lt;p id="rxeh"&gt;&lt;font face="courier new,courier"&gt;svn commit -m &amp;quot;got latest version (vss)&amp;quot;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;popd&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;div id="plow"&gt;As a last step, we still need to update our &amp;#39;real&amp;#39; (svn only) working copy. I keep this step manual, since I like to have control over when changes are actually copied over to my working copy; SVN will then merge the external changes, possibly marking any files which have been modified in VSS (by other users) and in our SVN working copy as &amp;#39;conflicted&amp;#39;. First advantage of the system: you get to decide yourself when to merge external changes into your working copy (since VSS does a &amp;#39;Get Latest Version&amp;#39; on check-out, you often need to do a full Get Latest Version of the project, which you may not yet be ready for).&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font size="3"&gt;&lt;strong&gt;Checking in your changes into VSS: bridging svn to vss&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;
&lt;p id="rdyr"&gt;As&amp;nbsp;said before, we use a &amp;#39;svn-only&amp;#39;&amp;nbsp;working copy to develop our features/bug fixes. Whenever a feature is ready to be committed, we can commit it to our local svn, but obviously we also have to make sure that we also check it properly into VSS. This is a little tricky, since here is where we need to bridge the gap between the svn &amp;#39;copy-modify-merge&amp;#39; and vss &amp;#39;lock-modify-unlock&amp;#39; philosophies. &lt;/p&gt;
&lt;p&gt;In a subversion environment, this is a matter of doing an &amp;#39;svn commit&amp;#39;; if that fails because of an out-of-date conflict, we need to do an &amp;#39;svn update&amp;#39; first, then resolve conflicts (if any), build and test and try to commit again; repeat until the commit passes. With VSS however, we need to make sure we have all files checked out before we can start modifying them. &lt;/p&gt;
&lt;p&gt;The steps needed to do the &amp;#39;svn update&amp;#39; part in our VSS+SVN environment are described above (vss -&amp;gt; svn). But the &amp;#39;svn commit&amp;#39; part is now to be replaced by a &amp;#39;VSS check in&amp;#39;. To be able to do so, we first need to explicitly check out the needed files in VSS. &lt;/p&gt;
&lt;p&gt;Now wat do we want to achieve here? We want to merge our change from our svn-only working copy into our vss+svn working copy, where we can check things into VSS. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Check out all files from VSS into our vss+svn working copy. VSS will get the latest version, which may cause a final &amp;#39;vss2svn&amp;#39; synchronization step. For files that are locked by someone else, we&amp;#39;re still blocked,&amp;nbsp;however it&amp;#39;s now easier for me to simply &amp;#39;undo checkout&amp;#39; if needed. &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Once we have all files checked out in VSS, we can do the commit from our svn-only working copy, and update our vss+svn working copy. This effectively merges our change into the VSS working copy.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Finally, we can check things into VSS.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p id="q55b"&gt;&lt;font size="3"&gt;&lt;strong&gt;Benefits&lt;/strong&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now this may seem quite some work, and it is to some extent.&amp;nbsp;However, you do get some nice functionality in return:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;first and foremost, you get rid of the checkout-modify-checkin burden&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;you can do your own developments in some isolation (of course it remains a best practice to integrate the work of your colleages early and often, but at least you&amp;#39;re calling the shots now instead of VSS)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;you get a much more powerful, changeset-based &amp;#39;svn log&amp;#39;, and &amp;#39;svn annotate&amp;#39; &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;it becomes really easy to reverse previous change sets (impossible with VSS), or go back to a previous revision of the project (possible but awkward with VSS)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;branching: e.g. you can create your own private feature branches, if you want&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;For example, we&amp;#39;re currently finalizing a release, while the next release will be dedicated to upgrading to VS2008/.Net 2.0 (from VS2003/.Net 1.1). So we&amp;#39;ve created a branch in subversion to perform the necessary changes for the upgrade, while other team members can still work on finalizing the release. When the release is done, we will merge the changes from the feature branch back into VSS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;jeroen&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1423" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/jeroen/archive/tags/subversion/default.aspx">subversion</category><category domain="http://www.dotnet6.com/blogs/jeroen/archive/tags/vss/default.aspx">vss</category></item><item><title>BMW M3 with M-DCT Available!</title><link>http://www.dotnet6.com/blogs/jokke/archive/2008/04/02/bmw-m3-with-m-dct-available.aspx</link><pubDate>Wed, 02 Apr 2008 12:59:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1412</guid><dc:creator>Jokke</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hi People.&lt;/p&gt;&lt;p&gt;I wanted to share this with you guys, as it is quite cool.&lt;/p&gt;&lt;p&gt;The M-DCT system is a next generation transmission system, following the SMG system from the M5/M6. It is a double clutch transmission to make transitions between gears (7 of them) smoother and to reduce the 0-100 km/h time.&lt;/p&gt;&lt;p&gt;Below are pictures of this new transmission system.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.classicdriver.com/upload/images/_uk/13652/img02.jpg" title="M3 M-DCT" alt="M3 M-DCT" height="300" width="540" /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://i148.photobucket.com/albums/s19/bouxiedidi/DSC07198.jpg?t=1207079062" height="768" width="909" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Not everyone was always as positive when talking about the SMG transmission. As the first M3&amp;#39;s with M-DCT are shipping out, we can read the early reviews by the owners. &lt;a href="http://www.m3post.com/forums/showthread.php?t=130007" target="_blank"&gt;Here is an example&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;And for those of you who can&amp;#39;t get enough of this amazing car. &lt;a href="http://www.m3post.com/forums/showthread.php?t=100058" target="_blank"&gt;Here&lt;/a&gt; is another link with pictures of just about every available configuration.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It&amp;#39;ll be a few more years until I place my order ;-) &lt;br /&gt;Cheers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[One more picture to stop]&lt;br /&gt;&lt;img src="http://spots.autogespot.com/files/18_03_2008/c214748364818032008203624_2.jpg" height="600" width="800" alt="" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1412" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/jokke/archive/tags/BMW/default.aspx">BMW</category></item><item><title>Exclude unwanted code from code coverage</title><link>http://www.dotnet6.com/blogs/jokke/archive/2008/03/28/remove-unwanted-code-from-code-coverage.aspx</link><pubDate>Fri, 28 Mar 2008 19:35:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1370</guid><dc:creator>Jokke</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;This is the solution for a problem I encountered a while ago. &lt;/p&gt;

&lt;p&gt;When writing tests with Visual Studio, we frequently want to use the Code Coverage tool to evaluate our created tests. Though this is a good tool, we don&amp;#39;t always want all of our code to be included in the coverage result. Let me give you an example.&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;I have created 2 projects:&lt;br /&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A class library [MyProject] with 2 classes: &lt;b&gt;ClassToBeTested &lt;/b&gt;and &lt;b&gt;MyException&lt;/b&gt;&lt;br /&gt;&lt;/li&gt;

&lt;li&gt;A unit test project [MyTestProject] for which I kept the default class. I renamed it to &lt;b&gt;MyProjectUnitTest&lt;/b&gt;&lt;/li&gt;
&lt;b&gt;&lt;br /&gt;&lt;a href="http://www.dotnet6.com/blogs/jokke/CC0.JPG"&gt;&lt;img src="http://www.dotnet6.com/blogs/jokke/CC0.JPG" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/b&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;br /&gt;The classes from the &lt;b&gt;class library&lt;/b&gt; look like this: &lt;br /&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ClassToBeTested&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; MaxParameterLength = 5;&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; MethodToBeTested(&lt;span class="kwrd"&gt;string&lt;/span&gt; someParameter)&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="rem"&gt;// Validate the parameter&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (someParameter.Length &amp;gt; MaxParameterLength)&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; MyException(&lt;span class="str"&gt;&amp;quot;The length of the parameter was too large.&amp;quot;&lt;/span&gt;);&lt;br /&gt;        }&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; Random().Next();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;pre class="csharpcode"&gt;[System.Serializable]&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MyException : Exception&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; MyException() { }&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; MyException(&lt;span class="kwrd"&gt;string&lt;/span&gt; message) : &lt;span class="kwrd"&gt;base&lt;/span&gt;(message) { }&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; MyException(&lt;span class="kwrd"&gt;string&lt;/span&gt; message, Exception inner) : &lt;span class="kwrd"&gt;base&lt;/span&gt;(message, inner) { }&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; MyException(&lt;br /&gt;      System.Runtime.Serialization.SerializationInfo info,&lt;br /&gt;      System.Runtime.Serialization.StreamingContext context)&lt;br /&gt;        : &lt;span class="kwrd"&gt;base&lt;/span&gt;(info, context) { }&lt;br /&gt;}&lt;/pre&gt;
&lt;pre class="csharpcode"&gt;&lt;br /&gt;The &lt;b&gt;Unit Test Class &lt;/b&gt;looks like this (I did snip some generated code):&amp;nbsp;&lt;br /&gt;&lt;/pre&gt;
&lt;pre class="csharpcode"&gt;[TestClass]&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MyProjectUnitTest&lt;br /&gt;{&lt;/pre&gt;
&lt;pre class="csharpcode"&gt;    [TestMethod]&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ClassToBeTestedTest()&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;int&lt;/span&gt; expected = 0;&lt;br /&gt;        ClassToBeTested classToBeTested = &lt;span class="kwrd"&gt;new&lt;/span&gt; ClassToBeTested();&lt;br /&gt;        &lt;span class="kwrd"&gt;int&lt;/span&gt; actual = classToBeTested.MethodToBeTested(&lt;span class="str"&gt;&amp;quot;abc&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        Assert.IsTrue(actual &amp;gt; expected);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    [TestMethod]&lt;br /&gt;    [ExpectedException(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(MyException))]&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ClassToBeTestedExceptionTest()&lt;br /&gt;    {&lt;br /&gt;        ClassToBeTested classToBeTested = &lt;span class="kwrd"&gt;new&lt;/span&gt; ClassToBeTested();&lt;br /&gt;        &lt;span class="kwrd"&gt;int&lt;/span&gt; actual = classToBeTested.MethodToBeTested(&lt;span class="str"&gt;&amp;quot;abcdef&amp;quot;&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;When we run the unit tests with code coverage used for MyProject, we get a &lt;b&gt;code coverage result of &amp;nbsp;62,50%&lt;/b&gt; which is not as much as we would expect in such a small project.&lt;br /&gt;Below, we can see that the reason for this low score, is the Exception class we use.&lt;br /&gt;&lt;a href="http://www.dotnet6.com/blogs/jokke/CC1.JPG"&gt;&lt;img src="http://www.dotnet6.com/blogs/jokke/CC1.JPG" border="0" alt="" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Now, if we create a project with many Exception classes, we do not want to write tests for all of these classes. I want to &lt;b&gt;exclude &lt;/b&gt;this class &lt;b&gt;from code coverage&lt;/b&gt;. If we search the net, we will find that there is no specific solution for this problem. There is a workaround though.&lt;br /&gt;This workaround comes in the form of attributes. We have 2 possibilities:&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;"&gt;1. [System.Diagnostics.&lt;span&gt;DebuggerNonUserCode&lt;/span&gt;()]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;"&gt;2. [System.Diagnostics.&lt;span&gt;DebuggerHidden&lt;/span&gt;()]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
The first attribute we can use for both classes and class members. The second one, we can only use for class members: constructors, methods, properties and indexers.&lt;/p&gt;

&lt;p&gt;As we want to exclude the whole class from code coverage, I will opt for attribute 1. We just place it on the MyException class (or any class you want to exclude).&lt;br /&gt;We run the tests again, and take a look at the result:&lt;br /&gt;&lt;a href="http://www.dotnet6.com/blogs/jokke/CC2.JPG"&gt;&lt;img src="http://www.dotnet6.com/blogs/jokke/CC2.JPG" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not only is our &lt;b&gt;code coverage raised to 100%&lt;/b&gt;, the class on which I put the attribute has also disappeared from the results.&lt;br /&gt;&lt;br /&gt; &lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;b&gt;Important note&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;As you may have guessed, there is a drawback to using these attributes. &lt;br /&gt;If you use the &lt;b&gt;DebuggerNonUserCode&lt;/b&gt; or &lt;b&gt;DebuggerHidden&lt;/b&gt; attribute, the code will be ignored completely; you won&amp;#39;t be able to step into the code anymore. Also, any breakpoints you will add, will be ignored completely.&lt;/p&gt;

&lt;p&gt;Make sure you don&amp;#39;t just start adding the attributes for the sake of raising your code coverage score. Use this &lt;b&gt;approach carefully &lt;/b&gt;as you might be excluding code from your results that needs to be tested!&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Good luck.&lt;/p&gt;
&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1370" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/jokke/archive/tags/Testing/default.aspx">Testing</category><category domain="http://www.dotnet6.com/blogs/jokke/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Browser specific CSS</title><link>http://www.dotnet6.com/blogs/bart_callaerts/archive/2008/03/28/browser-specific-css.aspx</link><pubDate>Fri, 28 Mar 2008 09:00:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1369</guid><dc:creator>BartC</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;For those of you who are wondering if it is possible to create a css seperatly for Firefox and IE : Yes you can. It is possible to create let&amp;#39;s say a css for&amp;nbsp;IE and then overwrite the classes when the user is browsing through FF.&lt;/p&gt;
&lt;p&gt;Microsoft has provided a thing called Conditional Comments and it works like this : &lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;link&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;rel&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;type&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;text/css&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;href&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;../css/CSS_FOR_ALL_BROWSERS.css&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;![&lt;/font&gt;&lt;font size="2"&gt;if ! IE]&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;link&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;rel&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;type&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;text/css&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;href&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;../css/CSS_THAT_OVERWRITES_THE_THINGS_THAT_RENDER_DIFFERENT_IN_OTHER_BROWSERS.css&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;&amp;lt;![&lt;/font&gt;&lt;font size="2"&gt;endif]&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;Here is a link to Microsoft&amp;#39;s MSDN page : &lt;a href="http://msdn2.microsoft.com/en-us/library/ms537512.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms537512.aspx&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;Maybe this can come in handy some day.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;greetz, Barre&lt;/p&gt;&lt;/font&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1369" width="1" height="1"&gt;</description></item><item><title>Microsoft Office Interactive Developer Map</title><link>http://www.dotnet6.com/blogs/erik_lenaerts/archive/2008/02/26/microsoft-office-interactive-developer-map.aspx</link><pubDate>Wed, 27 Feb 2008 06:48:08 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1182</guid><dc:creator>ErikL</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;sweet wpf based application from Microsoft deployed via click once. Besides the usefullness of the application, I think its a good demo to show to customers what wpf and click once is about.&lt;/p&gt; &lt;p&gt;&lt;a title="http://msdn2.microsoft.com/en-us/office/bb497969.aspx" href="http://msdn2.microsoft.com/en-us/office/bb497969.aspx"&gt;http://msdn2.microsoft.com/en-us/office/bb497969.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1182" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/erik_lenaerts/archive/tags/Microsoft+Office/default.aspx">Microsoft Office</category></item><item><title>Thread-safe caching mechanism using a Hashtable</title><link>http://www.dotnet6.com/blogs/jokke/archive/2008/02/15/hashtable-concurrency-issues.aspx</link><pubDate>Fri, 15 Feb 2008 16:26:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1175</guid><dc:creator>Jokke</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi. I wanted to start my first (real) blog post with some interesting material ;-)&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;On our current project we have been struggling with the following problem. We need a custom caching system that uses a static Hashtable to cache its items. As we work in a multi-threaded environment, this solutions needs to be thread safe. Which was off-course the difficulty.&lt;br /&gt; &lt;/p&gt;

&lt;p&gt;Down the road we bumped into a few possibilities:&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;&lt;u&gt;1. Using the &lt;span style="font-weight:bold;"&gt;lock()&lt;/span&gt; mechanism Visual studio provides&lt;/u&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;This was not a good solution as the creation of the instance was happening within the lock() statement. This had a really bad influence on performance. All threads would be in a waiting state whenever a new instance was created. So we moved on.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;&lt;u&gt;2. Using the &lt;span style="font-weight:bold;"&gt;ReaderWriterLockSlim&lt;/span&gt; class&lt;/u&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;This class is new in the .NET Framework 3.5 and is an improvement on the ReaderWriterLock class in previous versions of the framework. &lt;a href="http://www.bluebytesoftware.com/blog/PermaLink,guid,c4ea3d6d-190a-48f8-a677-44a438d8386b.aspx" target="_blank"&gt;This young man&lt;/a&gt; wrote quite a good blog post on this topic. And &lt;a href="http://devplanet.com/blogs/brianr/archive/2008/01/18/thread-safe-dictionary-in-net.aspx" target="_blank"&gt;this guy&lt;/a&gt; also came up with a thread safe Dictionary implementation (easily convertible into a Hashtable).&lt;/p&gt;
&lt;p&gt;This solution was still no good as we were in need for a finer grained locking mechanism. This means that a lock can only occur when 2 threads are asking for the same object. When ThreadA is waiting on object X to be created, and ThreadB is also asking for object X and ThreadC asks for an instance of object Y, there may not be a waiting period for ThreadC. ThreadB though will always have to wait until ThreadA has completed its work and will then get a reference to the same instance created by ThreadA.&lt;/p&gt;
&lt;p&gt;Close, but no cigar. We moved on again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;&lt;u&gt;3. The &lt;span style="font-weight:bold;"&gt;solution&lt;/span&gt;&lt;/u&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;After brainstorming with a few colleagues, we came up with a solution.&lt;/p&gt;
&lt;p&gt;Instead of maintaining one Hashtable with the instances, we will maintain 2 Hashtables: one for the instances and one for the storage of locking objects. This way, we would only have to lock the instanceLocks Hashtable whenever we would instantiate a new object. The instance Hashtable would remain untouched during the creation period. The Instance Hashtable would still get locked afterward, but only to add the newly created instances to its collection. You might also recognize the double-check locking pattern to make sure the object being locked didn&amp;#39;t change while locking it.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt; Voila, we found what we were looking for. Below is the code to accomplish this.&lt;/p&gt;
&lt;p&gt;By the way: if you are wondering why the delegate is declared in the namespace; we did this so we can pass the method - which we call to actually create the object - to the &lt;b&gt;Get&lt;/b&gt; method. This way, the creation of the objects is separated from the caching mechanism. &lt;/p&gt;
&lt;p&gt;Hope this is of relevant use to you. Enjoy.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; CustomCaching&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;delegate&lt;/span&gt; TContract AnonymousDelegate&amp;lt;TContract&amp;gt;();&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; HashtableCache&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; Hashtable instances = &lt;span class="kwrd"&gt;new&lt;/span&gt; Hashtable();&lt;br /&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; Hashtable instanceLocks = &lt;span class="kwrd"&gt;new&lt;/span&gt; Hashtable();&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; TContract Get&amp;lt;TContract&amp;gt;(AnonymousDelegate&amp;lt;TContract&amp;gt; anonymousBuildUpDelegate)&lt;br /&gt;            &lt;span class="kwrd"&gt;where&lt;/span&gt; TContract : &lt;span class="kwrd"&gt;class&lt;/span&gt;&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;string&lt;/span&gt; key = &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(TContract).FullName;&lt;br /&gt;            TContract contract = &lt;span class="kwrd"&gt;default&lt;/span&gt;(TContract);&lt;br /&gt;&lt;br /&gt;            &lt;span class="rem"&gt;// See if the instance already exists, without taking a lock on it.&lt;/span&gt;&lt;br /&gt;            contract = TryGetInstance&amp;lt;TContract&amp;gt;(key);&lt;br /&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (contract != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="kwrd"&gt;return&lt;/span&gt; contract;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;object&lt;/span&gt; instanceLock;&lt;br /&gt;&lt;br /&gt;            &lt;span class="rem"&gt;// The instance wasn&amp;#39;t found on the first try. Now we take a lock on the hashtable.&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;lock&lt;/span&gt; (instances)&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="rem"&gt;// Some other thread might have accessed the hashtable already, &lt;br /&gt;		// so do a second check.&lt;/span&gt;&lt;br /&gt;                contract = TryGetInstance&amp;lt;TContract&amp;gt;(key);&lt;br /&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (contract != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span class="kwrd"&gt;return&lt;/span&gt; contract;&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                &lt;span class="rem"&gt;// We still haven&amp;#39;t found the instance, so let&amp;#39;s create it.&lt;/span&gt;&lt;br /&gt;                &lt;span class="rem"&gt;// We keep a dictionary of creation locks per key; &lt;/span&gt;&lt;br /&gt;                &lt;span class="rem"&gt;// this is our fine grained locking mechanism.&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;lock&lt;/span&gt; (instanceLocks)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span class="rem"&gt;// If the lock is already created by another thread, use it. If not&lt;/span&gt;&lt;br /&gt;                    &lt;span class="rem"&gt;// create one ourselves and add it to the locks hashtable.&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (instanceLocks.ContainsKey(key))&lt;br /&gt;                    {&lt;br /&gt;                        instanceLock = instanceLocks[key];&lt;br /&gt;                    }&lt;br /&gt;                    &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;br /&gt;                    {&lt;br /&gt;                        instanceLock = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt;();&lt;br /&gt;                        instanceLocks.Add(key, instanceLock);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span class="rem"&gt;// Now we take a lock on the finer grained object.&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;lock&lt;/span&gt; (instanceLock)&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="rem"&gt;// Check again if the singleton was already created. If so return it,&lt;/span&gt;&lt;br /&gt;                &lt;span class="rem"&gt;// after removing the creation lock.&lt;/span&gt;&lt;br /&gt;                contract = TryGetInstance&amp;lt;TContract&amp;gt;(key);&lt;br /&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (contract != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;                {&lt;br /&gt;                    RemoveInstanceLock(key);&lt;br /&gt;                    &lt;span class="kwrd"&gt;return&lt;/span&gt; contract;&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                &lt;span class="rem"&gt;// We can now call the provided delegate to create our contract for us.&lt;/span&gt;&lt;br /&gt;                contract = anonymousBuildUpDelegate();&lt;br /&gt;&lt;br /&gt;                &lt;span class="rem"&gt;// Take a lock on the instances hashtable and add the created instance.&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;lock&lt;/span&gt; (instances)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span class="rem"&gt;// Double check: if the key does exist, &lt;br /&gt;		    // something has gone wrong.&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (instances.ContainsKey(key))&lt;br /&gt;                    {&lt;br /&gt;                        &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ApplicationException(&lt;span class="kwrd"&gt;&lt;br /&gt;			string&lt;/span&gt;.Format(&lt;span class="str"&gt;&amp;quot;A duplicate key {0} exists in the hashtable.&amp;quot;&lt;/span&gt;, &lt;br /&gt;				key));&lt;br /&gt;                    }&lt;br /&gt;                    instances.Add(key, contract);&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                &lt;span class="rem"&gt;// We remove the lock object from the locks hashtable&lt;/span&gt;&lt;br /&gt;                RemoveInstanceLock(key);&lt;br /&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;return&lt;/span&gt; contract;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; RemoveInstanceLock(&lt;span class="kwrd"&gt;string&lt;/span&gt; key)&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="rem"&gt;// Remove the locking object from the dictionary if it exists.&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;lock&lt;/span&gt; (instanceLocks)&lt;br /&gt;            {&lt;br /&gt;                instanceLocks.Remove(key);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; T TryGetInstance&amp;lt;T&amp;gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt; key) &lt;span class="kwrd"&gt;where&lt;/span&gt; T : &lt;span class="kwrd"&gt;class&lt;/span&gt;&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (instances.ContainsKey(key))&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="kwrd"&gt;return&lt;/span&gt; (T)instances[key];&lt;br /&gt;            }&lt;br /&gt;            &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1175" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/jokke/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://www.dotnet6.com/blogs/jokke/archive/tags/Threading/default.aspx">Threading</category></item><item><title>Blog code formatting</title><link>http://www.dotnet6.com/blogs/jokke/archive/2008/02/14/blog-code-formatting.aspx</link><pubDate>Thu, 14 Feb 2008 13:37:00 GMT</pubDate><guid isPermaLink="false">e5d4c6e2-da0c-4b9e-b9f2-d96787ec4ab1:1178</guid><dc:creator>Jokke</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi guys,&lt;/p&gt;
&lt;p&gt;While writing my first blog post, I stumbled on&amp;nbsp;the following problem: how do I format the code that I want to publish on the blog? It seems that when I paste my code in the blog editor, I lose all formatting (except for the coloring).&lt;/p&gt;
&lt;p&gt;My good friend &lt;a href="http://www.dotnet6.com/blogs/wesley_walraeve/default.aspx" target="_blank"&gt;Wesley&lt;/a&gt; told me that a website exists for creating formatted C# code. In my google search (the first link I came across actually)&amp;nbsp;I found &lt;a href="http://manoli.net/csharpformat/" target="_blank"&gt;a website&lt;/a&gt; that will do exactly that.&lt;/p&gt;
&lt;p&gt;This site can transform C#, vb and some other code types into the correct format. Jaj!&lt;/p&gt;
&lt;p&gt;I will give a before-after example of a testclass I created. Please don&amp;#39;t mind the code, just mind the formatting.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;font size="4"&gt;Before:&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;/font&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; System;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;/font&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; System.Collections.Generic;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;/font&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; System.Linq;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;/font&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; System.Text;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;namespace&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; Reflection&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;/font&gt;&lt;p&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;public&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;class&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Class1&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;public&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;void&lt;/font&gt;&lt;font size="2"&gt; SomeMethod(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;params&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;[] stackParams)&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Class2&lt;/font&gt;&lt;font size="2"&gt;.SomeOtherMethod();&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;b&gt;&lt;font size="4"&gt;After:&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Reflection&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Class1&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; SomeMethod(&lt;span class="kwrd"&gt;params&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] stackParams)&lt;br /&gt;        {&lt;br /&gt;            Class2.SomeOtherMethod();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best formatting wishes to you ;-)&lt;/p&gt;&lt;img src="http://www.dotnet6.com/aggbug.aspx?PostID=1178" width="1" height="1"&gt;</description><category domain="http://www.dotnet6.com/blogs/jokke/archive/tags/Blogging/default.aspx">Blogging</category><category domain="http://www.dotnet6.com/blogs/jokke/archive/tags/C_2300_/default.aspx">C#</category></item></channel></rss>