<?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>Life in Brighton</title>
	<atom:link href="http://flat9.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://flat9.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Wed, 22 Jun 2011 16:23:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='flat9.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Life in Brighton</title>
		<link>http://flat9.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://flat9.wordpress.com/osd.xml" title="Life in Brighton" />
	<atom:link rel='hub' href='http://flat9.wordpress.com/?pushpress=hub'/>
		<item>
		<title>NHibernate, QueryOver SelectList project Child properties</title>
		<link>http://flat9.wordpress.com/2011/06/22/nhibernate-queryover-selectlist-project-child-properties/</link>
		<comments>http://flat9.wordpress.com/2011/06/22/nhibernate-queryover-selectlist-project-child-properties/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 14:41:13 +0000</pubDate>
		<dc:creator>maz100</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flat9.wordpress.com/?p=106</guid>
		<description><![CDATA[I wanted to select some fields from a Parent, some from a Child, the total of AnotherChilds in the OtherChildren collection and stuff the lot into a ParentSummary. This will do it:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=106&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wanted to select some fields from a Parent, some from a Child, the total of AnotherChilds in the OtherChildren collection and stuff the lot into a ParentSummary.</p>
<p>This will do it:</p>
<pre class="brush: csharp;">
    ParentSummary parentSummary = null;
    Child child = null;
    IList&lt;AnotherChild&gt; otherChildren = null;

    var result = session.QueryOver&lt;Parent&gt;()
      .JoinAlias(x =&gt; x.Child, () =&gt; child)
      .JoinAlias(x =&gt; x.OtherChildren, () =&gt; otherChildren)
      .SelectList(list =&gt; list
          .SelectGroup(x =&gt; x.Id).WithAlias(() =&gt; parentSummary.Id)
          .SelectGroup(x =&gt; x.Name).WithAlias(() =&gt; parentSummary.Name)
          .SelectGroup(() =&gt; child.Name).WithAlias(() =&gt; parentSummary.ChildName)
          .SelectCount(x =&gt; x.OtherChildren).WithAlias(() =&gt; parentSummary.OtherChildrenCount))
      .TransformUsing(Transformers.AliasToBean&lt;ParentSummary&gt;())
      .List&lt;ParentSummary&gt;();
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flat9.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flat9.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flat9.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flat9.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flat9.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flat9.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flat9.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flat9.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flat9.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flat9.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flat9.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flat9.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flat9.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flat9.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=106&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flat9.wordpress.com/2011/06/22/nhibernate-queryover-selectlist-project-child-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef6f89ea7ba3ef59b55644b79c25437a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maz100</media:title>
		</media:content>
	</item>
		<item>
		<title>Conditionally Start/Stop a Windows Service</title>
		<link>http://flat9.wordpress.com/2011/03/23/conditionally-startstop-a-windows-service/</link>
		<comments>http://flat9.wordpress.com/2011/03/23/conditionally-startstop-a-windows-service/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 12:41:53 +0000</pubDate>
		<dc:creator>maz100</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flat9.wordpress.com/?p=103</guid>
		<description><![CDATA[When developing windows services in visual studio I like to set up a pre-build event which stops and uninstalls the service and a post-build event which installs and starts the service. Using net start servicename is problematic because your build will fail if you try and stop a stopped service, or start a started service. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=103&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When developing windows services in visual studio I like to set up a pre-build event which stops and uninstalls the service and a post-build event which installs and starts the service.</p>
<p>Using net start <em>servicename</em> is problematic because your build will fail if you try and stop a stopped service, or start a started service.</p>
<p>Instead use a batch file which handles the error and returns 0 to indicate success:</p>
<p>@echo off<br />
net start service1<br />
if ERRORLEVEL 2 goto error<br />
exit<br />
:error<br />
exit /b 0</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flat9.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flat9.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flat9.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flat9.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flat9.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flat9.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flat9.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flat9.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flat9.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flat9.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flat9.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flat9.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flat9.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flat9.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=103&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flat9.wordpress.com/2011/03/23/conditionally-startstop-a-windows-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef6f89ea7ba3ef59b55644b79c25437a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maz100</media:title>
		</media:content>
	</item>
		<item>
		<title>Resistance Is Futile</title>
		<link>http://flat9.wordpress.com/2010/09/02/resistance-is-futile/</link>
		<comments>http://flat9.wordpress.com/2010/09/02/resistance-is-futile/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 22:55:09 +0000</pubDate>
		<dc:creator>maz100</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[Inertia]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Progressive]]></category>

		<guid isPermaLink="false">http://flat9.wordpress.com/?p=94</guid>
		<description><![CDATA[In the months since I last posted I&#8217;ve managed to complete the project I was working on and decided it was time to end my long daily commute for a while and take some time off.  As it turned out I only got a short break before finding a great looking contract right on my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=94&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the months since I last posted I&#8217;ve managed to complete the project I was working on and decided it was time to end my long daily commute for a while and take some time off.  As it turned out I only got a short break before finding a great looking contract right on my doorstep. Its not bad as contracts go, casual dress, close to home, nice people.</p>
<p>At the interview there was a lot of interest in all things agile from a dev manager who is sympathetic to the cause but has not had the opportunity to explore these ideas.  And today it became apparent that there are arguments surrounding the proposed adoption of certain open source tools (though it look like there is budget for the paid ones).</p>
<p>As a .NET developer I&#8217;m a fan of TDD and Continuous Integration. I like NHibernate, IOC containers, and have rediscovered a hatred for Visual Source Safe.  I think Resharper should be mandatory for all Visual Studio users.  Resharper&#8217;s unit testing capabilities are complimented TestDriven.Net brings code coverage via NCover.  I&#8217;ve recently ditched a long time friend CruiseControl.Net in favour of Team City.  Likewise I am meaning to switch to Rake and say farewell to Nant (thanks for the recent update, but I think I&#8217;m done with XML now). And Git appeals to me though I feel comfortable enough with Subversion to be able to mostly avoid its pitfalls. I love tinkering with Rhino Mocks and NBuilder and can knock up Nunit tests almost as quickly as I can type.  I must confess that I have only scratched the surface of NHibernate the reason for this&#8217; this dear readers the point of this post.  Resistance.  Developers, managers, companies that are so resistant to change, saturated with inertia and deeply mistrustful of anything not originating from the hallowed pages of MSDN.</p>
<p>Everywhere I look there are developers to whom it just never occurs to do anything differently, whose C# code is barely distinguishable from their VB code of ten years ago were it not for the angle brackets, semi colons and case sensitivity.  These people are yet to be convinced of the need for interfaces let alone design patterns or refactoring tools.  Copy and paste abounds, its really so much easier than all that inheritance.  Lets keep things simple eh?</p>
<p>So it was with great trepidation that I began my new contract and found myself being asked to demo some of the wondrous magic of which I had spoken. Until today.  Because tools such as Nunit, Log4Net, Rhino Mocks (the list goes on Alt.Netters) are not on the &#8216;approved product list&#8217;. A list so dull that I wonder if the architectural team that maintains it died circa 2001.  In fact if the architects (misleading term used in large corporations for people from IT who are quite high up in the organisation) are not putting progressive software tools on their list then I can only conclude that they do not have a passion for their trade and are most likely so out of touch that the only things that make it onto the list come from vendors who justify the high price tags with free lunches at each procurement milestone.</p>
<p>And there&#8217;s the rub.  If the guys at the top don&#8217;t care, then it follows that the guys in the trenches won&#8217;t care either.  Java doesn&#8217;t have this problem, open source projects are its lifeblood.  Hibernate is the defacto standard, whereas in my office the very download of its .NET equivalent is prohibited.  Large corporations suffer from expensive and often doomed software projects yet, with a few exceptions, refuse to embrace the answer to their problems identified by community figures and the software that nice open source developers write to make it easy to implement them.</p>
<p>And all of this indifference, fear and ignorance dominants the .NET landscape whilst some truly innovative tools are freely available to any who bother to look for them. But why do I care? Perhaps I should just leave it.  Resistance is futile…</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flat9.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flat9.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flat9.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flat9.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flat9.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flat9.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flat9.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flat9.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flat9.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flat9.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flat9.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flat9.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flat9.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flat9.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=94&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flat9.wordpress.com/2010/09/02/resistance-is-futile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef6f89ea7ba3ef59b55644b79c25437a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maz100</media:title>
		</media:content>
	</item>
		<item>
		<title>Infragistics and CruiseControl.Net</title>
		<link>http://flat9.wordpress.com/2010/01/04/infragistics-and-cruisecontrol-net/</link>
		<comments>http://flat9.wordpress.com/2010/01/04/infragistics-and-cruisecontrol-net/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 11:12:27 +0000</pubDate>
		<dc:creator>maz100</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flat9.wordpress.com/?p=91</guid>
		<description><![CDATA[We just added the infragistics controls to our project and our build broke.  This was the error: C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1756,9): error MSB3091: Task failed because "LC.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "LC.exe" in the "bin" subdirectory beneath the  location specified in the InstallationFolder value of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=91&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We just added the infragistics controls to our project and our build broke.  This was the error:</p>
<pre>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1756,9):
error MSB3091: Task failed because "LC.exe" was not found, or the correct Microsoft Windows
SDK is not installed. The task is looking for "LC.exe" in the "bin" subdirectory beneath the
 location specified in the InstallationFolder value of the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A. You may be able to solve
 the problem by doing one of the following:  1) Install the Microsoft Windows SDK for Windows Server 2008
 and .NET Framework 3.5.  2) Install Visual Studio 2008.  3) Manually set the above registry key to
 the correct location.  4) Pass the correct location into the "ToolPath" parameter of the task.
</pre>
<p>Well, there was plenty of information around so it was easy to find a solution.  I chose to add a registry key to my build server that matched that in the error message:</p>
<pre>
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A]
"InstallationFolder"="C:\\Program Files\\Microsoft.NET\\SDK\\v2.0\\"
</pre>
<p>I set it to my .Net sdk install as we don&#8217;t have the windows sdk on the build server.</p>
<pre>
</pre>
<p>Next, I emptied the licenses.licx file that had been added to the properties directory of my web application. Then my build server happily compiled the source.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flat9.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flat9.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flat9.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flat9.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flat9.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flat9.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flat9.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flat9.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flat9.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flat9.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flat9.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flat9.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flat9.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flat9.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=91&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flat9.wordpress.com/2010/01/04/infragistics-and-cruisecontrol-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef6f89ea7ba3ef59b55644b79c25437a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maz100</media:title>
		</media:content>
	</item>
		<item>
		<title>Connecting to Oracle</title>
		<link>http://flat9.wordpress.com/2009/11/20/connecting-to-oracle/</link>
		<comments>http://flat9.wordpress.com/2009/11/20/connecting-to-oracle/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 11:21:54 +0000</pubDate>
		<dc:creator>maz100</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flat9.wordpress.com/?p=88</guid>
		<description><![CDATA[We use a lot of Oracle database and we connect in several different ways.  Tns names in the tnsnames.ora file, ldap using the ldap.ora file, ntfs for oracle xe via the sqlnet.ora.  If we have any oracle connection issues its worth checking all these files are present.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=88&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We use a lot of Oracle database and we connect in several different ways.  Tns names in the tnsnames.ora file, ldap using the ldap.ora file, ntfs for oracle xe via the sqlnet.ora.  If we have any oracle connection issues its worth checking all these files are present.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flat9.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flat9.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flat9.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flat9.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flat9.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flat9.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flat9.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flat9.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flat9.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flat9.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flat9.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flat9.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flat9.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flat9.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=88&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flat9.wordpress.com/2009/11/20/connecting-to-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef6f89ea7ba3ef59b55644b79c25437a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maz100</media:title>
		</media:content>
	</item>
		<item>
		<title>Install A Windows Service with a User Account ptII</title>
		<link>http://flat9.wordpress.com/2009/11/12/install-a-windows-service-with-a-user-account-ptii/</link>
		<comments>http://flat9.wordpress.com/2009/11/12/install-a-windows-service-with-a-user-account-ptii/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 12:09:59 +0000</pubDate>
		<dc:creator>maz100</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flat9.wordpress.com/?p=86</guid>
		<description><![CDATA[If you want to install a windows service under a user account you can handle the BeforeInstall event of the project installer and set the username and password there. Unfortunately, you don&#8217;t seem to be able to get the settings dynamically from the config file of the service as it is not the service that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=86&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you want to install a windows service under a user account you can handle the BeforeInstall event of the project installer and set the username and password there.</p>
<p>Unfortunately, you don&#8217;t seem to be able to get the settings dynamically from the config file of the service as it is not the service that is the running application during installation.</p>
<p>Instead you can supply the username and password as command line argument to installutil during installation as described <a href="http://stackoverflow.com/questions/140054/using-installutil-and-silently-setting-a-windows-service-logon-username-password" target="_blank">here</a>.</p>
<p>But installutil doesn&#8217;t take username and password parameters on the command line I hear you say&#8230;</p>
<p>Well, you can pass anything in on the command line and retrieve it like this:</p>
<p><code>serviceProcessInstaller1.Username = Context.Parameters["username"];</code></p>
<p>This is great for automated installs which I run as part of my cruise control build.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flat9.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flat9.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flat9.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flat9.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flat9.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flat9.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flat9.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flat9.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flat9.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flat9.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flat9.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flat9.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flat9.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flat9.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=86&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flat9.wordpress.com/2009/11/12/install-a-windows-service-with-a-user-account-ptii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef6f89ea7ba3ef59b55644b79c25437a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maz100</media:title>
		</media:content>
	</item>
		<item>
		<title>Install A Windows Service with a User Account</title>
		<link>http://flat9.wordpress.com/2009/11/11/install-a-windows-service-with-a-user-account/</link>
		<comments>http://flat9.wordpress.com/2009/11/11/install-a-windows-service-with-a-user-account/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 17:40:22 +0000</pubDate>
		<dc:creator>maz100</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flat9.wordpress.com/?p=83</guid>
		<description><![CDATA[In my never ending quest for build automation I had to ensure a windows service was installed when the project was built.  In order to have it install as a particular domain account I had to specify that it would install as a user account and then add the following event handler in the ProjectInstaller: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=83&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my never ending quest for build automation I had to ensure a windows service was installed when the project was built.  In order to have it install as a particular domain account I had to specify that it would install as a user account and then add the following event handler in the ProjectInstaller:</p>
<p>private void ProjectInstaller_BeforeInstall(object sender, InstallEventArgs e)<br />
{<br />
serviceProcessInstaller1.Username = @&#8221;domain\username&#8221;;<br />
serviceProcessInstaller1.Password = &#8220;password&#8221;;<br />
}</p>
<p>Works great.  Next up is to pull out the account details into my config file.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flat9.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flat9.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flat9.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flat9.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flat9.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flat9.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flat9.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flat9.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flat9.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flat9.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flat9.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flat9.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flat9.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flat9.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=83&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flat9.wordpress.com/2009/11/11/install-a-windows-service-with-a-user-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef6f89ea7ba3ef59b55644b79c25437a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maz100</media:title>
		</media:content>
	</item>
		<item>
		<title>Current Directory for Windows Service</title>
		<link>http://flat9.wordpress.com/2009/11/03/current-directory-for-windows-service/</link>
		<comments>http://flat9.wordpress.com/2009/11/03/current-directory-for-windows-service/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 14:00:06 +0000</pubDate>
		<dc:creator>maz100</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flat9.wordpress.com/?p=80</guid>
		<description><![CDATA[Good post here http://haacked.com/archive/2004/06/29/706.aspx. Recommends : System.IO.Directory.SetCurrentDirectory(System.AppDomain.CurrentDomain.BaseDirectory); So that your services don&#8217;t appear to run in the System32 dir.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=80&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Good post here http://haacked.com/archive/2004/06/29/706.aspx.</p>
<p>Recommends :<br />
<code>System.IO.Directory.SetCurrentDirectory(System.AppDomain.CurrentDomain.BaseDirectory);</code></p>
<p>So that your services don&#8217;t appear to run in the System32 dir.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flat9.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flat9.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flat9.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flat9.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flat9.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flat9.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flat9.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flat9.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flat9.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flat9.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flat9.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flat9.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flat9.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flat9.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=80&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flat9.wordpress.com/2009/11/03/current-directory-for-windows-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef6f89ea7ba3ef59b55644b79c25437a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maz100</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Report Viewer without VS.NET</title>
		<link>http://flat9.wordpress.com/2009/10/22/using-report-viewer-without-vs-net/</link>
		<comments>http://flat9.wordpress.com/2009/10/22/using-report-viewer-without-vs-net/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 12:00:45 +0000</pubDate>
		<dc:creator>maz100</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flat9.wordpress.com/?p=77</guid>
		<description><![CDATA[We recently started using the report viewer in vs2009.  However, when our build machine (without vs.net installed) tried to compile the project that uses the report viewer we got an error: C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\ReportingServices\Microsoft.ReportingServices.targets(24,2): error MSB4062: The &#8220;Microsoft.Reporting.RdlCompile&#8221; task could not be loaded from the assembly Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=77&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We recently started using the report viewer in vs2009.  However, when our build machine (without vs.net installed) tried to compile the project that uses the report viewer we got an error:</p>
<p>C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\ReportingServices\Microsoft.ReportingServices.targets(24,2): error MSB4062: The &#8220;Microsoft.Reporting.RdlCompile&#8221; task could not be loaded from the assembly Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly &#8216;Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&#8217; or one of its dependencies. The system cannot find the file specified. Confirm that the &lt;UsingTask&gt; declaration is correct, and that the assembly and all its dependencies are available.</p>
<p>I downloaded the report viewer redistributable package from here:</p>
<p>http://www.microsoft.com/downloads/details.aspx?familyid=BB196D5D-76C2-4A0E-9458-267D22B6AAC6&#038;displaylang=en</p>
<p>and installed it on the build server.</p>
<p>Everything&#8217;s fine now.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flat9.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flat9.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flat9.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flat9.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flat9.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flat9.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flat9.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flat9.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flat9.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flat9.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flat9.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flat9.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flat9.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flat9.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=77&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flat9.wordpress.com/2009/10/22/using-report-viewer-without-vs-net/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef6f89ea7ba3ef59b55644b79c25437a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maz100</media:title>
		</media:content>
	</item>
		<item>
		<title>Not all ExecuteNonQuerys are the same!</title>
		<link>http://flat9.wordpress.com/2009/10/01/not-all-executenonquerys-are-the-same/</link>
		<comments>http://flat9.wordpress.com/2009/10/01/not-all-executenonquerys-are-the-same/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 11:28:15 +0000</pubDate>
		<dc:creator>maz100</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ExecuteNonQuery]]></category>
		<category><![CDATA[Gotcha]]></category>

		<guid isPermaLink="false">http://flat9.wordpress.com/?p=75</guid>
		<description><![CDATA[This is just a gotcha that would have been caught immediately in a pair programming situation I&#8217;m sure, but I&#8217;ll note it now in case I do it again. I&#8217;m back using .NET after an almost three year spell of Java.  I&#8217;m back to ADO (with M$ enterprise building blocks) after an affair with (N)Hibernate. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=75&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is just a gotcha that would have been caught immediately in a pair programming situation I&#8217;m sure, but I&#8217;ll note it now in case I do it again.</p>
<p>I&#8217;m back using .NET after an almost three year spell of Java.  I&#8217;m back to ADO (with M$ enterprise building blocks) after an affair with (N)Hibernate.</p>
<p>So I just spent abouthalf an hour realising this.</p>
<p>If I set up a command object (via a <code>Microsoft.Practices.EnterpriseLibrary.Data.Database</code> instance) with a stored procedure and its parameters, I should call <code>ExecuteNonQuery(System.Data.Common.DbCommand command)</code>.</p>
<p>Unfortunately, I was calling <code>ExecuteNonQuery(System.Data.CommandType commandType, string </code>commandText).</p>
<p>The results in a new command object (with none of my lovingly created parameters) being created for the call, hence the failure of my db call.</p>
<p>Doh!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flat9.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flat9.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flat9.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flat9.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flat9.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flat9.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flat9.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flat9.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flat9.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flat9.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flat9.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flat9.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flat9.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flat9.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flat9.wordpress.com&amp;blog=7827000&amp;post=75&amp;subd=flat9&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flat9.wordpress.com/2009/10/01/not-all-executenonquerys-are-the-same/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ef6f89ea7ba3ef59b55644b79c25437a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maz100</media:title>
		</media:content>
	</item>
	</channel>
</rss>
