<?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>Hoa Chau's weblog</title>
	<atom:link href="http://hoachau.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoachau.wordpress.com</link>
	<description>Random access...</description>
	<lastBuildDate>Thu, 05 Jan 2012 05:50:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hoachau.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/b7ec5dadb0de8c016cd8a6a9680d6845?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Hoa Chau's weblog</title>
		<link>http://hoachau.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hoachau.wordpress.com/osd.xml" title="Hoa Chau&#039;s weblog" />
	<atom:link rel='hub' href='http://hoachau.wordpress.com/?pushpress=hub'/>
		<item>
		<title>ASP.NET Error pages</title>
		<link>http://hoachau.wordpress.com/2012/01/05/asp-net-error-pages/</link>
		<comments>http://hoachau.wordpress.com/2012/01/05/asp-net-error-pages/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 05:37:21 +0000</pubDate>
		<dc:creator>hoachau</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Design patterns]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Lessons Learned]]></category>

		<guid isPermaLink="false">http://hoachau.wordpress.com/?p=165</guid>
		<description><![CDATA[That is interesting that my previous post talked about error pages in asp.net and yesterday I got this (see image below) when I tried to access blackberry online shopping site That is good to know that this website is built using ASP.NET MVC, WCF and a Controller-Service-Repository pattern, so instead of disappointed cause the website [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=165&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>That is interesting that my previous post talked about error pages in asp.net and yesterday I got this (see image below) when I tried to access blackberry online shopping site</p>
<p><a href="http://hoachau.files.wordpress.com/2012/01/blackberry.jpg"><img class="alignnone size-full wp-image-166" title="blackberry" src="http://hoachau.files.wordpress.com/2012/01/blackberry.jpg?w=720" alt=""   /></a></p>
<p>That is good to know that this website is built using ASP.NET MVC, WCF and a Controller-Service-Repository pattern, so instead of disappointed cause the website crashed, I felt like this is built by some of my &#8220;friends&#8221; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>PS: the good news is it was fixed right after that!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hoachau.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hoachau.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hoachau.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hoachau.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hoachau.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hoachau.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hoachau.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hoachau.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hoachau.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hoachau.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hoachau.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hoachau.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hoachau.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hoachau.wordpress.com/165/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=165&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hoachau.wordpress.com/2012/01/05/asp-net-error-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2870042f2876cf45af75f17cc5098bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hoachau</media:title>
		</media:content>

		<media:content url="http://hoachau.files.wordpress.com/2012/01/blackberry.jpg" medium="image">
			<media:title type="html">blackberry</media:title>
		</media:content>
	</item>
		<item>
		<title>404 on MVC</title>
		<link>http://hoachau.wordpress.com/2011/12/02/404-on-mvc/</link>
		<comments>http://hoachau.wordpress.com/2011/12/02/404-on-mvc/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 07:07:14 +0000</pubDate>
		<dc:creator>hoachau</dc:creator>
				<category><![CDATA[Asp.Net]]></category>

		<guid isPermaLink="false">http://hoachau.wordpress.com/?p=160</guid>
		<description><![CDATA[If you are running IIS 7.x, there is a very simple solution to handle 404 (Page Not Found). I found this solution from http://stackoverflow.com/questions/619895/how-can-i-properly-handle-404-in-asp-net-mvc/7967759#7967759<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=160&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are running IIS 7.x, there is a very simple solution to handle 404 (Page Not Found). I found this solution from</p>
<p><a title="http://stackoverflow.com/questions/619895/how-can-i-properly-handle-404-in-asp-net-mvc/7967759#7967759" href="http://stackoverflow.com/questions/619895/how-can-i-properly-handle-404-in-asp-net-mvc/7967759#7967759">http://stackoverflow.com/questions/619895/how-can-i-properly-handle-404-in-asp-net-mvc/7967759#7967759</a></p>
<p><pre class="brush: xml;">
&lt;system.webServer&gt;
&lt;httpErrors errorMode=&quot;Custom&quot; existingResponse=&quot;Replace&quot;&gt;
&lt;remove statusCode=&quot;404&quot; /&gt;
&lt;error statusCode=&quot;404&quot; responseMode=&quot;ExecuteURL&quot; path=&quot;/Error/PageNotFound&quot; /&gt;
&lt;/httpErrors&gt;
&lt;/system.webServer&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hoachau.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hoachau.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hoachau.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hoachau.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hoachau.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hoachau.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hoachau.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hoachau.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hoachau.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hoachau.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hoachau.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hoachau.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hoachau.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hoachau.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=160&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hoachau.wordpress.com/2011/12/02/404-on-mvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2870042f2876cf45af75f17cc5098bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hoachau</media:title>
		</media:content>
	</item>
		<item>
		<title>Default browser</title>
		<link>http://hoachau.wordpress.com/2011/04/20/default-browser/</link>
		<comments>http://hoachau.wordpress.com/2011/04/20/default-browser/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 07:53:58 +0000</pubDate>
		<dc:creator>hoachau</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hoachau.wordpress.com/?p=157</guid>
		<description><![CDATA[Recently, I&#8217;m having some issues when deal with the default browser. There is breaking change on Vista (and Win7) as described here http://newoldthing.wordpress.com/2007/03/23/how-does-your-browsers-know-that-its-not-the-default-browser/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=157&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;m having some issues when deal with the default browser. There is breaking change on Vista (and Win7) as described here</p>
<p><a title="http://newoldthing.wordpress.com/2007/03/23/how-does-your-browsers-know-that-its-not-the-default-browser/" href="http://newoldthing.wordpress.com/2007/03/23/how-does-your-browsers-know-that-its-not-the-default-browser/" target="_blank">http://newoldthing.wordpress.com/2007/03/23/how-does-your-browsers-know-that-its-not-the-default-browser/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hoachau.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hoachau.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hoachau.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hoachau.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hoachau.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hoachau.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hoachau.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hoachau.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hoachau.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hoachau.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hoachau.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hoachau.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hoachau.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hoachau.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=157&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hoachau.wordpress.com/2011/04/20/default-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2870042f2876cf45af75f17cc5098bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hoachau</media:title>
		</media:content>
	</item>
		<item>
		<title>Database diagram support objects cannot be installed&#8230;</title>
		<link>http://hoachau.wordpress.com/2011/02/22/database-diagram-support-objects-cannot-be-installed/</link>
		<comments>http://hoachau.wordpress.com/2011/02/22/database-diagram-support-objects-cannot-be-installed/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 00:33:51 +0000</pubDate>
		<dc:creator>hoachau</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://hoachau.wordpress.com/?p=151</guid>
		<description><![CDATA[This is the second time I ran into this issue and think I should copy it here so that I don&#8217;t have to google it next time. The solution has been posted on http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/9a9bf26c-bb14-4353-a4ec-ab53d68d6afc Below is the script from that post<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=151&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is the second time I ran into this issue and think I should copy it here so that I don&#8217;t have to google it next time. The solution has been posted on</p>
<p><a href="http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/9a9bf26c-bb14-4353-a4ec-ab53d68d6afc"> http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/9a9bf26c-bb14-4353-a4ec-ab53d68d6afc</a></p>
<p>Below is the script from that post</p>
<p><pre class="brush: sql;">

EXEC sp_dbcmptlevel 'yourDB', '90';
go
ALTER AUTHORIZATION ON DATABASE::yourDB TO &quot;yourLogin&quot;
go
use [yourDB]
go
EXECUTE AS USER = N'dbo' REVERT

go

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hoachau.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hoachau.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hoachau.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hoachau.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hoachau.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hoachau.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hoachau.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hoachau.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hoachau.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hoachau.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hoachau.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hoachau.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hoachau.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hoachau.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=151&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hoachau.wordpress.com/2011/02/22/database-diagram-support-objects-cannot-be-installed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2870042f2876cf45af75f17cc5098bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hoachau</media:title>
		</media:content>
	</item>
		<item>
		<title>Run Windows Explorer as Administrator</title>
		<link>http://hoachau.wordpress.com/2010/12/07/run-windows-explorer-as-administrator/</link>
		<comments>http://hoachau.wordpress.com/2010/12/07/run-windows-explorer-as-administrator/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 06:08:27 +0000</pubDate>
		<dc:creator>hoachau</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://hoachau.wordpress.com/?p=142</guid>
		<description><![CDATA[Have you ever frustrated when right click on Windows Explorer icon and select “Run as Administrator” but still got some kind of “Access Is Denied” message? The reason is Windows Explorer still doesn’t run under Admin right. Below is how to solve the problem according to http://www.msfn.org/board/topic/144776-unable-to-open-an-elevated-windows-explorer-window/ But I just want to put it here [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=142&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Have you ever frustrated when right click on Windows Explorer icon and select “Run as Administrator” but still got some kind of “Access Is Denied” message? The reason is Windows Explorer still doesn’t run under Admin right. Below is how to solve the problem according to <a title="http://www.msfn.org/board/topic/144776-unable-to-open-an-elevated-windows-explorer-window/" href="http://www.msfn.org/board/topic/144776-unable-to-open-an-elevated-windows-explorer-window/">http://www.msfn.org/board/topic/144776-unable-to-open-an-elevated-windows-explorer-window/</a></p>
<p>But I just want to put it here for my reference<br />
1. Run dcomcnfg.exe<br />
2. Flow screens below</p>
<p><a href="http://hoachau.files.wordpress.com/2010/12/explorer.jpg"><img class="alignnone size-full wp-image-143" title="explorer" src="http://hoachau.files.wordpress.com/2010/12/explorer.jpg?w=720" alt=""   /></a></p>
<p>This is particularly useful when you want to install assemblies into GAC in your production servers those don’t have Windows SDK.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hoachau.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hoachau.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hoachau.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hoachau.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hoachau.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hoachau.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hoachau.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hoachau.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hoachau.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hoachau.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hoachau.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hoachau.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hoachau.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hoachau.wordpress.com/142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=142&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hoachau.wordpress.com/2010/12/07/run-windows-explorer-as-administrator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2870042f2876cf45af75f17cc5098bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hoachau</media:title>
		</media:content>

		<media:content url="http://hoachau.files.wordpress.com/2010/12/explorer.jpg" medium="image">
			<media:title type="html">explorer</media:title>
		</media:content>
	</item>
		<item>
		<title>Test Expected Exception with NUnit 2.5</title>
		<link>http://hoachau.wordpress.com/2010/12/05/test-expected-exception-with-nunit-2-5/</link>
		<comments>http://hoachau.wordpress.com/2010/12/05/test-expected-exception-with-nunit-2-5/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 10:54:57 +0000</pubDate>
		<dc:creator>hoachau</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Unit Test]]></category>

		<guid isPermaLink="false">http://hoachau.wordpress.com/?p=135</guid>
		<description><![CDATA[Testing the expected exceptions has been improved a lot by NUnit 2.5, let says you have a scenario that a method checks for the input parameters and throws some ArgumentNullException exceptions, it was kind of cumbersome to cover all those cases in your tests, normally, you will have multiple test methods using ExpectedExceptionAttribute. But with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=135&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Testing the expected exceptions has been improved a lot by NUnit 2.5, let says you have a scenario that a method checks for the input parameters and throws some ArgumentNullException exceptions, it was kind of cumbersome to cover all those cases in your tests, normally, you will have multiple test methods using ExpectedExceptionAttribute. But with NUnit 2.5.x, we can write something likes</p>
<p><pre class="brush: csharp;">

[Test]

public void AndSpecification_Construction_With_Null_Inputs_Test()

{

   // Arrange
   ISpecification&lt;MockEntity&gt; spec = new Moq.Mock&lt;ISpecification&lt;MockEntity&gt;&gt;().Object;

   // Passing null for the left specification
   Assert.That(() =&gt; new AndSpecification&lt;MockEntity&gt;(null, spec),
      Throws.TypeOf&lt;ArgumentNullException&gt;()
         .With.Property(&quot;ParamName&quot;).EqualTo(&quot;left&quot;));

   // Passing null for the right specification
   Assert.That(() =&gt; new AndSpecification&lt;MockEntity&gt;(spec, null),
      Throws.TypeOf&lt;ArgumentNullException&gt;()
         .With.Property(&quot;ParamName&quot;).EqualTo(&quot;right&quot;));

}

</pre></p>
<p>One single method can handle multiple cases.</p>
<p>You can find more details information from <a title="http://nunit.net/blogs/?p=63" href="http://nunit.net/blogs/?p=63">http://nunit.net/blogs/?p=63</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hoachau.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hoachau.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hoachau.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hoachau.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hoachau.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hoachau.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hoachau.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hoachau.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hoachau.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hoachau.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hoachau.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hoachau.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hoachau.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hoachau.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=135&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hoachau.wordpress.com/2010/12/05/test-expected-exception-with-nunit-2-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2870042f2876cf45af75f17cc5098bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hoachau</media:title>
		</media:content>
	</item>
		<item>
		<title>Reuse is good!</title>
		<link>http://hoachau.wordpress.com/2010/10/21/resue-is-good/</link>
		<comments>http://hoachau.wordpress.com/2010/10/21/resue-is-good/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 06:44:53 +0000</pubDate>
		<dc:creator>hoachau</dc:creator>
				<category><![CDATA[Design patterns]]></category>

		<guid isPermaLink="false">http://hoachau.wordpress.com/?p=128</guid>
		<description><![CDATA[One of the theme that I’ve always seen in design when people try to create some kind of “framework” is the heavily use of inheritance. Because one of the thing that people has been taught is “reuse is good”. Looks at the design below (noted that this design has nothing to do with DDD) The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=128&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the theme that I’ve always seen in design when people try to create some kind of “framework” is the heavily use of inheritance. Because one of the thing that people has been taught is “reuse is good”. Looks at the design below (noted that this design has nothing to do with DDD)</p>
<p><a href="http://hoachau.files.wordpress.com/2010/10/1.jpg"><img class="alignnone size-full wp-image-129" title="1" src="http://hoachau.files.wordpress.com/2010/10/1.jpg?w=720" alt=""   /></a></p>
<p>The same design is applied for repositories…</p>
<p>And the only reason to have this kind of design is for reusability, no infrastructure codes can easily deal with IService&lt;T&gt; or any other base classes in this design. (And there is no reason for infrastructure codes to deal with those things)</p>
<p>The next question is what happens if the UserService (or any service class) doesn’t need all functions implemented in the base class? What happens if there are some business rules need to be checked? (Then the workaround is to add more abstract methods around all functions in the base class)</p>
<p>The point here is: There is no reason to create a complex but not very useful design. My preferable design is something likes</p>
<p><a href="http://hoachau.files.wordpress.com/2010/10/2.jpg"><img class="alignnone size-full wp-image-130" title="2" src="http://hoachau.files.wordpress.com/2010/10/2.jpg?w=720" alt=""   /></a></p>
<p>We can still reuse some of the codes through composition but not inheritance, there is a well written blog post discuss almost the same issue here <a href="http://codebetter.com/blogs/gregyoung/archive/2009/01/16/ddd-the-generic-repository.aspx">http://codebetter.com/blogs/gregyoung/archive/2009/01/16/ddd-the-generic-repository.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hoachau.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hoachau.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hoachau.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hoachau.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hoachau.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hoachau.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hoachau.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hoachau.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hoachau.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hoachau.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hoachau.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hoachau.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hoachau.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hoachau.wordpress.com/128/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=128&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hoachau.wordpress.com/2010/10/21/resue-is-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2870042f2876cf45af75f17cc5098bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hoachau</media:title>
		</media:content>

		<media:content url="http://hoachau.files.wordpress.com/2010/10/1.jpg" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://hoachau.files.wordpress.com/2010/10/2.jpg" medium="image">
			<media:title type="html">2</media:title>
		</media:content>
	</item>
		<item>
		<title>When LTRIM() and RTRIM() do not work</title>
		<link>http://hoachau.wordpress.com/2010/10/15/when-ltrim-and-rtrim-do-not-work/</link>
		<comments>http://hoachau.wordpress.com/2010/10/15/when-ltrim-and-rtrim-do-not-work/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 06:57:11 +0000</pubDate>
		<dc:creator>hoachau</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://hoachau.wordpress.com/?p=124</guid>
		<description><![CDATA[When I analyzed the data from an Access database before import into our SQL database, I saw some strings with extra spaces at the end. So I thought I could simply use the RTRIM() function, I quickly put together a script and ran -&#62; NOTHING WORKED Tried couple times, the result still the same. It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=124&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I analyzed the data from an Access database before import into our SQL database, I saw some strings with extra spaces at the end. So I thought I could simply use the RTRIM() function, I quickly put together a script and ran -&gt; NOTHING WORKED</p>
<p>Tried couple times, the result still the same. It turns out there is a note in SQL Online Book</p>
<blockquote><p>LTRIM does not remove white-space characters such as the tab or line feed  characters&#8230;</p></blockquote>
<p>And the spaces in the data are LFs (char(10)).  The solution is to replace those char(10) with a space (char(32)) before calling RTRIM()</p>
<p><pre class="brush: sql;">

UPDATE dbo.Cause_1
SET Result =  (RTRIM(REPLACE(Result, CHAR(10), CHAR(32))))

</pre></p>
<p>A more complete solution can be found at</p>
<p><a href="http://blog.programmingsolution.net/sql-server-2008/removing-leading-and-trailing-white-space-characters-in-tsql/">http://blog.programmingsolution.net/sql-server-2008/removing-leading-and-trailing-white-space-characters-in-tsql/</a></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hoachau.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hoachau.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hoachau.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hoachau.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hoachau.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hoachau.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hoachau.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hoachau.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hoachau.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hoachau.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hoachau.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hoachau.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hoachau.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hoachau.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=124&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hoachau.wordpress.com/2010/10/15/when-ltrim-and-rtrim-do-not-work/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2870042f2876cf45af75f17cc5098bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hoachau</media:title>
		</media:content>
	</item>
		<item>
		<title>Mindset</title>
		<link>http://hoachau.wordpress.com/2010/09/30/mindset/</link>
		<comments>http://hoachau.wordpress.com/2010/09/30/mindset/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 04:04:04 +0000</pubDate>
		<dc:creator>hoachau</dc:creator>
				<category><![CDATA[Lessons Learned]]></category>

		<guid isPermaLink="false">http://hoachau.wordpress.com/?p=118</guid>
		<description><![CDATA[Have been involved in an interesting discussion lately(http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&#38;discussionID=30558130&#38;gid=1807715&#38;commentID=23634984&#38;trk=view_disc) I can imagine how hard it is for people to get this!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=118&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Have been involved in an interesting discussion lately<a href="http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&amp;discussionID=30558130&amp;gid=1807715&amp;commentID=23634984&amp;trk=view_disc">(http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&amp;discussionID=30558130&amp;gid=1807715&amp;commentID=23634984&amp;trk=view_disc</a>)</p>
<p>I can imagine how hard it is for people to get this!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hoachau.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hoachau.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hoachau.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hoachau.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hoachau.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hoachau.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hoachau.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hoachau.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hoachau.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hoachau.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hoachau.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hoachau.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hoachau.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hoachau.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=118&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hoachau.wordpress.com/2010/09/30/mindset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2870042f2876cf45af75f17cc5098bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hoachau</media:title>
		</media:content>
	</item>
		<item>
		<title>Crystal Reports 64 bits issue</title>
		<link>http://hoachau.wordpress.com/2010/04/27/crystal-report-64-bits-issue/</link>
		<comments>http://hoachau.wordpress.com/2010/04/27/crystal-report-64-bits-issue/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 08:11:26 +0000</pubDate>
		<dc:creator>hoachau</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Asp.Net]]></category>

		<guid isPermaLink="false">http://hoachau.wordpress.com/?p=110</guid>
		<description><![CDATA[The error below happen on a 64 bits web server that tries to load the crystal reports run-time. If this sounds familiar with you and you already installed the &#8220;CRRedist2008_x64.msi&#8221;.  But it still didn&#8217;t work and you starting to get tired with google You should look into your application pools settings, make sure you set [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=110&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The error below happen on a 64 bits web server that tries to load the crystal reports run-time. If this sounds familiar with you and you already installed the &#8220;CRRedist2008_x64.msi&#8221;.  But it still didn&#8217;t work and you starting to get tired with google <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>You should look into your application pools settings, make sure you set the &#8220;Enable 32 bits Applications&#8221; to FALSE</p>
<p><a href="http://hoachau.files.wordpress.com/2010/04/error.jpg"><img class="alignnone size-full wp-image-111" title="error" src="http://hoachau.files.wordpress.com/2010/04/error.jpg?w=720" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hoachau.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hoachau.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hoachau.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hoachau.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hoachau.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hoachau.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hoachau.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hoachau.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hoachau.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hoachau.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hoachau.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hoachau.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hoachau.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hoachau.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hoachau.wordpress.com&amp;blog=6974136&amp;post=110&amp;subd=hoachau&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hoachau.wordpress.com/2010/04/27/crystal-report-64-bits-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2870042f2876cf45af75f17cc5098bd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hoachau</media:title>
		</media:content>

		<media:content url="http://hoachau.files.wordpress.com/2010/04/error.jpg" medium="image">
			<media:title type="html">error</media:title>
		</media:content>
	</item>
	</channel>
</rss>
