<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Exploring Microsoft.NET &#38; Apple Macintosh</title>
	<atom:link href="http://explore.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://explore.wordpress.com</link>
	<description>This blog is my modest attempt to list my discoveries, findings in .NET 1.1/2.0 and working with Mac OS X (Tiger)</description>
	<lastBuildDate>Mon, 10 Oct 2011 10:00:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='explore.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Exploring Microsoft.NET &#38; Apple Macintosh</title>
		<link>http://explore.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://explore.wordpress.com/osd.xml" title="Exploring Microsoft.NET &#38; Apple Macintosh" />
	<atom:link rel='hub' href='http://explore.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Installing SQL Server 2005 Management Studio Express on Vista</title>
		<link>http://explore.wordpress.com/2008/08/16/installing-sql-server-2005-management-studio-express-on-vista/</link>
		<comments>http://explore.wordpress.com/2008/08/16/installing-sql-server-2005-management-studio-express-on-vista/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 21:26:03 +0000</pubDate>
		<dc:creator>vasudevan</dc:creator>
				<category><![CDATA[Microsoft.NET]]></category>

		<guid isPermaLink="false">http://explore.wordpress.com/?p=50</guid>
		<description><![CDATA[I have finished developing a Silverlight web application (Expense Tracker to track day to day expenses). It uses WCF and LINQ on the middle tier and accesses SQL Server 2005 Express. The operating system that I developed on is Vista and unfortunately, SQL Server 2005 Management Studio is not supported on Vista. Management Studio is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=50&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have finished developing a Silverlight web application (Expense Tracker to track day to day expenses). It uses WCF and LINQ on the middle tier and accesses SQL Server 2005 Express. The operating system that I developed on is Vista and unfortunately, SQL Server 2005 Management Studio is not supported on Vista. Management Studio is a very useful tool that can manage any SQL Server database. I wanted this tool to run on Vista. Executing the install (SQLServer2005_SSMSEE.msi or SQLServer2005_SSMSEE_x64.msi) on Vista displays the following error:</p>
<p><a href="http://explore.files.wordpress.com/2008/08/studio.jpg"><img class="alignleft size-full wp-image-51" src="http://explore.files.wordpress.com/2008/08/studio.jpg?w=480&#038;h=300" alt="" width="480" height="300" /></a></p>
<p>I know for sure that there is a validation in the msi file that checks for the operating system version and prevents install on Vista. Enter ORCA. This is freeware tool that can edit MSI files. (http://support.microsoft.com/kb/255905). Open any of the msi&#8217;s in ORCA and search for &#8220;Installation of this product&#8221;. Keeping pressing F3 until you hit &#8220;SupportedOSMessage&#8221; property which carries this message. Now, search for this property in the whole MSI and you end up in LaunchCondition Table. On the right hand of the view, there is a Condition that is specified which should look like this:</p>
<p><a href="http://explore.files.wordpress.com/2008/08/condition.jpg"><img class="alignleft size-full wp-image-53" src="http://explore.files.wordpress.com/2008/08/condition.jpg?w=479&#038;h=178" alt="" width="479" height="178" /></a></p>
<p>The installer checks whether the current operating system is 502 or above (The VersionNT version of Vista is 600) and terminates the installtion with a error. The quickest and dirty way to override this is to remove both the Launch conditions and save the MSI file, exit out of ORCA and run the MSI. You should be able to install the Management Studio now on Vista.</p>
<p><a href="http://explore.files.wordpress.com/2008/08/condition.jpg"><br />
</a></p>
<p><img src="/Users/VASUDE~1/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<p><a href="http://explore.files.wordpress.com/2008/08/studio.jpg"><br />
</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/explore.wordpress.com/50/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/explore.wordpress.com/50/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/explore.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/explore.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/explore.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/explore.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/explore.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/explore.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/explore.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/explore.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/explore.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/explore.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/explore.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/explore.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/explore.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/explore.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=50&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://explore.wordpress.com/2008/08/16/installing-sql-server-2005-management-studio-express-on-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d981159e8685c876f73611d9ff05175?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vasudevan</media:title>
		</media:content>

		<media:content url="http://explore.files.wordpress.com/2008/08/studio.jpg" medium="image" />

		<media:content url="http://explore.files.wordpress.com/2008/08/condition.jpg" medium="image" />

		<media:content url="/Users/VASUDE~1/AppData/Local/Temp/moz-screenshot.jpg" medium="image" />
	</item>
		<item>
		<title>Assembly aliases</title>
		<link>http://explore.wordpress.com/2008/06/22/assembly-aliases/</link>
		<comments>http://explore.wordpress.com/2008/06/22/assembly-aliases/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 19:00:44 +0000</pubDate>
		<dc:creator>vasudevan</dc:creator>
				<category><![CDATA[C# 2.0 New Features]]></category>

		<guid isPermaLink="false">http://explore.wordpress.com/?p=34</guid>
		<description><![CDATA[This is the first in series of articles that I&#8217;m going to write on new not so familiar C# 2.0 language enhancements. This article will talk about the new namespace/class alias feature extremely useful in situations that I have listed below: 1. You have a third party library which happens to have namespaces and the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=34&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:17px;">This is the first in series of articles that I&#8217;m going to write on new not so familiar C# 2.0 language enhancements.</span></p>
<p><span style="font-size:12px;">This article will talk about the new namespace/class alias feature extremely useful in situations that I have listed below:</span></p>
<p><span style="font-size:12px;">1. You have a third party library which happens to have namespaces and the classes that are identical to the ones you have created. When referencing both the assemblies in your client code, you may be confused on how to call the methods in each of the classes separately. You may argue that you cannot modify the namespace/classses in the third party tool but you can do so in your library. But, the point to illustrate here is C# 2.0 has ways to continue using both the libraries untouched with a new alias feature.</span></p>
<p><span style="font-size:12px;">2. What if you have two different versions of your assemblies and both have the same namespace/classes and you wanted to use both of them for backward compatibilities or for other things. Enter C# 2.0&#8242;s new alias feature.</span></p>
<p><span style="font-size:12px;">Here is a working code snippet that you can copy and paste:</span></p>
<p>Assembly 1:<br />
========</p>
<p><code><br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
namespace Alias<br />
{<br />
    public class AliasClass<br />
    {<br />
        public string Method1()<br />
        {<br />
            return "This is from method1";<br />
        }<br />
    }<br />
}<br />
</code></p>
<p>Assembly 2:<br />
========<br />
<code><br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
namespace Alias<br />
{<br />
    public class AliasClass<br />
    {<br />
        public string Method2()<br />
        {<br />
            return "This is from method2";<br />
        }<br />
    }<br />
}</code></p>
<p>AliasClient<br />
========<br />
<code><br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using Alias;</p>
<p>namespace AliasClient<br />
{<br />
    class Program<br />
    {<br />
        static void Main(string[] args)<br />
        {<br />
            AliasClass al = new AliasClass();<br />
        }<br />
    }<br />
}<br />
 </code></p>
<p><span style="font-size:12px;"><br />
Referencing both the dlls and compiling the code, will throw &#8220;The type &#8216;Alias.AliasClass&#8217; exists in both assemblies&#8221; error. Also, when you type al. the Intellisense only lists Method1() here. So, you are unable to use both the assemblies.<br />
 </span></p>
<p><span style="font-size:12px;">But, C# 2.0 has a very useful feature to eliminate this issue:</span></p>
<p><code><br />
extern alias class1;<br />
extern alias class2;</p>
<p>using System;<br />
using System.Collections.Generic;<br />
using System.Text;</p>
<p>namespace AliasClient<br />
{<br />
    class Program<br />
    {<br />
        static void Main(string[] args)<br />
        {<br />
            class1::Alias.AliasClass al1 = new class1::Alias.AliasClass();<br />
            class2::Alias.AliasClass al2 = new class2::Alias.AliasClass();<br />
            Console.WriteLine(al1.Method1());<br />
            Console.WriteLine(al2.Method2());<br />
            Console.ReadLine();<br />
     }<br />
   }<br />
}<br />
</code></p>
<p><span style="font-size:12px;"><br />
Using the new extern alias keyword, you first declare variables (&#8220;class1&#8243; and &#8220;class2&#8243;) for each of the conflicting assemblies.  Since you are within the VS.NET IDE, open the properties window for each of the assemblies and change the Aliases property to &#8220;class1&#8243; and &#8220;class2&#8243;. The important way to call the methods in the two different assemblies is to use the &#8220;::&#8221; syntax instead of the regular &#8220;.&#8221;syntax.</p>
<p>So, the following code will do the trick:<br />
</span></p>
<p><code></p>
<p>            class1::Alias.AliasClass al1 = new class1::Alias.AliasClass();<br />
            class2::Alias.AliasClass al2 = new class2::Alias.AliasClass();<br />
            Console.WriteLine(al1.Method1());<br />
            Console.WriteLine(al2.Method2());<br />
            Console.ReadLine();<br />
</code></p>
<p>Pretty neat&#8230;uuh&#8230;</p>
<p></font></span> </p>
<p> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/explore.wordpress.com/34/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/explore.wordpress.com/34/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/explore.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/explore.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/explore.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/explore.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/explore.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/explore.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/explore.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/explore.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/explore.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/explore.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/explore.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/explore.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/explore.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/explore.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=34&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://explore.wordpress.com/2008/06/22/assembly-aliases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d981159e8685c876f73611d9ff05175?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vasudevan</media:title>
		</media:content>
	</item>
		<item>
		<title>ClickOnce limitations</title>
		<link>http://explore.wordpress.com/2007/12/17/clickonce-limitations/</link>
		<comments>http://explore.wordpress.com/2007/12/17/clickonce-limitations/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 18:35:54 +0000</pubDate>
		<dc:creator>vasudevan</dc:creator>
				<category><![CDATA[Microsoft.NET]]></category>

		<guid isPermaLink="false">http://explore.wordpress.com/2007/12/17/clickonce-limitations/</guid>
		<description><![CDATA[The advantages of ClickOnce are good but it has its own limitations. I had a scenario in my company where I need to uninstall a SmartClient application programatically in a silent way and there is no easy way of doing it. I researched on the problem and even peeped into the API calls inside dfshim.dll [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=31&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The advantages of ClickOnce are good but it has its own limitations. I had a scenario in my company where I need to uninstall a SmartClient application programatically in a silent way and there is no easy way of doing it. I researched on the problem and even peeped into the API calls inside dfshim.dll by doing this:</p>
<p>dumpbin /exports /out:c:\dfshim.txt c:\windows\system32\dfshim.dll and the output is shown below:<br />
Dump of file c:\windows\system32\dfshim.dll</p>
<p>File Type: DLL</p>
<p>Section contains the following exports for dfshim.dll</p>
<p>00000000 characteristics<br />
4333AC7B time date stamp Fri Sep 23 00:19:23 2005<br />
0.00 version<br />
1 ordinal base<br />
17 number of functions<br />
17 number of names</p>
<p>ordinal hint RVA      name</p>
<p>8    0 00002C45 CleanOnlineAppCache<br />
9    1 00004245 CreateActContext<br />
10    2 00004225 CreateCMSFromXml<br />
11    3 00002A09 DllCanUnloadNow<br />
12    4 000028FD DllGetClassObject<br />
13    5 0000425A GetCurrentActContext<br />
14    6 00002BD0 GetDeploymentDataFromManifest<br />
15    7 000041EB GetUserStateManager<br />
16    8 000041CE GetUserStore<br />
1    9 00002C36 KillService<br />
17    A 00004208 ParseManifest<br />
2    B 00002BAE ShArpMaintain<br />
3    C 00002B8C ShArpMaintainW<br />
4    D 00002B79 ShOpenVerbApplication<br />
5    E 00002B66 ShOpenVerbApplicationW<br />
6    F 00002B53 ShOpenVerbShortcut<br />
7   10 00002B40 ShOpenVerbShortcutW</p>
<p>Summary</p>
<p>2000 .data<br />
2000 .reloc<br />
8000 .rsrc<br />
B000 .text<br />
There is no API call from dfshim.dll that can make the ClickOnce &#8220;Application Maintenance&#8221; dialog to be completely hidden. I really wanted the user to click on the OK button in the dialog to enable us to install a new version using Windows Installer instead of the crappy ClickOnce technology. There is no way to force the user to click on the OK button. So, what do we do?</p>
<p>I thought about it for a while and it occured to me that I can make good use of Win32 API to do some tricks to force the OK button to be clicked for the users. So, the steps outlined are:</p>
<p>1. Using ShellExecuteEx, run this: rundll32.exe dfshim.dll,ShArpMaintain &lt;application_name&gt;.application, Culture=neutral, PublicKeyToken=99a12388f7gh6f76, processorArchitecture=msil will show up this dialog: (I intentionally modified the name of the application and also changed the title name and erased some of the text inside the image).</p>
<p>2. Wait for the dialog to show (I&#8217;m not going to show the code for this as this is pretty simple). <a title="clickonce-uninstall-dialog-2.jpg" rel="attachment wp-att-33" href="http://explore.wordpress.com/2007/12/17/clickonce-limitations/attachment/33/"><img src="http://explore.files.wordpress.com/2007/12/clickonce-uninstall-dialog-2.jpg?w=450" alt="clickonce-uninstall-dialog-2.jpg" /></a><a title="clickonce-uninstall-dialog-2.jpg" rel="attachment wp-att-33" href="http://explore.wordpress.com/2007/12/17/clickonce-limitations/attachment/33/"></a></p>
<p>3. Call FindWindow by passing the ClickOnce &#8220;Application Maintenance&#8221; title name and pass the handle to SetForegroundWindow.</p>
<p>4. Call SetForegroundWindow to force the &#8220;Application Maintenance&#8221; dialog to get focus and stays visible to the user.</p>
<p>5. Use .NET&#8217;s SendKeys class to programatically click on the OK button in the &#8220;Application Maintenance&#8221; dialog:</p>
<p>SendKeys.Send(&#8220;+{TAB}&#8221;);   // + indicates SHIFT key which shifts the focus to the OK button as the focus defaults to Cancel button<br />
SendKeys.Send(&#8220;{ENTER}&#8221;); // ENTER makes the OK button to fire which will do the uninstall for the users.</p>
<p>Had M$ provided us with a way to silently uninstall a ClickOnce app, then it would have been a piece of cake.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/explore.wordpress.com/31/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/explore.wordpress.com/31/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/explore.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/explore.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/explore.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/explore.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/explore.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/explore.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/explore.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/explore.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/explore.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/explore.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/explore.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/explore.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/explore.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/explore.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=31&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://explore.wordpress.com/2007/12/17/clickonce-limitations/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d981159e8685c876f73611d9ff05175?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vasudevan</media:title>
		</media:content>

		<media:content url="http://explore.files.wordpress.com/2007/12/clickonce-uninstall-dialog-2.jpg" medium="image">
			<media:title type="html">clickonce-uninstall-dialog-2.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>TFS (Team Foundation Server) woes</title>
		<link>http://explore.wordpress.com/2007/06/06/tfs-team-foundation-server-woes/</link>
		<comments>http://explore.wordpress.com/2007/06/06/tfs-team-foundation-server-woes/#comments</comments>
		<pubDate>Wed, 06 Jun 2007 17:02:11 +0000</pubDate>
		<dc:creator>vasudevan</dc:creator>
				<category><![CDATA[Microsoft.NET]]></category>

		<guid isPermaLink="false">http://explore.wordpress.com/2007/06/06/tfs-team-foundation-server-woes/</guid>
		<description><![CDATA[I have been using TFS for the past several months for defect tracking and management and it seems it is working pretty well until I stumbled on this issue. There is no comprehensive support to search across multiple work items. I did Ctrl + F and searched for a string and bang!! &#8211; you see [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=29&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been using TFS for the past several months for defect tracking and management and it seems it is working pretty well until I stumbled on this issue. There is no comprehensive support to search across multiple work items. I did Ctrl + F and searched for a string and bang!! &#8211; you see the message as shown in the image.</p>
<p><a title="tfs-search-error2.jpg" rel="attachment wp-att-30" href="http://explore.wordpress.com/2007/06/06/tfs-team-foundation-server-woes/tfs-search-error2jpg/"><img src="http://explore.files.wordpress.com/2007/06/tfs-search-error2.jpg?w=450" alt="tfs-search-error2.jpg" /></a></p>
<p>I thought of writing a addin that accesses TFS SDK to enable that functionality. While searching for TFS SDK documentation, I stumbled upon this nice little addin that does what I had in my mind.</p>
<p>URL: <a href="http://blogs.msdn.com/noahc/archive/2007/03/08/search-work-items-team-system-addin.aspx">http://blogs.msdn.com/noahc/archive/2007/03/08/search-work-items-team-system-addin.aspx</a>.</p>
<p>I tried this addin personally and it works wonderfully to search for any work item by keyword or by bug ID.</p>
<p>Update: There is another neat addin called &#8220;TFS Quick Search&#8221; (<a href="http://blogs.msdn.com/noahc/archive/2007/03/08/search-work-items-team-system-addin.aspx">http://www.codeplex.com/tfsquicksearch</a>) which can do more wonders. Try it for yourself to find out!!!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/explore.wordpress.com/29/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/explore.wordpress.com/29/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/explore.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/explore.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/explore.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/explore.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/explore.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/explore.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/explore.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/explore.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/explore.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/explore.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/explore.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/explore.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/explore.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/explore.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=29&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://explore.wordpress.com/2007/06/06/tfs-team-foundation-server-woes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d981159e8685c876f73611d9ff05175?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vasudevan</media:title>
		</media:content>

		<media:content url="http://explore.files.wordpress.com/2007/06/tfs-search-error2.jpg" medium="image">
			<media:title type="html">tfs-search-error2.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Private Safari browsing&#8230;</title>
		<link>http://explore.wordpress.com/2007/04/08/private-safari-browsing/</link>
		<comments>http://explore.wordpress.com/2007/04/08/private-safari-browsing/#comments</comments>
		<pubDate>Sun, 08 Apr 2007 19:39:54 +0000</pubDate>
		<dc:creator>vasudevan</dc:creator>
				<category><![CDATA[Apple Macintosh]]></category>

		<guid isPermaLink="false">http://explore.wordpress.com/2007/04/08/private-safari-browsing/</guid>
		<description><![CDATA[This is my second posting on some of the features available on Mac OS X not directly available on Windows. Ever thought of private browsing on IE 6.x? You can, but there are several settings involved in achieving that. In Safari (Mac OS X), it is straight forward as shown below:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=24&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is my second posting on some of the features available on Mac OS X not directly available on Windows. Ever thought of private browsing on IE 6.x? You can, but there are several settings involved in achieving that. In Safari (Mac OS X), it is straight forward as shown below:</p>
<p><a rel="attachment wp-att-25" href="http://explore.wordpress.com/2007/04/08/private-safari-browsing/picture-2png/" title="picture-2.png"><img src="http://explore.files.wordpress.com/2007/04/picture-2.png?w=450" alt="picture-2.png" /></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/explore.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/explore.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/explore.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/explore.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/explore.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/explore.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/explore.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/explore.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/explore.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/explore.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/explore.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/explore.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/explore.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/explore.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/explore.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/explore.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=24&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://explore.wordpress.com/2007/04/08/private-safari-browsing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d981159e8685c876f73611d9ff05175?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vasudevan</media:title>
		</media:content>

		<media:content url="http://explore.files.wordpress.com/2007/04/picture-2.png" medium="image">
			<media:title type="html">picture-2.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Can Windows do this?</title>
		<link>http://explore.wordpress.com/2007/04/08/can-windows-do-this/</link>
		<comments>http://explore.wordpress.com/2007/04/08/can-windows-do-this/#comments</comments>
		<pubDate>Sun, 08 Apr 2007 18:38:53 +0000</pubDate>
		<dc:creator>vasudevan</dc:creator>
				<category><![CDATA[Apple Macintosh]]></category>

		<guid isPermaLink="false">http://explore.wordpress.com/2007/04/08/can-windows-do-this/</guid>
		<description><![CDATA[I&#8217;m a avid fan of Mac OS X (Tiger) and been using iMac (Intel Core Duo) dual  booting Windows and Mac OS X. This is my first article that compares Mac OS X&#8217;s out of the box features not natively available on Windows (2000, Me, XP, 2003, Vista (may be)). How would anybody save a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=20&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-23" href="http://explore.wordpress.com/2007/04/08/can-windows-do-this/pdfpng/" title="pdf.png"></a>I&#8217;m a avid fan of Mac OS X (Tiger) and been using iMac (Intel Core Duo) dual  booting Windows and Mac OS X. This is my first article that compares Mac OS X&#8217;s out of the box features not natively available on Windows (2000, Me, XP, 2003, Vista (may be)). How would anybody save a web page as a PDF on Windows. There is no direct way to do it. You would have to get this feature enabled by installing some software that will do this. Enter Mac OS X. Open Up Safari&#8230;Navigate to the web page you would like to save as PDF. This picture speaks for you. </p>
<p><a rel="attachment wp-att-21" href="http://explore.wordpress.com/2007/04/08/can-windows-do-this/picture-1png/" title="picture-1.png"></a><a rel="attachment wp-att-22" href="http://explore.wordpress.com/2007/04/08/can-windows-do-this/picture-1png-2/" title="picture-1.png"></a><a rel="attachment wp-att-23" href="http://explore.wordpress.com/2007/04/08/can-windows-do-this/pdfpng/" title="pdf.png"><img src="http://explore.files.wordpress.com/2007/04/pdf.png?w=450" alt="pdf.png" /></a></p>
<p>The rest of the steps is child&#8217;s play.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/explore.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/explore.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/explore.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/explore.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/explore.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/explore.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/explore.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/explore.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/explore.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/explore.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/explore.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/explore.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/explore.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/explore.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/explore.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/explore.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=20&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://explore.wordpress.com/2007/04/08/can-windows-do-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d981159e8685c876f73611d9ff05175?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vasudevan</media:title>
		</media:content>

		<media:content url="http://explore.files.wordpress.com/2007/04/pdf.png" medium="image">
			<media:title type="html">pdf.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Misleading Messages&#8230;</title>
		<link>http://explore.wordpress.com/2007/04/07/explorer-bug/</link>
		<comments>http://explore.wordpress.com/2007/04/07/explorer-bug/#comments</comments>
		<pubDate>Sat, 07 Apr 2007 20:01:12 +0000</pubDate>
		<dc:creator>vasudevan</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://explore.wordpress.com/2007/04/07/explorer-bug/</guid>
		<description><![CDATA[  I just discovered this bug when creating a folder in Windows (all flavors after 2000) and it is surprising to see the error message getting displayed. Try creating a folder that begins with a . (example:    .NET Samples). If you examine the message, it is misleading: &#8220;You must type a file name&#8221;. I know the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=15&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-16" href="http://explore.wordpress.com/2007/04/07/explorer-bug/windows-error-messagepng/" title="windows-error-message.png"></a><a rel="attachment wp-att-16" href="http://explore.wordpress.com/2007/04/07/explorer-bug/windows-error-messagepng/" title="windows-error-message.png"></a></p>
<p><a rel="attachment wp-att-16" href="http://explore.wordpress.com/2007/04/07/explorer-bug/windows-error-messagepng/" title="windows-error-message.png"></a><a rel="attachment wp-att-17" href="http://explore.wordpress.com/2007/04/07/explorer-bug/windows-error-messagepng-2/" title="windows-error-message.png"></a> <a rel="attachment wp-att-18" href="http://explore.wordpress.com/2007/04/07/explorer-bug/windows-error-message1gif/" title="windows-error-message1.gif"><img src="http://explore.files.wordpress.com/2007/04/windows-error-message1.gif?w=450" alt="windows-error-message1.gif" /></a></p>
<p>I just discovered this bug when creating a folder in Windows (all flavors after 2000) and it is surprising to see the error message getting displayed. Try creating a folder that begins with a . (example:    .NET Samples). If you examine the message, it is misleading: &#8220;You must type a file name&#8221;.</p>
<p>I know the real problem. The problem is that Windows thinks that I have typed a filename with no name but just the extension. But, I was infact trying to create a folder that begins with a dot (.).</p>
<p>But, when typing a &lt; or &gt; during folder creation, Windows displays this tooltip <a rel="attachment wp-att-27" href="http://explore.wordpress.com/2007/04/07/explorer-bug/tooltip-may-24-2jpg/" title="tooltip-may-24-2.jpg"><img src="http://explore.files.wordpress.com/2007/05/tooltip-may-24-2.jpg?w=450" alt="tooltip-may-24-2.jpg" /></a><a rel="attachment wp-att-26" href="http://explore.wordpress.com/2007/04/07/explorer-bug/tooltip-may-24jpg/" title="tooltip-may-24.jpg"></a><a rel="attachment wp-att-26" href="http://explore.wordpress.com/2007/04/07/explorer-bug/tooltip-may-24jpg/" title="tooltip-may-24.jpg"></a></p>
<p><a rel="attachment wp-att-26" href="http://explore.wordpress.com/2007/04/07/explorer-bug/tooltip-may-24jpg/" title="tooltip-may-24.jpg"></a><a rel="attachment wp-att-26" href="http://explore.wordpress.com/2007/04/07/explorer-bug/tooltip-may-24jpg/" title="tooltip-may-24.jpg"></a></p>
<p>and doesn&#8217;t even allow you to type a invalid character. Wondering, why didn&#8217;t they include this validation when a folder begins with a dot (.).</p>
<p>Btw, I was able to create a folder that begins with a dot (.) like .NET from MS-DOS Command prompt. This is still more confusing !!!</p>
<p>Anybody encountered this?</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/explore.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/explore.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/explore.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/explore.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/explore.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/explore.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/explore.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/explore.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/explore.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/explore.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/explore.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/explore.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/explore.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/explore.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/explore.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/explore.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=15&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://explore.wordpress.com/2007/04/07/explorer-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d981159e8685c876f73611d9ff05175?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vasudevan</media:title>
		</media:content>

		<media:content url="http://explore.files.wordpress.com/2007/04/windows-error-message1.gif" medium="image">
			<media:title type="html">windows-error-message1.gif</media:title>
		</media:content>

		<media:content url="http://explore.files.wordpress.com/2007/05/tooltip-may-24-2.jpg" medium="image">
			<media:title type="html">tooltip-may-24-2.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Displaying all warnings&#8230;</title>
		<link>http://explore.wordpress.com/2007/02/09/displaying-all-warnings/</link>
		<comments>http://explore.wordpress.com/2007/02/09/displaying-all-warnings/#comments</comments>
		<pubDate>Fri, 09 Feb 2007 05:22:11 +0000</pubDate>
		<dc:creator>vasudevan</dc:creator>
				<category><![CDATA[Microsoft.NET]]></category>

		<guid isPermaLink="false">http://explore.wordpress.com/2007/02/09/displaying-all-warnings/</guid>
		<description><![CDATA[VS.NET 2005 defaults to 200 warnings in the Error List view when a project is compiled. The VS.NET team decided with this number to improve performance of the IDE.  However, it is better to view all warnings at once to enable a developer to prioritize on fixing each of the warning. To override the 200 warning limit, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=14&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>VS.NET 2005 defaults to 200 warnings in the Error List view when a project is compiled. The VS.NET team decided with this number to improve performance of the IDE.  However, it is better to view all warnings at once to enable a developer to prioritize on fixing each of the warning.</p>
<p>To override the 200 warning limit, do this: Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\EDev\CodeAnalysisErrorListViolationLimit and increase the number to something bigger (hex value).</p>
<p>It is a general practice for most of the developers to ignore all warnings and move their app to prod which I feel is not good. It is always better to fix all the warnings and the best approach is to to treat all warnings as errors and fortunately, VS.NET has a setting that can do the same. So, once this setting is enforced in VS.NET, your project will never compile successfully until all warnings are fixed.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/explore.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/explore.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/explore.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/explore.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/explore.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/explore.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/explore.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/explore.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/explore.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/explore.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/explore.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/explore.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/explore.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/explore.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/explore.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/explore.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=14&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://explore.wordpress.com/2007/02/09/displaying-all-warnings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d981159e8685c876f73611d9ff05175?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vasudevan</media:title>
		</media:content>
	</item>
		<item>
		<title>Detecting the default browser&#8230;</title>
		<link>http://explore.wordpress.com/2006/12/21/detecting-the-default-browser/</link>
		<comments>http://explore.wordpress.com/2006/12/21/detecting-the-default-browser/#comments</comments>
		<pubDate>Thu, 21 Dec 2006 18:21:57 +0000</pubDate>
		<dc:creator>vasudevan</dc:creator>
				<category><![CDATA[Microsoft.NET]]></category>

		<guid isPermaLink="false">http://explore.wordpress.com/2006/12/21/detecting-the-default-browser/</guid>
		<description><![CDATA[On Oct 18, I wrote a article on showing hyperlinks from a WinForms 2.0 application. In that article, I also mentioned that I will be writing a article to check the default browser instead of hard coding the .exe file for Internet Explorer. Now this article discusses that technique. private enum ShowCommands { SW_HIDE = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=13&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On Oct 18, I wrote a article on showing <a href="http://explore.wordpress.com/2006/10/18/showing-a-hyperlink-in-a-win-form-20/">hyperlinks from a WinForms 2.0 application</a>. In that article, I also mentioned that I will be writing a article to check the default browser instead of hard coding the .exe file for Internet Explorer. Now this article discusses that technique.</p>
<p><code><br />
private enum ShowCommands<br />
{<br />
SW_HIDE = 0,<br />
SW_SHOWNORMAL = 1,<br />
SW_NORMAL = 1,<br />
SW_SHOWMINIMIZED = 2,<br />
SW_SHOWMAXIMIZED = 3,<br />
SW_MAXIMIZE = 3,<br />
SW_SHOWNOACTIVATE = 4,<br />
SW_SHOW = 5,<br />
SW_MINIMIZE = 6,<br />
SW_SHOWMINNOACTIVE = 7,<br />
SW_SHOWNA = 8,<br />
SW_RESTORE = 9,<br />
SW_SHOWDEFAULT = 10,<br />
SW_FORCEMINIMIZE = 11,<br />
SW_MAX = 11<br />
}</code></p>
<p>[DllImport("shell32.dll")]<br />
static extern IntPtr ShellExecute(<br />
IntPtr hwnd,<br />
string lpOperation,<br />
string lpFile,<br />
string lpParameters,<br />
string lpDirectory,<br />
ShowCommands nShowCmd);</p>
<p>IntPtr ptr = IntPtr.Zero;<br />
ptr = ShellExecute(IntPtr.Zero, &#8220;open&#8221;, &#8220;http://channel9.msdn.com&#8221;, &#8220;&#8221;, &#8220;&#8221;, ShowCommands.SW_NORMAL);</p>
<p>What is happening here is ShellExecute Win32 API call is reading the registry entry at  HKEY_CLASSES_ROOT\HTTP\shell\open\command. If you would like to delve under the hood on what is happening in the registry try <a href="http://www.microsoft.com/technet/sysinternals/utilities/Regmon.mspx">Regmon</a>. We can make this code more robust by checking  whether the entry  at that registry location is empty and ask the user to set the default browser in the registry which is pretty easy to do.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/explore.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/explore.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/explore.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/explore.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/explore.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/explore.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/explore.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/explore.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/explore.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/explore.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/explore.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/explore.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/explore.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/explore.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/explore.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/explore.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=13&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://explore.wordpress.com/2006/12/21/detecting-the-default-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d981159e8685c876f73611d9ff05175?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vasudevan</media:title>
		</media:content>
	</item>
		<item>
		<title>The power of IHttpModule&#8230;</title>
		<link>http://explore.wordpress.com/2006/12/13/the-power-of-ihttpmodule/</link>
		<comments>http://explore.wordpress.com/2006/12/13/the-power-of-ihttpmodule/#comments</comments>
		<pubDate>Wed, 13 Dec 2006 01:49:19 +0000</pubDate>
		<dc:creator>vasudevan</dc:creator>
				<category><![CDATA[Microsoft.NET]]></category>

		<guid isPermaLink="false">http://explore.wordpress.com/2006/12/13/the-power-of-ihttpmodule/</guid>
		<description><![CDATA[I have been reading Marco Bellinaso&#8217;s ASP.NET 2.0 Website Programming Problem &#8211; Design &#8211; Solution. To begin with, the topic that I was interested in was the selectable theme technique explained in Chapter 2 (pages 38 &#8211; 41). I thought about his approach and I should admit that the idea was very good, but I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=12&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been reading <a href="http://www.amazon.com/ASP-NET-2-0-Website-Programming-Programmer/dp/0764584642/sr=11-1/qid=1165972348/ref=sr_11_1/104-8256266-2810337">Marco Bellinaso&#8217;s ASP.NET 2.0 Website Programming Problem &#8211; Design &#8211; Solution</a>. To begin with, the topic that I was interested in was the selectable theme technique explained in Chapter 2 (pages 38 &#8211; 41). I thought about his approach and I should admit that the idea was very good, but I was still not convinced and decided to code it using a more efficient approach using IHttpModule. IHttpModule is powerful and efficient enough and this is how I achieved the same functionality:</p>
<p>1. In my approach, there is no need for the ThemeSelector user control. I added the DropDownlist control in the Master page itself. Everybody knows that there is no Page_PreInit() event for Master pages. But, to set a user selectable theme at runtime, Page_PreInit() is the only event that is pluggable for theme selection.<br />
2. On the Page_Load of the master page, code as shown in page 38.<br />
3. On page 39 of his book, there is a bug in the GetThemes() method that returns themes string array. The variable themes is unreachable. So, modify your code to fix that.<br />
4. Create a new regular folder under App_Code by name Modules.<br />
5. Create a new class and name it ThemeModule.cs and copy the following code by overwriting all of the code in your class:</p>
<p><code><br />
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
using System.Web.Configuration;</code><br />
<code>public class ThemeModule : IHttpModule<br />
{<br />
public void Init(HttpApplication application)<br />
{<br />
application.PreRequestHandlerExecute +=new EventHandler(application_PreRequestHandlerExecute);<br />
}</code><br />
<code>public void Dispose()<br />
{</code>}<br />
<code><br />
private void application_PreRequestHandlerExecute(object sender, EventArgs e)<br />
{<br />
Page page = HttpContext.Current.CurrentHandler as Page;<br />
if (page != null)<br />
{<br />
page.EnableTheming = true;<br />
page.PreInit +=new EventHandler(page_PreInit);<br />
}<br />
}</code><code>public void page_PreInit(object sender, EventArgs e)<br />
{<br />
Page page = (Page)sender;<br />
if (page != null)<br />
{<br />
if (HttpContext.Current.Request.Form["__EVENTTARGET"] == "ctl00$ddlThemes")<br />
{<br />
page.Theme = (string)HttpContext.Current.Request.Form["ctl00$ddlThemes"];<br />
HttpContext.Current.Session["CurrentTheme"] = page.Theme;<br />
}<br />
else<br />
{<br />
if (HttpContext.Current.Session["CurrentTheme"] != null)<br />
{<br />
page.Theme = (string)HttpContext.Current.Session["CurrentTheme"];<br />
}<br />
else<br />
{<br />
PagesSection pagesSection = (PagesSection)ConfigurationManager.GetSection("system.web/pages");<br />
page.Theme = pagesSection.Theme;<br />
HttpContext.Current.Session["CurrentTheme"] = page.Theme;<br />
}<br />
}<br />
}<br />
}<br />
}<br />
</code><br />
All the code does is to check whether the page is requested for the first time. If it is, it reads web.config for the pages section and gets the theme entry and stores the value in a session variable. If the same user requests the same page or some other page, the theme will be loaded from the session. Lastly, if the same user selects a different theme from the dropdownlist, the code checks for postback information by reading the __EVENTTARGET and reading the value of the control&#8217;s unique id (ctl00$ddlThemes) and rewrites the session variable.</p>
<p>This code is definitely more efficient than coding a base page that derives from the System.Web.UI.Page and having to change it for every new page you create. Also, this approach is completely transparent and there is nothing that the other developer should do to use this.</p>
<p>Btw, don&#8217;t forget to configure your web.config like this:</p>
<p><font color="#0000ff" size="2">&lt;</font><font color="#800000" size="2">httpModules</font><font color="#0000ff" size="2">&gt;</font><font color="#0000ff" size="2">&lt;<font color="#800000" size="2">add</font><font color="#0000ff" size="2"> </font><font color="#ff0000" size="2">name</font><font color="#0000ff" size="2"> =</font><font size="2">&#8220;</font><font color="#0000ff" size="2">ThemeModule</font><font size="2">&#8220;</font><font color="#0000ff" size="2"> </font><font color="#ff0000" size="2">type</font><font color="#0000ff" size="2">=</font><font size="2">&#8220;</font><font color="#0000ff" size="2">ThemeModule</font><font size="2">&#8220;</font><font color="#0000ff" size="2">/&gt;&lt;/</font></font></p>
<p><font color="#800000" size="2">httpModules</font><font color="#0000ff" size="2">&gt;</font><font color="#0000ff" size="2">&lt;<font color="#800000" size="2">pages</font><font color="#0000ff" size="2"> </font><font color="#ff0000" size="2">theme</font><font color="#0000ff" size="2">=</font><font size="2">&#8220;</font><font color="#0000ff" size="2">TemplateMonster</font><font size="2">&#8220;</font><font color="#0000ff" size="2"> </font><font color="#ff0000" size="2">masterPageFile</font><font color="#0000ff" size="2">=</font><font size="2">&#8220;</font><font color="#0000ff" size="2">~/Template.master</font><font size="2">&#8220;</font><font color="#0000ff" size="2"> /&gt;</font></font></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/explore.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/explore.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/explore.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/explore.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/explore.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/explore.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/explore.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/explore.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/explore.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/explore.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/explore.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/explore.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/explore.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/explore.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/explore.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/explore.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=explore.wordpress.com&amp;blog=182249&amp;post=12&amp;subd=explore&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://explore.wordpress.com/2006/12/13/the-power-of-ihttpmodule/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d981159e8685c876f73611d9ff05175?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vasudevan</media:title>
		</media:content>
	</item>
	</channel>
</rss>
