<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>techencoder</title>
	<atom:link href="http://techencoder.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://techencoder.com</link>
	<description>Technical ideas in a human readable format</description>
	<lastBuildDate>Tue, 09 Mar 2010 03:02:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>		<item>
		<title>Just for Fun</title>
		<link>http://techencoder.com/index.php/2010/03/just-for-fun/</link>
		<comments>http://techencoder.com/index.php/2010/03/just-for-fun/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 03:02:53 +0000</pubDate>
		<dc:creator>r.claypool</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techencoder.com/?p=882</guid>
		<description><![CDATA[My name:

Create your bar code at http://www.barcoding.com/upc/
]]></description>
			<content:encoded><![CDATA[<p>My name:</p>
<p><img class="aligncenter size-full wp-image-883" title="robert-claypool-barcode" src="http://techencoder.com/wp-content/uploads/2009/10/robert-claypool-barcode.png" alt="robert-claypool-barcode" width="600" height="73" /></p>
<p>Create your bar code at <a title="bar code generator" href="http://www.barcoding.com/upc/">http://www.barcoding.com/upc/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techencoder.com/index.php/2010/03/just-for-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>T-SQL: Cannot drop the index because it does not exist or you do not have permission.</title>
		<link>http://techencoder.com/index.php/2010/02/tsql-cannot-drop-theindex/</link>
		<comments>http://techencoder.com/index.php/2010/02/tsql-cannot-drop-theindex/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 12:20:43 +0000</pubDate>
		<dc:creator>r.claypool</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[quick tip]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://techencoder.com/?p=1085</guid>
		<description><![CDATA[
Quick tip:&#160;&#160; The table name and index name are required to drop an index, otherwise SQL Server will return an error.
e.g.

DROP INDEX &#91;dbo&#93;.&#91;IX_MyIndex&#93;

 fails with &#8230;

Msg 3701, Level 11, State 6, Line XX
Cannot drop the index 'dbo.IX_MyIndex', 
because it does not exist or you do not have permission.

However,

DROP INDEX &#91;dbo&#93;.&#91;MyTable&#93;.&#91;IX_MyIndex&#93;

 will work fine if it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://techencoder.com/wp-content/uploads/2010/02/database.jpg"><img src="http://techencoder.com/wp-content/uploads/2010/02/database.jpg" alt="database" title="database" width="600" height="153" class="aligncenter size-full wp-image-1123" /></a></p>
<p><strong>Quick tip:</strong>&nbsp;&nbsp; The table name <em>and</em> index name are required to drop an index, otherwise SQL Server will return an error.</p>
<p>e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="tsql tsql" style="font-family:monospace;"><span style="color: #0000FF;">DROP</span> <span style="color: #0000FF;">INDEX</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>IX_MyIndex<span style="color: #808080;">&#93;</span></pre></div></div>

<p> fails with &#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="text text" style="font-family:monospace;">Msg 3701, Level 11, State 6, Line XX
Cannot drop the index 'dbo.IX_MyIndex', 
because it does not exist or you do not have permission.</pre></div></div>

<p>However,</p>

<div class="wp_syntax"><div class="code"><pre class="tsql tsql" style="font-family:monospace;"><span style="color: #0000FF;">DROP</span> <span style="color: #0000FF;">INDEX</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>MyTable<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>IX_MyIndex<span style="color: #808080;">&#93;</span></pre></div></div>

<p> will work fine if it exists and you have sufficient permissions.   (Use <code>Select user_name()</code> to determine your user context, which will help to verify the permissions being used.)</p>
]]></content:encoded>
			<wfw:commentRss>http://techencoder.com/index.php/2010/02/tsql-cannot-drop-theindex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intellisense for NAnt Build Files (VS 2005 and 2008)</title>
		<link>http://techencoder.com/index.php/2010/01/vs-intellisense-for-nant/</link>
		<comments>http://techencoder.com/index.php/2010/01/vs-intellisense-for-nant/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 05:05:06 +0000</pubDate>
		<dc:creator>r.claypool</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[NAnt]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://techencoder.com/?p=1050</guid>
		<description><![CDATA[
Step 1. Make VS recognize a .build file as an XML file.


Right-click a .build file in the &#8220;Solution Explorer&#8221; and select &#8220;Open With &#8230;&#8221;
In the &#8220;Open With&#8221; dialog, select &#8220;XML Editor&#8221; and &#8220;Set as Default&#8221;


Step 2: Enable intellisense for .build files.
Get the schema file for NAnt:

Version 0.86 Beta 1 is at http://nant.sf.net/release/0.86-beta1/nant.xsd
Version 0.85 is at http://nant.sf.net/release/0.85/nant.xsd

Copy [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://techencoder.com/wp-content/uploads/2010/01/nant.jpg" alt="nant" title="nant" width="600" height="106" class="aligncenter size-full wp-image-1100" /></p>
<h4>Step 1. Make VS recognize a .build file as an XML file.</h4>
<div>
<ol>
<li>Right-click a .build file in the &#8220;Solution Explorer&#8221; and select &#8220;Open With &#8230;&#8221;</li>
<li>In the &#8220;Open With&#8221; dialog, select &#8220;XML Editor&#8221; and &#8220;Set as Default&#8221;</li>
</ol>
<p><img class="aligncenter size-full wp-image-1053" title="vs-2005-2008-open-with-dialog" src="http://techencoder.com/wp-content/uploads/2010/01/vs-2005-2008-open-with-dialog.png" alt="vs-2005-2008-open-with-dialog" width="600" height="244" /></div>
<h4>Step 2: Enable intellisense for .build files.</h4>
<p>Get the schema file for NAnt:</p>
<ul>
<li>Version 0.86 Beta 1 is at <a title="XSD Schema for NAnt" href="http://nant.sf.net/release/0.86-beta1/nant.xsd" target="_blank">http://nant.sf.net/release/0.86-beta1/nant.xsd</a></li>
<li>Version 0.85 is at <a title="XSD Schema for NAnt" href="http://nant.sf.net/release/0.86-beta1/nant.xsd" target="_blank">http://nant.sf.net/release/0.85/nant.xsd</a></li>
</ul>
<p>Copy it to the &#8220;<em>xml\Schemas</em>&#8221; subdirectory of your VS installation:</p>
<div>
<ul>
<li>Note that you can check this path via <em>Tools &gt; Options &gt; Text Editor &gt; XML &gt; Miscellaneous</em></li>
</ul>
<p><img class="aligncenter size-full wp-image-1066" title="schema-location-option" src="http://techencoder.com/wp-content/uploads/2010/01/schema-location-option.png" alt="schema-location-option" width="600" height="347" /></div>
<div>Specify the schema to use within Visual Studio:</div>
<div>
<ul>
<li>Open the file so that it appears in a Visual Studio editor window.</li>
<li>Click the file&#8217;s editor window (to activate it) and specify the schema to use (within the &#8220;Properties&#8221; window).<br />
<img class="aligncenter size-full wp-image-1057" title="change-schema-properties" src="http://techencoder.com/wp-content/uploads/2010/01/change-schema-properties.png" alt="change-schema-properties" width="600" height="148" /></li>
</ul>
<ul>
<li>Note that this dialog has changed from VS 2005 to 2008:</li>
</ul>
<p style="text-align: center;"><img class="size-full wp-image-1058" title="xsd-schemas-vs-2005" src="http://techencoder.com/wp-content/uploads/2010/01/xsd-schemas-vs-2005.png" alt="Visual Studio 2005" width="600" height="231" /><br />
(VS 2005)</p>
<p><img class="size-full wp-image-1059" title="xsd-schemas-vs-2008" src="http://techencoder.com/wp-content/uploads/2010/01/xsd-schemas-vs-2008.png" alt="Visual Studio 2008" width="600" height="235" /><br />
(VS 2008)</p>
<p>If all of that is not enough,  make sure to <strong>enter an xmlns and make sure it is equal to the xmlns specified in the XSD schema</strong>. </p>
<p>
!!!!! Even though the schema is available at <a title="NANT XML Schema" href="http://nant.sourceforge.net/release/0.86-beta1/nant.xsd" target="_blank">http://nant.sf.net/release/0.86-beta1/nant.xsd</a> and <a title="NANT XML Schema" href="http://nant.sourceforge.net/release/0.86-beta1/nant.xsd" target="_blank">http://nant.sourceforge.net/release/0.86-beta1/nant.xsd</a>, you must reference the former url in your build file because it is the one referenced in nant.xsd. !!!!!</p>
<p>Here is an example of what I mean:</p>

<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://nant.sf.net/release/0.86-beta1/nant.xsd&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;MyProject&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #808080; font-style: italic;">&lt;!-- stuff here --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Hope that helps someone.  Happy Programming!</p></div>
<hr/>
<div xmlns:cc="http://creativecommons.org/ns#" about="http://www.flickr.com/photos/kubina/521327318/">
Attribution: The <a href='http://www.flickr.com/photos/kubina/521327318/'>ant photo</a> in this post is used with permission (<a rel="license" href="http://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA 2.0</a>) by <a rel="cc:attributionURL" href="http://www.flickr.com/photos/kubina/">Jeff Kubina</a></div>
]]></content:encoded>
			<wfw:commentRss>http://techencoder.com/index.php/2010/01/vs-intellisense-for-nant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting DataTables to work with ASP.Net MVC</title>
		<link>http://techencoder.com/index.php/2009/12/getting-datatables-to-work-with-asp-net-mvc/</link>
		<comments>http://techencoder.com/index.php/2009/12/getting-datatables-to-work-with-asp-net-mvc/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 07:13:12 +0000</pubDate>
		<dc:creator>r.claypool</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[ASP.Net MVC]]></category>
		<category><![CDATA[DataTables]]></category>

		<guid isPermaLink="false">http://techencoder.com/?p=1041</guid>
		<description><![CDATA[Want to get jQuery DataTables to work in an ASP.Net MVC project ???
Here is a demo project in C# that should get you started.  If I find the time, I&#8217;ll post details on how this was put together (but I think most developers will benefit more from running and stepping through the source code anyway).
Hope [...]]]></description>
			<content:encoded><![CDATA[<p>Want to get jQuery <a href="http://www.datatables.net/">DataTables</a> to work in an ASP.Net MVC project ???</p>
<p>Here is a <a href="http://techencoder.com/wp-content/uploads/2009/12/ASP.Net-MVC-and-DataTables-Demo.zip">demo project</a> in C# that should get you started.  If I find the time, I&#8217;ll post details on how this was put together (but I think most developers will benefit more from running and stepping through the source code anyway).</p>
<p>Hope this helps someone.  Happy Programming!</p>
]]></content:encoded>
			<wfw:commentRss>http://techencoder.com/index.php/2009/12/getting-datatables-to-work-with-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Viewing the Activity Log for VS 2010</title>
		<link>http://techencoder.com/index.php/2009/11/vs2010-activity-log/</link>
		<comments>http://techencoder.com/index.php/2009/11/vs2010-activity-log/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 20:41:07 +0000</pubDate>
		<dc:creator>r.claypool</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[VS2010]]></category>

		<guid isPermaLink="false">http://techencoder.com/?p=918</guid>
		<description><![CDATA[Are you repeatedly getting a less than helpful error dialog in Visual Studio 2010?
Go to the command line and run devenv.exe with logging, reproduce the error in the IDE and then open ActivityLog.xml:


C:\&#62;cd &#34;C:\Program Files &#40;x86&#41;\Microsoft Visual Studio 10.0\Common7\IDE&#34;
C:\Program Files &#40;x86&#41;\Microsoft Visual Studio 10.0\Common7\IDE&#62;devenv /Log
C:\Program Files &#40;x86&#41;\Microsoft Visual Studio 10.0\Common7\IDE&#62;cd %APPDATA%
C:\Documents and Settings\username\Application Data&#62;cd &#34;Microsoft\VisualStudio\10.0&#34;
C:\Documents [...]]]></description>
			<content:encoded><![CDATA[<p>Are you repeatedly getting a less than helpful error dialog in Visual Studio 2010?</p>
<p>Go to the command line and run <a title="devenv.exe logging" href="http://msdn.microsoft.com/en-us/library/ms241272(VS.100,lightweight).aspx">devenv.exe with logging</a>, reproduce the error in the IDE and then open ActivityLog.xml:</p>
<p><img class="aligncenter size-full wp-image-919" title="devenv" src="http://techencoder.com/wp-content/uploads/2009/10/devenv.png" alt="devenv" width="600" height="174" /></p>

<div class="wp_syntax"><div class="code"><pre class="dos dos" style="font-family:monospace;">C:\&gt;cd &quot;C:\Program Files <span style="color: #66cc66;">&#40;</span>x86<span style="color: #66cc66;">&#41;</span>\Microsoft Visual Studio <span style="color: #cc66cc;">10.0</span>\Common7\IDE&quot;
C:\Program Files <span style="color: #66cc66;">&#40;</span>x86<span style="color: #66cc66;">&#41;</span>\Microsoft Visual Studio <span style="color: #cc66cc;">10.0</span>\Common7\IDE&gt;devenv /Log
C:\Program Files <span style="color: #66cc66;">&#40;</span>x86<span style="color: #66cc66;">&#41;</span>\Microsoft Visual Studio <span style="color: #cc66cc;">10.0</span>\Common7\IDE&gt;cd <span style="color: #33cc33;">%</span><span style="color: #448888;">APPDATA</span><span style="color: #33cc33;">%</span>
C:\Documents and Settings\username\Application Data&gt;cd &quot;Microsoft\VisualStudio\<span style="color: #cc66cc;">10.0</span>&quot;
C:\Documents and Settings\username\Application Data\Microsoft\VisualStudio\<span style="color: #cc66cc;">10.0</span>&gt;dir ActivityLog.xml /B ActivityLog.xml
C:\Documents and Settings\username\Application Data\Microsoft\VisualStudio\<span style="color: #cc66cc;">10.0</span>&gt;notepad ActivityLog.xml</pre></div></div>

<p>Look for entries with type=Error, e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;entry&gt;
&lt;record&gt;263&lt;/record&gt;
&lt;time&gt;2009/10/24 22:50:09.218&lt;/time&gt;
&lt;type&gt;Error&lt;/type&gt;
&lt;source&gt;Editor or Editor Extension&lt;/source&gt;
&lt;description&gt;System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.Editor.Implementation.VsFontsAndColorsInformation.GetEditorFontForItem(IVsColorTable colorTable, Int32 itemIndex, FONTCOLORPREFERENCES2 fontColorPreferences)
at Microsoft.VisualStudio.Editor.Implementation.VsFontsAndColorsInformation.TryGetItemValue(String itemKey, ResourceDictionary&amp; itemValue)
at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.CreateResourceDictionaryFromProvision(String key)
at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.GetProperties(String key)
at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.GetDefaultProperties()
at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap..ctor(ICollection`1 formats, IClassificationTypeRegistryService classificationTypeRegistry, IEditorFormatMap formatMap)
at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMapService.GetClassificationFormatMap(String category)
at Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap.AttachToFormatMaps()
at Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap..ctor(IClassificationFormatMapService classificationFormatMapService, IEditorFormatMapService editorFormatMapService, ITextView textView)
at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMapService.&lt;&gt;c__DisplayClass1.&lt;GetEditorFormatMap&gt;b__0()
at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator)
at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMapService.GetEditorFormatMap(ITextView textView)
at Microsoft.VisualStudio.Text.Editor.Implementation.OutliningAdornmentManagerFactory.CreateTagger[T](ITextView textView, ITextBuffer buffer)
at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)&lt;/description&gt;
&lt;/entry&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://techencoder.com/index.php/2009/11/vs2010-activity-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Castle Windsor 2.0 in ASP.Net MVC 1.0</title>
		<link>http://techencoder.com/index.php/2009/10/castle-windsor-and-aspnet-mvc/</link>
		<comments>http://techencoder.com/index.php/2009/10/castle-windsor-and-aspnet-mvc/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 05:26:33 +0000</pubDate>
		<dc:creator>r.claypool</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP.Net MVC]]></category>
		<category><![CDATA[Dependency Injection]]></category>
		<category><![CDATA[IoC]]></category>
		<category><![CDATA[Windsor]]></category>

		<guid isPermaLink="false">http://techencoder.com/?p=670</guid>
		<description><![CDATA[Consider yourself warned:  I&#8217;m just getting started with ASP.Net MVC, Dependency Injection (DI) and Inversion of Control (IoC), so this post is more for my benefit than yours.

ASP.Net MVC 1.0
ASP.Net MVC 1.0 was released in March 2009. Read this tutorial to start learning it. Note that ASP.Net MVC is bin deployable which is very nice [...]]]></description>
			<content:encoded><![CDATA[<p>Consider yourself warned:  I&#8217;m just getting started with ASP.Net MVC, Dependency Injection (DI) and Inversion of Control (IoC), so this post is <a title="Why blog? The best way to learn something is to teach it." href="http://stackoverflow.com/questions/745570/how-can-social-networking-sites-make-you-a-better-developer/745703#745703">more for my benefit than yours</a>.</p>
<p><img class="aligncenter size-full wp-image-698" title="warning-castle-windsor" src="http://techencoder.com/wp-content/uploads/2009/06/warning-castle-windsor.jpg" alt="warning-castle-windsor" width="600" height="158" /></p>
<h3>ASP.Net MVC 1.0</h3>
<p><a title="Download ASP.Net MVC" href="http://msdn.microsoft.com/en-us/library/dd394709.aspx">ASP.Net MVC 1.0</a> was released in March 2009. Read <a title="ASP.Net MVC Tutorial" href="http://weblogs.asp.net/scottgu/archive/2009/04/28/free-asp-net-mvc-nerddinner-tutorial-now-in-html.aspx">this tutorial</a> to start learning it. Note that ASP.Net MVC is <a title="bin deploy ASP.Net MVC" href="http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx">bin deployable</a> which is very nice if you don&#8217;t want to install anything on the production web server.</p>
<h3>Inversion of Control and Castle Windsor</h3>
<p>Castle Windsor 2.0 was just released this Summer after <a title="Castle Windsor 2.0 RTM Released" href="http://ayende.com/Blog/archive/2009/05/05/castle-windsor-2.0-rtm-released.aspx">a very long development period</a>.  To start using it, <a href="http://www.castleproject.org/castle/download.html">go get the dlls</a> and reference them in your project.</p>
<p>If you are completely new to the IoC pattern, go <a href="http://msdn.microsoft.com/en-us/magazine/cc337885.aspx">read James Kovacs&#8217; article</a> and <a title="DimeCasts: Castle Windsor series" href="http://www.dimecasts.net/Casts/ByTag/Windsor%20Castle">watch these videos</a>.  They will get a typical .Net programmer up to speed pretty fast.  You should also go to <a href="http://martinfowler.com/articles/injection.html">the canonical source for IoC</a>, but frankly I learned more from the other links and I think you will too.</p>
<p>To learn how to configure the Windsor container in your project, <a title="Castle Windsor Documentation" href="http://www.castleproject.org/container/documentation/trunk/index.html">read the project&#8217;s documentation</a> and continue with this article for an example in ASP.Net MVC.</p>
<h3>Putting them Together</h3>
<p><img class="aligncenter size-full wp-image-696" title="castle-plus-aspnet-mvc" src="http://techencoder.com/wp-content/uploads/2009/06/castle-plus-aspnet-mvc.png" alt="castle-plus-aspnet-mvc" width="600" height="64" /></p>
<p>Getting Windsor to work in an ASP.Net MVC application is easy if you know what to do.  Most things are that way, huh?</p>
<p>For a bare bones integration, just follow these steps:</p>
<ol>
<li>Install ASP.NET MVC 1.0.  The <a title="Microsoft Web Platform Installer" href="http://www.microsoft.com/web/Downloads/platform.aspx">Web Platform Installer</a> is great for this and a ton of other projects.  Try it.  You&#8217;ll be glad you did.</li>
<li>Open VS 2008,  go to File-&gt;New-&gt;Project&#8230; and select the &#8220;<em>ASP.NET MVC Web Application</em>&#8221; project template.</li>
<li>Select &#8220;No&#8221; on the proceeding dialog.  Do not create a unit test project.</li>
<li><a title="Castle Windsor download page" href="http://www.castleproject.org/castle/download.html">Download</a> Castle Windsor 2.0</li>
<li>Copy the dlls (<em>Castle.DynamicProxy2, Castle.MicroKernel, Castle.Windsor and Castle.Core</em>) to your solution&#8217;s folder or a sub folder.</li>
<li>Add them as references to the web project. (Right-click the &#8220;References&#8221; folder, select &#8220;Add Reference&#8230;&#8221;, select the &#8220;Browse&#8221; tab and navigate to the dlls to add them.)</li>
<li>Add a new XML file to the web project.  Name it &#8220;windsor.config&#8221; and enter the following:</li>

<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #808080; font-style: italic;">&lt;!--Note: Since this is a web application, all components must have a lifesytle of 'transient' or 'preWebRequest' --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;components<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #808080; font-style: italic;">&lt;!--This is where we could declaratively add components to the Windsor container if we wanted to.--&gt;</span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/components<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<li>Create an interface IMessageHolder and a class MessageHolder.  (We will use this code to illustrate injecting an instance of MessageHolder into the HomeController.)</li>

<div class="wp_syntax"><div class="code"><pre class="csharp csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">interface</span> IMessageHolder
<span style="color: #000000;">&#123;</span>
	<span style="color: #FF0000;">string</span> GetMessage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> MessageHolder <span style="color: #008000;">:</span> IMessageHolder
<span style="color: #000000;">&#123;</span>
	<span style="color: #008080;">#region IMessageHolder Members</span>
&nbsp;
	<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> GetMessage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0600FF;">return</span> <span style="color: #666666;">&quot;Welcome to ASP.NET MVC using Castle Windsor 2.0!&quot;</span>;
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #008080;">#endregion</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<li>Create a controller factory for Windsor:</li>

<div class="wp_syntax"><div class="code"><pre class="csharp csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> WindsorControllerFactory <span style="color: #008000;">:</span> DefaultControllerFactory
<span style="color: #000000;">&#123;</span>
	<span style="color: #0600FF;">private</span> <span style="color: #0600FF;">readonly</span> IWindsorContainer _container;
&nbsp;
	<span style="color: #0600FF;">public</span> WindsorControllerFactory<span style="color: #000000;">&#40;</span>IWindsorContainer container<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		_container <span style="color: #008000;">=</span> container;
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">override</span> IController GetControllerInstance<span style="color: #000000;">&#40;</span>Type controllerType<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>controllerType <span style="color: #008000;">==</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #008080; font-style: italic;">// Force an exception message from the base class.</span>
			<span style="color: #008080; font-style: italic;">// This will be more informative than what we would get otherwise,</span>
			<span style="color: #008080; font-style: italic;">// see: http://stackoverflow.com/questions/719678/custom-controller-factory-dependency-injection-structuremap-problems-with-asp/721313#721313</span>
			<span style="color: #0600FF;">return</span> <span style="color: #0600FF;">base</span>.<span style="color: #0000FF;">GetControllerInstance</span><span style="color: #000000;">&#40;</span>controllerType<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
		<span style="color: #008080; font-style: italic;">// Exception here ????</span>
		<span style="color: #008080; font-style: italic;">// Check the windsor configuration.</span>
		<span style="color: #008080; font-style: italic;">// Make sure that Windsor can match the component to load.</span>
		<span style="color: #0600FF;">return</span> _container.<span style="color: #0000FF;">Resolve</span><span style="color: #000000;">&#40;</span>controllerType<span style="color: #000000;">&#41;</span> <span style="color: #0600FF;">as</span> IController;
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">override</span> <span style="color: #0600FF;">void</span> ReleaseController<span style="color: #000000;">&#40;</span>IController controller<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		_container.<span style="color: #0000FF;">Release</span><span style="color: #000000;">&#40;</span>controller<span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<li>Open Global.asax.cs and replace it with the following:</li>

<div class="wp_syntax"><div class="code"><pre class="csharp csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> MvcApplication <span style="color: #008000;">:</span> HttpApplication
<span style="color: #000000;">&#123;</span>
	<span style="color: #008080; font-style: italic;">/// &lt;remarks&gt;</span>
	<span style="color: #008080; font-style: italic;">/// This has to be static, because more than one instance</span>
	<span style="color: #008080; font-style: italic;">/// of the HttpApplication can potentially be created.</span>
	<span style="color: #008080; font-style: italic;">/// &lt;/remarks&gt;</span>
	<span style="color: #0600FF;">private</span> <span style="color: #0600FF;">static</span> IWindsorContainer _container;
&nbsp;
	<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> RegisterRoutes<span style="color: #000000;">&#40;</span>RouteCollection routes<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		routes.<span style="color: #0000FF;">IgnoreRoute</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;{resource}.axd/{*pathInfo}&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
		routes.<span style="color: #0000FF;">MapRoute</span><span style="color: #000000;">&#40;</span>
			<span style="color: #666666;">&quot;Default&quot;</span>, <span style="color: #008080; font-style: italic;">// Route name</span>
			<span style="color: #666666;">&quot;{controller}/{action}/{id}&quot;</span>, <span style="color: #008080; font-style: italic;">// URL with parameters</span>
			<span style="color: #008000;">new</span> <span style="color: #000000;">&#123;</span>controller <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Home&quot;</span>, action <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Index&quot;</span>, id <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #000000;">&#125;</span> <span style="color: #008080; font-style: italic;">// Parameter defaults</span>
			<span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> Application_Start<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		RegisterRoutes<span style="color: #000000;">&#40;</span>RouteTable.<span style="color: #0000FF;">Routes</span><span style="color: #000000;">&#41;</span>;
		InitializeWindsor<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
		<span style="color: #008080; font-style: italic;">// Setup the MVC framework to use our Windsor controller factory.</span>
		ControllerBuilder.<span style="color: #0000FF;">Current</span>.<span style="color: #0000FF;">SetControllerFactory</span><span style="color: #000000;">&#40;</span><span style="color: #008000;">new</span> WindsorControllerFactory<span style="color: #000000;">&#40;</span>_container<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">virtual</span> <span style="color: #0600FF;">void</span> InitializeWindsor<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>_container <span style="color: #008000;">==</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			_container <span style="color: #008000;">=</span> Build<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;windsor.config&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> IWindsorContainer Build<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> configPath<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		var resource <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> FileResource<span style="color: #000000;">&#40;</span>configPath<span style="color: #000000;">&#41;</span>;
		var interperter <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> XmlInterpreter<span style="color: #000000;">&#40;</span>resource<span style="color: #000000;">&#41;</span>;
		var container <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> WindsorContainer<span style="color: #000000;">&#40;</span>interperter<span style="color: #000000;">&#41;</span>;
&nbsp;
		<span style="color: #008080; font-style: italic;">// Register controllers</span>
		container.<span style="color: #0000FF;">Register</span><span style="color: #000000;">&#40;</span>AllTypes
					   .<span style="color: #0000FF;">Of</span><span style="color: #008000;">&lt;</span>Controller<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
					   .<span style="color: #0000FF;">FromAssembly</span><span style="color: #000000;">&#40;</span>Assembly.<span style="color: #0000FF;">GetExecutingAssembly</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #008080; font-style: italic;">/* Modify the name with which the component is registered
		See: http://blog.andreloker.de/post/2009/03/28/ASPNET-MVC-with-Windsor-programmatic-controller-registration.aspx */</span>
					   .<span style="color: #0000FF;">Configure</span><span style="color: #000000;">&#40;</span>c <span style="color: #008000;">=&gt;</span> c.<span style="color: #0000FF;">LifeStyle</span>.<span style="color: #0000FF;">Transient</span>.<span style="color: #0000FF;">Named</span><span style="color: #000000;">&#40;</span>c.<span style="color: #0000FF;">Implementation</span>.<span style="color: #0000FF;">Name</span>.<span style="color: #0000FF;">ToLower</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
		<span style="color: #008080; font-style: italic;">// Register all other types.</span>
		container.<span style="color: #0000FF;">Register</span><span style="color: #000000;">&#40;</span>
			Component.<span style="color: #0600FF;">For</span><span style="color: #008000;">&lt;</span>IMessageHolder<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">ImplementedBy</span><span style="color: #008000;">&lt;</span>MessageHolder<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">LifeStyle</span>.<span style="color: #0000FF;">Transient</span><span style="color: #000000;">&#41;</span>;
&nbsp;
		<span style="color: #0600FF;">return</span> container;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<li>Add a constructor to the HomeController and give it an IMessageHolder parameter.</li>

<div class="wp_syntax"><div class="code"><pre class="csharp csharp" style="font-family:monospace;">    <span style="color: #000000;">&#91;</span>HandleError<span style="color: #000000;">&#93;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> HomeController <span style="color: #008000;">:</span> Controller
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">readonly</span> IMessageHolder _holder;
&nbsp;
        <span style="color: #0600FF;">public</span> HomeController<span style="color: #000000;">&#40;</span>IMessageHolder holder<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            _holder <span style="color: #008000;">=</span> holder;
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF;">public</span> ActionResult Index<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            ViewData<span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;Message&quot;</span><span style="color: #000000;">&#93;</span> <span style="color: #008000;">=</span> _holder.<span style="color: #0000FF;">GetMessage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
            <span style="color: #0600FF;">return</span> View<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF;">public</span> ActionResult About<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            <span style="color: #0600FF;">return</span> View<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span></pre></div></div>

<p>
Since IMessageHolder is registered with Windsor, the container will resolve IMessageHolder to an instance of MessageHolder at run-time.  This is called <a href="http://en.wikipedia.org/wiki/Dependency_injection">dependency injection</a> because the HomeController dependency is injected through the constructor.  Of course, you could do this without an IoC container such as Windsor, but in larger (real world) applications the container will greatly simplify the process of managing dependencies, which means you have a better chance of keeping things <a href="http://en.wikipedia.org/wiki/Loose_coupling">loosely coupled</a> and falling into <a href="http://www.codinghorror.com/blog/archives/000940.html">the pit of success</a>.
</p>
<p>
Notice also that we display the message in Index() to verify that the Windsor container is giving us a valid instance of the type registered for IMessageHolder.  This is just a simple way to see the result of what occurred.
</p>
<li>Run the application and you should see the message on the home page.  Click <a href='http://techencoder.com/wp-content/uploads/2009/10/mvcwebapplication1.zip'>here</a> to download the sample project.</li>
<p><img src="http://techencoder.com/wp-content/uploads/2009/10/aspnet-and-windsor-integration.png" alt="aspnet-and-windsor-integration" title="aspnet-and-windsor-integration" width="600" height="404" class="aligncenter size-full wp-image-956" />
</ol>
<p>
<a href='http://techencoder.com/wp-content/uploads/2009/10/mvcwebapplication1.zip'>Project Source Code</a> for this post.
</p>
<p>I hope that this walk-through helps someone get started with Windsor.  It really is an incredible project to learn and if used correctly it will make your programs much better.  Have fun with it and Happy Programming!</p>
]]></content:encoded>
			<wfw:commentRss>http://techencoder.com/index.php/2009/10/castle-windsor-and-aspnet-mvc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Batch file error: ∩╗┐is not recognized</title>
		<link>http://techencoder.com/index.php/2009/10/batch-file-formatting/</link>
		<comments>http://techencoder.com/index.php/2009/10/batch-file-formatting/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 13:15:47 +0000</pubDate>
		<dc:creator>r.claypool</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ANSI]]></category>
		<category><![CDATA[Batch Files]]></category>
		<category><![CDATA[quick tip]]></category>
		<category><![CDATA[UTF-8]]></category>

		<guid isPermaLink="false">http://techencoder.com/?p=903</guid>
		<description><![CDATA[Is your batch file reporting an error like this?
Open the file in Notepad++, select &#8216;Format -&#62; Encode in ANSI&#8217; and save.

Hope that helps someone.  Happy Programming!
]]></description>
			<content:encoded><![CDATA[<p>Is your batch file reporting an error like this?</p>
<div id="attachment_905" class="wp-caption aligncenter" style="width: 610px"><img class="size-full wp-image-905" title="cmd-prompt-error" src="http://techencoder.com/wp-content/uploads/2009/10/cmd-prompt-error.png" alt="'n++ECHO' is not recognized as an internal or external command, operable program or batch file." width="600" height="180" /><p class="wp-caption-text">&#39;n++ECHO&#39; is not recognized as an internal or external command, operable program or batch file.</p></div>
<p>Open the file in <a title="Notepad ++ Home Page" href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a>, select &#8216;Format -&gt; Encode in ANSI&#8217; and save.</p>
<p><img class="aligncenter size-full wp-image-910" title="encode-file-in-ansi" src="http://techencoder.com/wp-content/uploads/2009/10/encode-file-in-ansi.png" alt="encode-file-in-ansi" width="600" height="300" /></p>
<p>Hope that helps someone.  Happy Programming!</p>
]]></content:encoded>
			<wfw:commentRss>http://techencoder.com/index.php/2009/10/batch-file-formatting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Terms and Conditions</title>
		<link>http://techencoder.com/index.php/2009/09/terms-and-conditions/</link>
		<comments>http://techencoder.com/index.php/2009/09/terms-and-conditions/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 03:13:49 +0000</pubDate>
		<dc:creator>r.claypool</dc:creator>
				<category><![CDATA[Legal]]></category>
		<category><![CDATA[creative commons]]></category>
		<category><![CDATA[licensing]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://techencoder.com/?p=863</guid>
		<description><![CDATA[The intent of this blog is to distribute valuable information and contribute to the technology and programming communities.  To that end, here&#8217;s how you may use and reuse what you find on this site:

Techencoder is licensed under CC 3.0.  That means you are free to copy, distribute, transmit and adapt my work on this site [...]]]></description>
			<content:encoded><![CDATA[<p>The intent of this blog is to distribute valuable information and contribute to the technology and programming communities.  To that end, here&#8217;s how you may use and reuse what you find on this site:</p>
<p><img class="aligncenter size-full wp-image-874" title="creativecommons_logo" src="http://techencoder.com/wp-content/uploads/2009/09/creativecommons_logo.png" alt="creativecommons_logo" width="600" height="77" /></p>
<p>Techencoder is licensed under <a title="Creative Commons 3.0 Attribution License" href="http://creativecommons.org/licenses/by/3.0/us/">CC 3.0</a>.  That means <em>you are free to copy, distribute, transmit and adapt my work on this site for commercial and non-commercial purposes</em> &#8211; as long as you attribute the work back to me.  A short notice including my name and a link to Techencoder will suffice.  An all expenses paid trip to <a title="Map of Tuscany, Italy" href="http://www.bing.com/maps/default.aspx?v=2&amp;FORM=LMLTCP&amp;cp=43.454913~10.986328&amp;style=r&amp;lvl=8&amp;tilt=-90&amp;dir=0&amp;alt=-1000&amp;phx=0&amp;phy=0&amp;phscl=1&amp;encType=1">Tuscany</a> &#8230; even better!</p>
<p>In addition, any source code posted to this site may be used according to terms of the <a title="MIT License" href="http://opensource.org/licenses/mit-license.php">MIT license</a> unless otherwise noted.   I avoid re-posting other people&#8217;s code without proper attribution and license info, but please be careful to distinguish what I claim as my own and what I do not.</p>
<p>If you have any doubt about the ownership or terms of anything on this site, contact me at the following address:</p>
<p><img class="aligncenter size-full wp-image-873" title="email_address" src="http://techencoder.com/wp-content/uploads/2009/09/email_address.png" alt="email_address" width="283" height="40" /></p>
]]></content:encoded>
			<wfw:commentRss>http://techencoder.com/index.php/2009/09/terms-and-conditions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMware Workstation: Cannot find a valid peer process</title>
		<link>http://techencoder.com/index.php/2009/07/vmware-cannot-find-a-valid-peer-process/</link>
		<comments>http://techencoder.com/index.php/2009/07/vmware-cannot-find-a-valid-peer-process/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 23:45:21 +0000</pubDate>
		<dc:creator>r.claypool</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://techencoder.com/?p=829</guid>
		<description><![CDATA[I am running VMware Workstation 6.1.5 (build-126130) on CentOS 5.3 (Final).
One of the guest machines was reporting an error when I tried to power on the most recent snapshot. Snapshots further back in the timeline powered on without any problem.
Apparently I&#8217;m not the only one with this problem.  Others have been reporting it since [...]]]></description>
			<content:encoded><![CDATA[<p>I am running <strong>VMware Workstation 6.1.5 (build-126130) on CentOS 5.3 (Final).</strong></p>
<p>One of the guest machines was reporting an error when I tried to power on the most recent snapshot. Snapshots further back in the timeline powered on without any problem.</p>
<div id="attachment_826" class="wp-caption aligncenter" style="width: 283px"><img class="size-full wp-image-826" title="screenshot1-vmware-651-build-126130" src="http://techencoder.com/wp-content/uploads/2009/06/screenshot1-vmware-651-build-126130.png" alt="Error: Unable to change virtual machine power state: Cannot find a valid peer process to connect to." width="273" height="196" /><p class="wp-caption-text">Error: Unable to change virtual machine power state: Cannot find a valid peer process to connect to.</p></div>
<p>Apparently <a title="Google search" rel="nofollow" href="http://www.google.com/#hl=en&amp;q=vmware%2Bcannot%2Bfind%2Ba%2Bvalid%2Bpeer%2Bprocess">I&#8217;m not the only one</a> with this problem.  Others have been reporting it since <a title="2005 forum post" rel="nofollow" href="http://forums.gentoo.org/viewtopic-t-381798-highlight-vmware%2Broot%2Bprocess.html">at least early 2005</a>.  The forums say to <strong>delete unused lock files</strong> and <strong>restart any hung VMware processes</strong> (or restart the host machine), which did not help.</p>
<p>Then I tried to clone the snapshot before making any more changes &#8211; just to have a backup &#8211; and that failed too!</p>
<div id="attachment_832" class="wp-caption aligncenter" style="width: 610px"><img class="size-full wp-image-832" title="screenshot3-resized-vmware-651-build-126130" src="http://techencoder.com/wp-content/uploads/2009/06/screenshot3-resized-vmware-651-build-126130.png" alt="Cloning failed: reached the host's limit for open files" width="600" height="471" /><p class="wp-caption-text">Cloning failed: reached the host&#39;s limit for open files</p></div>
<p>Thinking the two errors are related, I looked into how many files are actually part of this VM.  The list was HUGE. (more than 1500 files in the folder)</p>
<p><strong>I had <a rel="nofollow" href="../wp-content/uploads/2009/06/screenshot2-vmware-651-build-126130.png">13 snapshots</a> before the one giving me trouble, so I deleted a few of them to reduce the number of files VMWare would need to open.<br />
This fixed everything. </strong></p>
<p>I could have <a rel="nofollow" href="http://kbase.redhat.com/faq/docs/DOC-1293">increased the max number of allowable files</a>, but some of the snapshots were not needed any longer.  Your situation might be different, but this is a solution I couldn&#8217;t find anywhere else on the web.  Hope that helps someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://techencoder.com/index.php/2009/07/vmware-cannot-find-a-valid-peer-process/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Accelerating Future, Part 2.5</title>
		<link>http://techencoder.com/index.php/2009/07/accelerating-future-part-2point5/</link>
		<comments>http://techencoder.com/index.php/2009/07/accelerating-future-part-2point5/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 04:09:12 +0000</pubDate>
		<dc:creator>r.claypool</dc:creator>
				<category><![CDATA[Future]]></category>
		<category><![CDATA[Predictions]]></category>
		<category><![CDATA[Accelerating Change]]></category>
		<category><![CDATA[moore's law]]></category>

		<guid isPermaLink="false">http://techencoder.com/?p=848</guid>
		<description><![CDATA[This is an &#8216;out-of-band&#8217; post for my Accelerating Future series&#8230;  I didn&#8217;t plan on covering Virtual Reality as a significant technology for change, but the folks over at Blue Mars really surprised me with this demo:

Taken in today&#8217;s context, it might look like &#8220;just another game&#8221; or &#8220;just a nice demo&#8221; but the potential is [...]]]></description>
			<content:encoded><![CDATA[<p>This is an &#8216;out-of-band&#8217; post for my Accelerating Future series&#8230;  I didn&#8217;t plan on covering Virtual Reality as a significant technology for change, but the folks over at <a title="Blue Mars Online" href="http://www.bluemarsonline.com/">Blue Mars</a> really surprised me with <a title="Blue Mars Trailer on YouTube" href="http://www.youtube.com/watch?v=_C89ZL6wjwM">this demo</a>:</p>
<p><object width="560" height="340" data="http://www.youtube.com/v/_C89ZL6wjwM&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/_C89ZL6wjwM&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /></object></p>
<p>Taken in today&#8217;s context, it might look like &#8220;just another game&#8221; or &#8220;just a nice demo&#8221; but the potential is much bigger than that.</p>
<p>Mobile smart phones are bringing the Internet closer to everyday activities.  GPS and <a title="Implantable RFID" href="http://www.verichipcorp.com/Veri_Med_Health_Link.html">RFID</a> are bringing location awareness to everyday objects. Smaller (and cheaper) high definition sensors and <a title="Extremely small HD displays" href="http://singularityhub.com/2009/07/01/reportedly-worlds-smallest-lcd-screen-created-027-inches-in-diameter/">displays</a> are making our window into the digital world easier to wear and carry.  New <a title="Microsoft Project Natal" href="http://www.xbox.com/en-US/live/projectnatal/">computer human interfaces</a> are making our interactions with software more natural. Moore&#8217;s law is bringing the <a title="Growth of processing power" href="http://techencoder.com/index.php/2009/03/accelerating-future-part-1/#graph1">raw processing power</a> and storage needed for life-like simulations.  It&#8217;s all quite a convergence!</p>
<p>So virtual and augmented reality are not going to be &#8220;just a game&#8221;.  They will work with all of tomorrow&#8217;s technologies to provide an environment for modeling the real world along with all its social interactions and information.  Just about every part of our lives will be affected by this next step of the web, just like we have been changed by the web as it is today.</p>
]]></content:encoded>
			<wfw:commentRss>http://techencoder.com/index.php/2009/07/accelerating-future-part-2point5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
