<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Aaron Blake's Blog</title>
	
	<link>http://www.aaronblake.co.uk/blog</link>
	<description>Think, share and grow.</description>
	<lastBuildDate>Sat, 28 May 2011 13:22:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Headspace-AaronBlakesBlog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="headspace-aaronblakesblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Microsoft .NET Framework 4 Web Applications certification – Passed!</title>
		<link>http://www.aaronblake.co.uk/blog/2011/05/28/microsoft-net-framework-4-web-applications-certification-passed/</link>
		<comments>http://www.aaronblake.co.uk/blog/2011/05/28/microsoft-net-framework-4-web-applications-certification-passed/#comments</comments>
		<pubDate>Sat, 28 May 2011 13:00:12 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[microsoft certification]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=280</guid>
		<description><![CDATA[Yesterday I passed the Microsoft exam 70-515, and got my .NET Framework 4, Web Applications certification. Lots of revision paid off in the end.]]></description>
			<content:encoded><![CDATA[<p>Yesterday I passed the Microsoft exam 70-515, and got my .NET Framework 4, Web Applications certification.</p>
<p>Lots of revision paid off in the end.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2011/05/28/microsoft-net-framework-4-web-applications-certification-passed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RIP Gil Scott-Heron</title>
		<link>http://www.aaronblake.co.uk/blog/2011/05/28/rip-gil-scott-heron/</link>
		<comments>http://www.aaronblake.co.uk/blog/2011/05/28/rip-gil-scott-heron/#comments</comments>
		<pubDate>Sat, 28 May 2011 12:46:37 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=281</guid>
		<description><![CDATA[Gil Scott-Heron passed away today, after flying back to the US from a trip to Europe. This guy was an amazing poet and musician, often dubbed &#8220;The Godfather of Rap&#8221;, he&#8217;s famous for one of the most critically acclaimed political songs: &#8220;The Revolution Will Not Be Televised&#8221; as well as his innovative recent album &#8220;I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>Gil Scott-Heron passed away today, after flying back to the US from a trip to Europe.</p>
<p>This guy was an amazing poet and musician, often dubbed &#8220;The Godfather of Rap&#8221;, he&#8217;s famous for one of the most critically acclaimed political songs: &#8220;The Revolution Will Not Be Televised&#8221; as well as his innovative recent album &#8220;I&#8217;m New Here&#8221;.</p>
<p>May his words and wisdom continue to inspire.</p>
<p><iframe width="560" height="349" src="http://www.youtube.com/embed/BS3QOtbW4m0?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p><iframe width="425" height="349" src="http://www.youtube.com/embed/kZvWt29OG0s?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p><iframe width="560" height="349" src="http://www.youtube.com/embed/OET8SVAGELA?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p><iframe width="560" height="349" src="http://www.youtube.com/embed/W7c3wRzUUjs?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="300" height="500" id="videoplayer.prt1" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="movie" value="http://gilscottheron.net/widget/gilscottheronalbum.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="http://gilscottheron.net/widget/gilscottheronalbum.swf" quality="high" bgcolor="#000000" width="300" height="500" name="videoplayer.prt1" align="middle" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2011/05/28/rip-gil-scott-heron/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Most Played Songs of 2010</title>
		<link>http://www.aaronblake.co.uk/blog/2011/01/01/most-played-songs-of-2010/</link>
		<comments>http://www.aaronblake.co.uk/blog/2011/01/01/most-played-songs-of-2010/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 13:35:00 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=266</guid>
		<description><![CDATA[2010 was the first year I scrobbled all the way through using last.fm. So I though it would be interesting to post what my most played songs were last year. I&#8217;m into electronic, hip-hop, dubstep, alternative and ambient, including: Lone, Flying Lotus, Daft Punk, TOKiMONSTA, Akala, Take, Mr Beatnick, Mark Ronson &#038; The Business Intl, [...]]]></description>
			<content:encoded><![CDATA[<p>2010 was the first year I scrobbled all the way through using last.fm. So I though it would be interesting to post what my most played songs were last year.</p>
<p>I&#8217;m into electronic, hip-hop, dubstep, alternative and ambient, including:<br />
Lone, Flying Lotus, Daft Punk, TOKiMONSTA, Akala, Take, Mr Beatnick, Mark Ronson &#038; The Business Intl, Dam-Funk, Röyksopp, Calvin Harris, Magnetic Man, Mylo, Wu-Tang Clan, Luke Vibert, Toddla T, Lukid, Q-Tip, Acid Washed, Chase &#038; Status, Simian Mobile Disco, Groove Armada, Friendly Fires, Michael Jackson, Teebs, Burial, Katy B, 4hero, Wagon Christ, Jurassic 5, Telonius, Prodigy, Plan B, SBTRKT, Gorillaz, Lowkey, J Dilla, Caribou, Chromeo, Pariah, M.I.A., Andreya Triana, Jamie Woon, Radiohead, Robyn, The Books, Quantic, Beck, Boards of Canada, deadmau5.</p>
<p>Check out my music taste: http://www.last.fm/user/sonicaab<br />
<span id="more-266"></span><br />
<strong>20 &#8211; Akala – Yours And My Children</strong></p>
<p>Alaka is definitely one of my favourite artists at the moment. His intellectual lyrics break from current mass commercialisation of hip-hop, creating thought provoking tunes, which challenge the status quo and give power to the people.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/xqoZ3zaMXjU?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/xqoZ3zaMXjU?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p><strong>19 &#8211; The Streets &#8211; Trust Me</strong></p>
<p>The streets new album comes out in February 2011, but Tust Me was released late last year. Great beat, clever lyrics, good music.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/dsW8J_vuAko?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/dsW8J_vuAko?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p><strong>18 &#8211; Burial – Shell of Light</strong></p>
<p>Burial is a musical genius, hands down. His style of dub-step has pushed the bounds of the genre and has inspired up and coming artists such as Jamie Woon and Pariah.</p>
<p><object height="81" width="100%"><param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F3288447"></param><param name="allowscriptaccess" value="always"></param> <embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F3288447" type="application/x-shockwave-flash" width="100%"></embed></object>  <span><a href="http://soundcloud.com/marisha/burial-shell-of-light">Burial &#8211; shell of light</a> by <a href="http://soundcloud.com/marisha">Marika kartozia</a></span> </p>
<p><strong>17 &#8211; Jamie Woon – Wayfaring Stranger (Burial mix)</strong></p>
<p>Jamie Woon finally gained commercial fame in 2010 with his song Night Air. But I&#8217;ve been listening to the Burial remix of Wayfaring Stranger for well over a year now, still one of my favourite tracks.</p>
<p><object height="81" width="100%"><param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F1734137"></param><param name="allowscriptaccess" value="always"></param> <embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F1734137" type="application/x-shockwave-flash" width="100%"></embed></object>  <span><a href="http://soundcloud.com/pempenki/jamie-woon-wayfaring-stranger-burial-mix">Jamie woon-wayfaring stranger burial mix</a> by <a href="http://soundcloud.com/pempenki">pempenki</a></span> </p>
<p><strong>16 &#8211; Katy B (featuring Ms Dynamite) – Lights On </strong></p>
<p>Katy B is my favourite female vocalist at the moment. Granted she doesn&#8217;t have the best voice in the world, however she is just so damn cool.</p>
<p>She has stuck to her roots, coming from south london and growing with underground london sounds such as funky, dubstep and dnb, her collaborations with some of the best in the business are making her one to watch for 2011.</p>
<p>Lights on also features Ms Dynamite, whom I also have big respect for. After her early rise to commercial stardom, she took a break from music. But now she is &#8220;back with vengeance&#8221; in a big way, teaming up with Dj Zinc, Redlight, Magnetic Man, and Katy B. She is another one to watch for 2011.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/cJNXXuAxkfk?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/cJNXXuAxkfk?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p><strong>15 &#8211; Robyn feat. Ryksopp – None of Dem</strong></p>
<p>Now I have to say, Robyn is an artist that confuses me. Some of her tracks sound like really commercial pop, but others sound like great dance tracks. Her collaborations with Ryksopp however are always great, so it&#8217;s no surprise None of Dem was one of my most listened to songs.</p>
<p><object height="81" width="100%"><param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F3202346"></param><param name="allowscriptaccess" value="always"></param> <embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F3202346" type="application/x-shockwave-flash" width="100%"></embed></object>  <span><a href="http://soundcloud.com/billpham/robyn-none-of-dem">Robyn &#8211; None Of Dem</a> by <a href="http://soundcloud.com/billpham">billpham</a></span> </p>
<p><strong>14 &#8211; Lukid – Veto</strong></p>
<p>Ah Lukid. 2010 continued my passion for that fresh new sound of instrumental electronic hip-hop, or future jazz, or whatever it&#8217;s called now. Pioneers such as Flying Lotus have paved the way for this exciting new sound. Still not well known outside the underground music scene, I think big things might be coming in 2011 for these artists.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/aQpDAiXEJIU?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/aQpDAiXEJIU?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p><strong>13 &#8211; Tensnake – Congolal</strong></p>
<p>The retro disco sound of Tensnake was a great summer hit of the underground electro scene in 2010. Chilled out, sweet vibes, great on a summer&#8217;s day on the beach or in the park.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/s411QbU2swg?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/s411QbU2swg?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p><strong>12 &#8211; Boards of Canada – Olson</strong></p>
<p>Boards of Canada, master&#8217;s of chillout released this song ages ago. But it caught my attention in 2010 and was a great song to just chill out and relax after a hard days work.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/2UYQqeLvHns?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2UYQqeLvHns?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><strong>11 &#8211; Daft Punk &#8211; Derezzed</strong></p>
<p>After a decade away, Daft Punk made a come back to produce the soundtrack to the Disney movie Tron Legacy. Because of this, a lot of the songs are more &#8220;background&#8221; tracks rather than propper club classics from which we&#8217;re used to from the duo. However Derezzed is a short, fast track that gets your heart racing and in the mood for some action!</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/HwCScDMw53U?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/HwCScDMw53U?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p><strong>10 &#8211; Uffie feat Pharrell Williams &#8211; ADD SUV (Armand Van Helden remix)</strong></p>
<p>Now this was one of my favourite club bangers in 2010. Straight up good party music.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/Vu13OcMJLck?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Vu13OcMJLck?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><strong>9 &#8211; Dark Sky – Something To Lose</strong></p>
<p>Now this track fuses some really cool genre&#8217;s together. Starts off with some old sckool garage, then mixes into jungle/dnb. Quality track.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/YQ0ySB3d0K4?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/YQ0ySB3d0K4?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p><strong>8 &#8211; Lone – Fly Fire Rainbow</strong></p>
<p>Lone&#8217;s trippy, uplifting vibes make his tracks great chillout music. This track is the quintessential essence of his style.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/8EKisyfHixg?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/8EKisyfHixg?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><strong>7 &#8211; Mr. Flash – Champions (TV Track)</strong></p>
<p>I was hooked to this instrumental hip-hop track throughout 2010. It just gets you pumped up for anything. A night out, a night in, a trip to the co-op, lol.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/JrUua7CIqhg?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/JrUua7CIqhg?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><strong>6 &#8211; The Count &#038; Sinden feat. Bashy &#8211; Addicted To You (Lone Remix)</strong></p>
<p>This track is sickkkkkkk!!!! Count &#038; Sinden released a brand new album in 2010, and Lone gave Addicted to you a touch of his magic to make a brilliant club track.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/Ob1u0YmxKVw?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Ob1u0YmxKVw?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><strong>5 &#8211; Flying Lotus – Do the Astral Plane</strong></p>
<p>Ah, the main man himself Flying Lotus. This guy is a genius, genre inventing, game changing artist. His sound is pathing forth the future generation of hip-hop and those in the industry know it. Lil Wayne has been spittin on some of his instrumnetals and it&#8217;s just a matter of time untill one of his tracks becomes a hit.</p>
<p>His third studio album features the tack Do the Astral Plane, which just shows off the diversity of his sound.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/yXdwb_lUKvs?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/yXdwb_lUKvs?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><strong>4 &#8211; Daedelus – Fates Say</strong></p>
<p>This song was like crack to me during the latter half of 2010. Mesmerising beat, with a slight ethnic twinge.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/z9-d1rVsLBc?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/z9-d1rVsLBc?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><strong>3 &#8211; Andreya Triana – Lost Where I Belong (Flying Lotus Remix)</strong></p>
<p>Andreya Triana is damn sexy.<br />
I could listen to her voice all day.<br />
Soulful, cultured, beautiful, she has a lot going for her. The flying lotus remix of her song Lost Where I belong just goes to show she has the right connection in the music business. I hope she does well in 2011.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/P2I2LXTjY1g?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/P2I2LXTjY1g?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><strong>2 &#8211; Acid Washed &#8211; Acid Washed (Jungle Fiction Remix)</strong></p>
<p>Now this group called Acid Washed released just 1 self named track. But the number of remixes this song has is astounding. The Jungle Fiction Remix was my favourite and was found on my playlist all too frequently in 2010.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/9fq8G4ABm3c?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9fq8G4ABm3c?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>1 &#8211; Telonius – Disco-Tec (Moulinex Remix)</p>
<p>2010 was the year I fell in love with electro.<br />
Of all the other genre&#8217;s of music I love, I never really gave enough time or attention to electro. Last year that changes, and one of my favourite tracks was the remix of Disco-Tec by Moulinex.</p>
<p>Enjoy and happy 2011!!</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/ZJRZN5e9AzY?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ZJRZN5e9AzY?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2011/01/01/most-played-songs-of-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Count in XSLT</title>
		<link>http://www.aaronblake.co.uk/blog/2010/06/12/count-in-xslt/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/06/12/count-in-xslt/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 16:46:48 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=263</guid>
		<description><![CDATA[Hot to perform a count in XSLT: More than 0 nodes exist in items.]]></description>
			<content:encoded><![CDATA[<p>Hot to perform a count in XSLT:</p>
<pre class="brush:xml">
                    <xsl:if test="count($items) &gt; 0">
                        More than 0 nodes exist in items.
                    </xsl:if>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/06/12/count-in-xslt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get ID of Sitecore Item using XSLT</title>
		<link>http://www.aaronblake.co.uk/blog/2010/06/12/get-id-of-sitecore-item-using-xslt/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/06/12/get-id-of-sitecore-item-using-xslt/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 16:45:20 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=260</guid>
		<description><![CDATA[How to get the id of a sitecore item in XSLT: OR]]></description>
			<content:encoded><![CDATA[<p>How to get the id of a sitecore item in XSLT:</p>
<pre class="brush:xml">
<sc:text field="@id"/>
</pre>
<p>OR</p>
<pre class="brush:xml">
<xsl:value-of select="sc:fld('@id',.)"/>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/06/12/get-id-of-sitecore-item-using-xslt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitecore nav using XSLT</title>
		<link>http://www.aaronblake.co.uk/blog/2010/06/12/sitecore-nav-using-xslt/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/06/12/sitecore-nav-using-xslt/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 16:43:19 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=258</guid>
		<description><![CDATA[How to create a multi level navigation menu from sitecore items: active]]></description>
			<content:encoded><![CDATA[<p>How to create a multi level navigation menu from sitecore items:</p>
<pre class="brush:xml">
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sc="http://www.sitecore.net/sc" xmlns:dot="http://www.sitecore.net/dot" exclude-result-prefixes="dot sc">

  <!-- output directives -->
  <xsl:output method="html" indent="no" encoding="UTF-8" />

  <!-- parameters -->
  <xsl:param name="lang" select="'en'"/>
  <xsl:param name="id" select="''"/>
  <xsl:param name="sc_item"/>
  <xsl:param name="sc_currentitem"/>

  <!-- entry point -->
  <xsl:template match="*">
    <xsl:apply-templates select="$sc_item" mode="main"/>
  </xsl:template>

  <!--==============================================================-->
  <!-- main                                                         -->
  <!--==============================================================-->
  <xsl:template match="*" mode="main">
<ul class="sub-navigation">
        <xsl:apply-templates select="ancestor-or-self::item[@template='home']" mode="menutree" >
            <xsl:with-param name="depth" select="0"/>
        </xsl:apply-templates>
    </ul>

  </xsl:template>

    <xsl:template match="item" mode="menutree">
        <xsl:param name="depth"/>
        <!-- only show level 2 and 3-->
        <xsl:if test="$depth &lt; 3">
            <xsl:for-each select="child::item">
<li>
                <xsl:choose>
                    <xsl:when test="count(descendant-or-self::item[@id = $sc_item/@id]) > 0">
                            <xsl:apply-templates select="." mode="recursive">
                                <xsl:with-param name="class">active</xsl:with-param>
                            </xsl:apply-templates>
                            <!-- check if the current item, or one of its descendants, is selected -->
                            <xsl:if test="count(descendant::item) > 0 and $depth &lt; 2">
<ul>
                                    <xsl:apply-templates select="." mode="menutree" >
                                        <xsl:with-param name="depth" select="$depth+1"/>
                                    </xsl:apply-templates>
                                </ul>

                            </xsl:if>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:apply-templates select="." mode="recursive"/>
                    </xsl:otherwise>
                </xsl:choose>
                  </li>

            </xsl:for-each>
        </xsl:if>
    </xsl:template>

    <xsl:template match="item" mode="recursive">
        <xsl:param name="class" />
            <sc:link select="." text="{sc:field('MenuTitle', .)}" class="{$class}"/>
    </xsl:template>

</xsl:stylesheet>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/06/12/sitecore-nav-using-xslt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check odd or even number in XSLT</title>
		<link>http://www.aaronblake.co.uk/blog/2010/06/12/check-odd-or-even-number-in-xslt/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/06/12/check-odd-or-even-number-in-xslt/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 16:40:43 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=256</guid>
		<description><![CDATA[How to find out if a number is odd or even in XSLT: position() mod 2 Example usage: Odd number Even number]]></description>
			<content:encoded><![CDATA[<p>How to find out if a number is odd or even in XSLT:</p>
<p>position() mod 2</p>
<p><strong>Example usage:</strong></p>
<pre class="brush:xml">
                        <xsl:for-each select="$array">
                            <xsl:choose>
                                <xsl:when test="position() mod 2">
                                    Odd number
                                </xsl:when>
                                <xsl:otherwise>
                                    Even number
                                </xsl:otherwise>
                            </xsl:choose>
                        </xsl:for-each>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/06/12/check-odd-or-even-number-in-xslt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitecore Exceptions TicketParseException</title>
		<link>http://www.aaronblake.co.uk/blog/2010/06/12/sitecore-exceptions-ticketparseexception/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/06/12/sitecore-exceptions-ticketparseexception/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 16:36:50 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Sitecore]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=254</guid>
		<description><![CDATA[Q: When I perform a logout (log in) I got this error: Server Error in &#8216;/&#8217; Application. 924D3DEEAC964880B38A9F4D4B664511^TestUser^123^123^20071011T161646 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: Sitecore.Exceptions.TicketParseException: 924D3DEEAC964880B38A9F4D4B664511^akom^123^321^20071011T161646 &#8230; Why [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q: </strong>When I perform a logout (log in) I got this error:</p>
<p>Server Error in &#8216;/&#8217; Application.</p>
<p>924D3DEEAC964880B38A9F4D4B664511^TestUser^123^123^20071011T161646</p>
<p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.<br />
Exception Details: Sitecore.Exceptions.TicketParseException: 924D3DEEAC964880B38A9F4D4B664511^akom^123^321^20071011T161646<br />
&#8230;</p>
<p>Why is this happening?</p>
<p><strong>A:</strong> These characters “^” and “|” can’t be used in the name of the user and the password.</p>
<p><strong>Reference:</strong><br />
<a href="http://sdn.sitecore.net/Scrapbook/Illegal%20characters%20in%20the%20name%20of%20the%20user%20and%20the%20password.aspx">http://sdn.sitecore.net/Scrapbook/Illegal%20characters%20in%20the%20name%20of%20the%20user%20and%20the%20password.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/06/12/sitecore-exceptions-ticketparseexception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitecore Item Renamed Event does not provide item name before renaming.</title>
		<link>http://www.aaronblake.co.uk/blog/2010/05/29/sitecore-item-renamed-event-does-not-provide-item-name-before-renaming/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/05/29/sitecore-item-renamed-event-does-not-provide-item-name-before-renaming/#comments</comments>
		<pubDate>Sat, 29 May 2010 22:28:33 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Sitecore]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=251</guid>
		<description><![CDATA[According to Sitecore documentation the item:renamed event arguments should provide you with the result item and the item name before renaming. item:renamed 0 Item Result item 1 String Item name before renaming Unfortunately in practice the second value is actually the current item name, and not the previous name. This bug presents a massive problem [...]]]></description>
			<content:encoded><![CDATA[<p>According to Sitecore <a href="http://sdn.sitecore.net/Articles/API/Using%20Events/Handling%20Events.aspx">documentation</a> the item:renamed event arguments should provide you with the result item and the item name before renaming.</p>
<p>item:renamed<br />
0<br />
Item<br />
Result item</p>
<p>1<br />
String<br />
Item name before renaming</p>
<p>Unfortunately in practice the second value is actually the current item name, and not the previous name.</p>
<p>This bug presents a massive problem if you require the previous name.</p>
<p>Fortunately I found a way around this.<br />
By using the Sitecore history engine, you can work out what the previous name was.</p>
<p><strong>Solution:</strong></p>
<pre class="brush:csharp">
        protected void OnItemRename(object sender, EventArgs args)
        {
            var itm = Event.ExtractParameter(args, 0) as Sitecore.Data.Items.Item;

            if (itm == null)
            {
                return;
            }

            var history = itm.Database.Engines.HistoryEngine.GetHistory(DateTime.UtcNow.AddDays(-1), DateTime.UtcNow.AddDays(1));

            if (history.Count < 1)
            {
                return;
            }

            var oldEntity = GetOldEntity(itm.ID.Guid, itm.Paths.Path, history);

            var oldName = GetOldName(oldEntity.ItemPath);
        }
</pre>
<pre class="brush:csharp">
        ///
<summary>
        /// Uses the history engine to retrieve the last entry with a different path from the target item.
        /// </summary>

        ///
<param name="itemId">
        /// The item id.
        /// </param>
        ///
<param name="itemPath">
        /// The item path.
        /// </param>
        ///
<param name="history">
        /// The history.
        /// </param>
        /// <returns>
        /// History Entity
        /// </returns>
        public static HistoryEntry GetOldEntity(Guid itemId, string itemPath, HistoryEntryCollection history)
        {
            var oldEntities = from h in history
                              orderby h.Created descending
                              where h.ItemId.Guid.Equals(itemId) &#038;&#038; (!h.ItemPath.Equals(itemPath))
                              select h;

            return oldEntities.Count() < 1 ? null : oldEntities.First();
        }

        ///
<summary>
        /// Gets the old item name
        /// </summary>

        ///
<param name="oldItemPath">
        /// The old item path.
        /// </param>
        /// <returns>
        /// The old item name
        /// </returns>
        public static string GetOldName(string oldItemPath)
        {
            return oldItemPath.Substring(
                (oldItemPath.LastIndexOf("/", StringComparison.CurrentCulture) + 1),
                (oldItemPath.Length - oldItemPath.LastIndexOf("/", StringComparison.CurrentCulture) - 1));
        }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/05/29/sitecore-item-renamed-event-does-not-provide-item-name-before-renaming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Telerik RadGrid events not firing in Sitecore</title>
		<link>http://www.aaronblake.co.uk/blog/2010/05/29/telerik-radgrid-events-not-firing-in-sitecore/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/05/29/telerik-radgrid-events-not-firing-in-sitecore/#comments</comments>
		<pubDate>Sat, 29 May 2010 22:19:57 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Sitecore]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=243</guid>
		<description><![CDATA[I recently had to use a Telerik RadGrid during the development of an admin page within a sitecore site. The error: Sitecore&#8217;s event handlers conflict with RadGrid, which causes sorting, filtering, editing and deleting to fail. I kept receiving a bank page every time an event fired, as if it lost the datasource. The solution: [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to use a Telerik RadGrid during the development of an admin page within a sitecore site.</p>
<p><strong>The error:</strong></p>
<p>Sitecore&#8217;s event handlers conflict with RadGrid, which causes sorting, filtering, editing and deleting to fail.<br />
I kept receiving a bank page every time an event fired, as if it lost the datasource.</p>
<p><strong>The solution:</strong></p>
<p>The solution to this problem is to exclude the controls from Sitecore&#8217;s event handlers.<br />
You can do this very easily by updating the following section in the Sitecore web.config:</p>
<pre class="brush:text">
  <!-- RENDERING -->
    <rendering>
      <typesThatShouldNotBeExpanded>
        <type>System.Web.UI.WebControls.Repeater</type>
        <type>System.Web.UI.WebControls.DataList</type>
        <type>System.Web.UI.WebControls.GridView</type>
        <type>Telerik.Web.UI.RadGrid</type>
      </typesThatShouldNotBeExpanded>
    </rendering>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/05/29/telerik-radgrid-events-not-firing-in-sitecore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitecore – CryptographicException file not found</title>
		<link>http://www.aaronblake.co.uk/blog/2010/05/29/sitecore-cryptographicexception-file-not-found/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/05/29/sitecore-cryptographicexception-file-not-found/#comments</comments>
		<pubDate>Sat, 29 May 2010 22:18:08 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[error]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=241</guid>
		<description><![CDATA[After installing a new instance of Sitecore manually, I kept receiving the following error: CryptographicException file not found Server Error in &#8216;/&#8217; Application. The system cannot find the file specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and [...]]]></description>
			<content:encoded><![CDATA[<p>After installing a new instance of Sitecore manually, I kept receiving the following error:</p>
<blockquote><p>
CryptographicException file not found</p>
<p>Server Error in &#8216;/&#8217; Application.<br />
The system cannot find the file specified. </p>
<p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.<br />
Exception Details: System.Security.Cryptography.CryptographicException: The system cannot find the file specified.<br />
Source Error:<br />
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</p>
<p>Stack Trace:</p>
<p>[CryptographicException: The system cannot find the file specified.<br />
]<br />
   System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) +7715070<br />
   System.Security.Cryptography.DSACryptoServiceProvider.ImportParameters(DSAParameters parameters) +258<br />
   System.Security.Cryptography.DSA.FromXmlString(String xmlString) +501<br />
   Sitecore.Nexus.Licensing.NexusLicenseApi.(String xml, Guid instance) +124<br />
   Sitecore.Nexus.Licensing.NexusLicenseApi.GetSnapShot(Guid instance) +683<br />
   Sitecore.SecurityModel.License.LicenseManager.GetSnapshotData(Guid instance) +47<br />
   Sitecore.SecurityModel.License.LicenseManager.UpdateSnapshot() +70<br />
   Sitecore.SecurityModel.License.LicenseManager.Initialize() +8<br />
   Sitecore.Nexus.Web.HttpModule.Application_Start() +76<br />
   Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +435<br />
   System.Web.HttpApplication.InitModulesCommon() +65<br />
   System.Web.HttpApplication.InitModules() +43<br />
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729<br />
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298<br />
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107<br />
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289</p>
<p>Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
</p></blockquote>
<p>This random error is actually being caused by the IIS application pool not being configured to run using a non-standard user account Identity.</p>
<p><strong>The solution:</strong></p>
<p>To solve the problem, set Load User Profile to true for the website application pool in IIS.</p>
<ol>
<li>Open IIS Manager</li>
<li>Click on Application Pools on the right.</li>
<li>Right Click on the application pool for your web site and select &#8220;Advanced Settings&#8221;</li>
<li>In the Process Model section, set Load User Profile to true.</li>
</ol>
<p><strong>References:</strong></p>
<p><a href="http://www.realnero.info/2010/04/sitecore-cryptographicexception-file.html">http://www.realnero.info/2010/04/sitecore-cryptographicexception-file.html</a><br />
<a href="http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/ChangeLog.aspx">http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/ChangeLog.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/05/29/sitecore-cryptographicexception-file-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validate Sitecore Item Programmatically</title>
		<link>http://www.aaronblake.co.uk/blog/2010/05/29/validate-sitecore-item-programmatically/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/05/29/validate-sitecore-item-programmatically/#comments</comments>
		<pubDate>Sat, 29 May 2010 22:12:54 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[validate sitecore item fields]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=239</guid>
		<description><![CDATA[I was developing an event handler that needed to check if the fields in a Sitecore item were valid before continuing with the event. I thought Sitecore items might have a property such as: item.Validation.IsValid But this isn&#8217;t the case. To check if an item is valid, I created a custom function called ValidateItemFields that [...]]]></description>
			<content:encoded><![CDATA[<p>I was developing an event handler that needed to check if the fields in a Sitecore item were valid before continuing with the event.<br />
I thought Sitecore items might have a property such as:<br />
<code>item.Validation.IsValid</code></p>
<p>But this isn&#8217;t the case. To check if an item is valid, I created a custom function called ValidateItemFields that works in an item event handler.</p>
<p>Solution:</p>
<pre class="brush:csharp">
        ///
<summary>
        /// Validates all fields in item.
        /// </summary>

        ///
<param name="item">
        /// The item to be validated.
        /// </param>
        /// <returns>
        /// True if all fields are valid.
        /// </returns>
        private static bool ValidateItemFields(Item item)
        {
            if (((item != null) &#038;&#038; !item.Paths.IsMasterPart) &#038;&#038; !StandardValuesManager.IsStandardValuesHolder(item))
            {
                item.Fields.ReadAll();
                item.Fields.Sort();
                foreach (Field field in item.Fields)
                {
                    if (!string.IsNullOrEmpty(field.Validation) &#038;&#038; !Regex.IsMatch(field.Value, field.Validation, RegexOptions.Singleline))
                    {
                        return false;
                    }
                }

                var formValue = WebUtil.GetFormValue("scValidatorsKey");
                if (!string.IsNullOrEmpty(formValue))
                {
                    var validators = ValidatorManager.GetValidators(ValidatorsMode.ValidatorBar, formValue);
                    var options = new ValidatorOptions(true);
                    ValidatorManager.Validate(validators, options);
                    var valid = ValidatorResult.Valid;
                    foreach (BaseValidator validator in validators)
                    {
                        var result = validator.Result;
                        if (validator.ItemUri != null)
                        {
                            var item1 = Client.ContentDatabase.GetItem(validator.ItemUri.ToDataUri());
                            if (((item1 != null) &#038;&#038; StandardValuesManager.IsStandardValuesHolder(item1)) &#038;&#038; (result > ValidatorResult.CriticalError))
                            {
                                result = ValidatorResult.CriticalError;
                            }
                        }

                        if (result > valid)
                        {
                            valid = validator.Result;
                        }

                        if (validator.IsEvaluating &#038;&#038; (validator.MaxValidatorResult >= ValidatorResult.CriticalError))
                        {
                            return false;
                        }
                    }

                    switch (valid)
                    {
                        case ValidatorResult.CriticalError:
                            return false;

                        case ValidatorResult.FatalError:
                            return false;
                    }
                }
            }

            return true;
        }
</pre>
<p>Example:</p>
<pre class="brush:csharp">
///
<summary>
        /// On Item Moving event handler for ImportArticle Items
        /// </summary>

        ///
<param name="sender">
        /// The sender object.
        /// </param>
        ///
<param name="args">
        /// The args.
        /// 0 - Item being moved
        /// 1 - Move destination
        /// </param>
        public void OnItemMoving(object sender, EventArgs args)
        {
            var item = Event.ExtractParameter(args, 0) as Item;
            if (item == null)
            {
                return;
            }

            // Check item type is ImportArticle
            if (!item.Template.Name.Equals(TemplateName))
            {
                return;
            }

            // If ancestor is a child of Content Node, then return
            if (item.Axes.GetAncestors().Any(ancestor => ancestor.Paths.Path.Equals(ContentItemPath)))
            {
                return;
            }

            // If item is valid, return
            if (ValidateItemFields(item))
            {
                return;
            }

            SheerResponse.Alert(ErrorMessage, new string[0]);
            ((SitecoreEventArgs)args).Result.Cancel = true;
        }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/05/29/validate-sitecore-item-programmatically/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Pyramid of the Capitalist System</title>
		<link>http://www.aaronblake.co.uk/blog/2010/03/08/the-pyramid-of-the-capitalist-system/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/03/08/the-pyramid-of-the-capitalist-system/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 22:57:21 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[philosophy]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[capitalism]]></category>
		<category><![CDATA[pyramid scheme]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=234</guid>
		<description><![CDATA[The American Dream is based on the belief that anyone can become wealthy by working hard. Alas this is only a dream, the truth is capitalism works just like any other pyramid scheme, where the few winners gain at the expense of the mass of losers. Just take a look at the people that work [...]]]></description>
			<content:encoded><![CDATA[<p>The American Dream is based on the belief that anyone can become wealthy by working hard. Alas this is only a dream, the truth is capitalism works just like any other pyramid scheme, where the few winners gain at the expense of the mass of losers.</p>
<p>Just take a look at the people that work the hardest today, nurses, cleaners, factory workers, firemen the list goes on. If the American Dream was true, then these people should be the thriving. But instead its the people who do the least work such as land owners, bankers and shareholders, getting rich through rents, investments and exploiting the poor&#8217;s debt.</p>
<div id="attachment_235" class="wp-caption alignnone" style="width: 252px"><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2010/03/Pyramid_of_Capitalist_System.png"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2010/03/Pyramid_of_Capitalist_System-242x300.png" alt="Pyramid of the Capitalist System (IWW)" title="Pyramid_of_Capitalist_System" width="242" height="300" class="size-medium wp-image-235" /></a><p class="wp-caption-text">Pyramid of the Capitalist System</p></div>
<p>The IWW (Industrial Workers of the World), produced a classic poster depicting the capitalist pyramid scheme, showing all the instruments the capitalist uses to control the masses.</p>
<div id="attachment_236" class="wp-caption alignnone" style="width: 179px"><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2010/03/newcapitalistpyramidnt1.jpeg"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2010/03/newcapitalistpyramidnt1-169x300.jpg" alt="Modern Pyramid of the Capitalist System" title="newcapitalistpyramidnt1" width="169" height="300" class="size-medium wp-image-236" /></a><p class="wp-caption-text">Modern Pyramid of the Capitalist System</p></div>
<p>I discovered a more recent version on <a href="http://francoistremblay.wordpress.com/2008/08/19/the-pyramid-of-the-capitalist-system/">Francois Tremblay&#8217;s blog</a>, which is more relevant to how the Capitalist Pyramid scheme functions today.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/03/08/the-pyramid-of-the-capitalist-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Duplicate Namespace Problem</title>
		<link>http://www.aaronblake.co.uk/blog/2010/02/27/duplicate-namespace-problem/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/02/27/duplicate-namespace-problem/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 12:58:26 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[ASP.net]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=232</guid>
		<description><![CDATA[Today I cam across an annoying Namespace issue, which I spent ages trying to solve. If you have a namespace which has the same name as another namespace but at a different level, .net won&#8217;t know which namespace to use, and will through an error. This is also true for classes as well. Example: namespace [...]]]></description>
			<content:encoded><![CDATA[<p>Today I cam across an annoying Namespace issue, which I spent ages trying to solve.</p>
<p>If you have a namespace which has the same name as another namespace but at a different level, .net won&#8217;t know which namespace to use, and will through an error.</p>
<p>This is also true for classes as well.</p>
<p>Example:<br />
<code><br />
namespace Zone.Section<br />
{<br />
    public class ShowZone{}<br />
}<br />
</code><br />
<code><br />
using Zone.Section</p>
<p>namespace Website.Zone<br />
{</p>
<p>    public class Page<br />
    {<br />
        void Load()<br />
        {<br />
            Zone.Section.ShowZone();<br />
        }</p>
<p>    }</p>
<p>}<br />
</code><br />
Now the example above will not compile, because .net can only see the Zone for Website.Zone, and not Zone.Section.</p>
<p>This problem usually occurs if you haven&#8217;t organised your namespaces properly, or is you have inherited code form various sources.</p>
<p>The solution</p>
<p>To get this code to work, you need to use the global prefix, and define the &#8220;using&#8221; (or Imports in vb.net) within the namespace.</p>
<p>For example:<br />
<code><br />
using Zone.Section</p>
<p>namespace Website.Zone<br />
{<br />
    using Zone = global::Zone;</p>
<p>    public class Page<br />
    {<br />
        void Load()<br />
        {<br />
            Zone.Section.ShowZone();<br />
        }</p>
<p>    }</p>
<p>}</code></p>
<p>OR<br />
<code><br />
namespace Website.Zone<br />
{</p>
<p>    public class Page<br />
    {<br />
        void Load()<br />
        {<br />
            global::Zone.Section.ShowZone();<br />
        }</p>
<p>    }</p>
<p>}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/02/27/duplicate-namespace-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Legalised Exploitation – Stocks and Shares</title>
		<link>http://www.aaronblake.co.uk/blog/2010/01/24/legalised-exploitation-stocks-and-shares/</link>
		<comments>http://www.aaronblake.co.uk/blog/2010/01/24/legalised-exploitation-stocks-and-shares/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 22:58:51 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[philosophy]]></category>
		<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=207</guid>
		<description><![CDATA[The idea of owning a business is a ingrained part of our society, however the organisation of business today is a legalised form of exploitation which make the poor poorer and the rich richer. If the business is created by more than one person, then those people share the profits of the business in a [...]]]></description>
			<content:encoded><![CDATA[<p>The idea of owning a business is a ingrained part of our society, however the organisation of business today is a legalised form of exploitation which make the poor poorer and the rich richer.</p>
<p>If the business is created by more than one person, then those people share the profits of the business in a partnership.</p>
<p>After the setup of the business, any new workers that join the business are not usually entitled to any profit generated, only their wage which is set by the employer.</p>
<p>This is were the problem starts.</p>
<p>Workers are <strong>exploited</strong> by their employers whom benefit entirely from the profits created from their labour. This is a form of <strong>unearned income</strong>, which is the process of those with capital controlling the means of production to extort capital from the workers.</p>
<p>This is the system of capitalism, which dominates the world today.</p>
<p>In small to medium sized business, where the owners of the business are usually also employees within the business; the owners primary motivation is profit, but because they are also employees they usually care about the well being of the workers and the social responsibility of the business.</p>
<p>As the business grows and the founders have extorted a significant amount of capital from the workers, they often retire and live entirely off there capital generated by the workers labour.</p>
<p>Because the workers never get their rightful share of the profits, the amount of capital they can save to start their own business is limited, and ultimately they would have to find wealthy investors to finance their own business.</p>
<p>Investors give capital to entrepreneurs, and in return they want a <strong>share</strong> of the ownership of the business, and a share of the profits.</p>
<p>This reduces the share of the profits the founder of the business recieves, so they are encouraged to reduce the pay and working conditions of the workers to compensate, exploiting the workers even more.</p>
<p>To generate more unearned income, the wealthy elite (Bourgeoisie) encourage a &#8220;free market&#8221; where they can invest money in all different types of companies and exploit workers to fund their extravagant lifestyle.</p>
<p>The ultimate form of capitalism is slavery, where the the owners of the plantations also owned the workers, and extorted the maximum amount of profit, becoming incredibly rich and powerful.</p>
<p>This is why today some countries are rich and some are poor. The poor countries were the ones where the workers were exploited and enslaved, and the rich countries are the ones which did the exploiting using brute force and barbarian tactics.</p>
<p><strong>What&#8217;s the alternative?</strong></p>
<p>The alternative to the exploitative business model are co-operatives.</p>
<p>In a co-operative, the workers and consumers all own the business, which means they get to share equally in the profits the business makes, and have full control over how it is run.</p>
<p>This benefits the workers, because they receive better pay and working conditions. It benefits consumers, because they get products they need. It benefits the wider community because business decisions made will take into consideration the needs of the community and the effects the business has on society &#8211; making it possible reduce carbon emissions, promote fair trade and invest in community projects.</p>
<p>These types of businesses already exist, so you can make a difference today by trying to purchase from them whenever you can.</p>
<ul>
<li><a href="http://www.co-operative.coop/" target="_blank">The Co-Operative Group</a></li>
<li><a href="http://www.johnlewis.com/" target="_blank">John Lewis Partnership</a></li>
</ul>
<p>Further reading:<br />
<a href="http://s2be.org/economicevils.php" target="_blank">What&#8217;s the Problem With Unearned Income?</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2010/01/24/legalised-exploitation-stocks-and-shares/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cuyahoga – How to publish from source.</title>
		<link>http://www.aaronblake.co.uk/blog/2009/10/01/cuyahoga-how-to-publish-from-source/</link>
		<comments>http://www.aaronblake.co.uk/blog/2009/10/01/cuyahoga-how-to-publish-from-source/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 08:09:49 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[Cuyahoga]]></category>
		<category><![CDATA[publish]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=171</guid>
		<description><![CDATA[Introduction Publishing a Cuyahoga site from the source code using visual studio will not work using the in built publishing tools alone. You need to take a few additional steps. Please note I used Visual Studio 2008 to create this tutorial. The steps may differ slightly in different versions. 1. Rebuild solution Rebuild the entire [...]]]></description>
			<content:encoded><![CDATA[<p>Introduction</p>
<p>Publishing a Cuyahoga site from the source code using visual studio will not work using the in built publishing tools alone. You need to take a few additional steps.</p>
<p>Please note I used Visual Studio 2008 to create this tutorial. The steps may differ slightly in different versions.</p>
<p>1. Rebuild solution</p>
<p>Rebuild the entire solution to make sure everything is up to date.<br />
Also make sure all your modules have been added to the Modules folder of the Web project successfully.</p>
<p>2. Publish Cuyahoga.Web project</p>
<p>Publish the web project by selecting from the menu:</p>
<ul>
<li>Select the Cuyahoga.Web project in the solution explorer.</li>
<li>Select Build from the menu bar.</li>
<li>Select Publish Cuyahoga.Web.</li>
<li>In the Publish dialog:
<ul>
<li>Select a target location for the published site.</li>
<li>Select &#8220;Delete all existing files prior to publish&#8221; for a clean install.</li>
<li>Select &#8220;Only files needed to run this application.&#8221;</li>
<li>Select Publish button.</li>
</ul>
</li>
</ul>
<p>3. Add module files to published site.</p>
<p>You need to copy the modules folder from you Cuyahoga.Web project, over to your published site manually.<br />
If there is nothing in your Cuyahoga.Web modules folder, you probably didn&#8217;t rebuild the solution properly, so go back and repeat step 1.</p>
<p>4. Deploy</p>
<p>Your site is now fully compiled and ready to deploy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2009/10/01/cuyahoga-how-to-publish-from-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cuyahoga: How to change the admin template</title>
		<link>http://www.aaronblake.co.uk/blog/2009/09/30/cuyahoga-how-to-change-the-admin-template/</link>
		<comments>http://www.aaronblake.co.uk/blog/2009/09/30/cuyahoga-how-to-change-the-admin-template/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 10:49:57 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[Cuyahoga]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=162</guid>
		<description><![CDATA[Introduction It didn&#8217;t seem obvious to me at first how to change the appearance of the Cuyahoga admin template, so I thought I&#8217;d create a simple guide to point you in the right direction. Web Config The web config within the admin folder of your Cuyahoga site is where you can find the template settings. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>It didn&#8217;t seem obvious to me at first how to change the appearance of the Cuyahoga admin template, so I thought I&#8217;d create a simple guide to point you in the right direction.</p>
<p><strong>Web Config</strong></p>
<div id="attachment_177" class="wp-caption alignnone" style="width: 743px"><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AdminWebConfig1.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AdminWebConfig1.JPG" alt="Cuyahoga Admin Web Config" title="c_AdminWebConfig" width="733" height="882" class="size-full wp-image-177" /></a><p class="wp-caption-text">Cuyahoga Admin Web Config</p></div>
<p>The web config within the admin folder of your Cuyahoga site is where you can find the template settings.<br />
/Admin/Web.config</p>
<pre class="brush:xml">
&lt;appSettings&gt; &lt;add key=&quot;TemplateDir&quot; value=&quot;~/Admin/Controls/&quot; /&gt; &lt;add
    key=&quot;DefaultTemplate&quot; value=&quot;AdminTemplate.ascx&quot; /&gt; &lt;add key=&quot;DefaultCss&quot;
    value=&quot;~/Admin/Css/Admin.css&quot; /&gt; &lt;add key=&quot;DefaultTitle&quot; value=&quot;Cuyahoga Site
    Administration&quot; /&gt; &lt;/appSettings&gt;
</pre>
<p>Template directory</p>
<p>Set this to the directory that contains the template you want to use for the admin section.</p>
<p>Default template</p>
<p>Set this to the template file you wish to use as the default admin template. Note that this file must reside within the template directory.</p>
<p>Default CSS</p>
<p>Set the default CSS file to be used by the template.</p>
<p>Default Title</p>
<p>Set the default page title use for the admin section.</p>
<p>Conclusion</p>
<p>Its probably best to make a copy of the standard AdminTemplate.ascx template, then edit this to fix your design if your new to using templates in Cuyahoga.</p>
<p>But the system is flexible enough to allow you to create your own templates from scratch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2009/09/30/cuyahoga-how-to-change-the-admin-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cuyahoga: How to create a module tutorial</title>
		<link>http://www.aaronblake.co.uk/blog/2009/09/30/cuyahoga-how-to-create-a-module-tutorial/</link>
		<comments>http://www.aaronblake.co.uk/blog/2009/09/30/cuyahoga-how-to-create-a-module-tutorial/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 10:05:13 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[Cuyahoga]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=149</guid>
		<description><![CDATA[Introduction This tutorial shows you how to create a simple module for the open source CMS Cuyahoga. Visual studio 2008 was used to create this example, but it should also work in Visual Studio 2005 with the SP1 upgrade. Supporting documents: Cuyahoga.Modules.Sample Files VB.net PDF tutorial 1. Download Cuyahoga source You can download the latest [...]]]></description>
			<content:encoded><![CDATA[<p>Introduction</p>
<p>This tutorial shows you how to create a simple module for the open source CMS Cuyahoga.<br />
Visual studio 2008 was used to create this example, but it should also work in Visual Studio 2005 with the SP1 upgrade.</p>
<p>Supporting documents:<br />
<a href='http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/Cuyahoga.Modules.Sample.zip'>Cuyahoga.Modules.Sample Files VB.net</a><br />
<a href='http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/Cuyahoga_How_to_create_a_module_tutorial.pdf'>PDF tutorial</a></p>
<p>1. Download Cuyahoga source</p>
<p>You can download the latest version here:<br />
<a href="http://sourceforge.net/projects/cuyahoga/files/">http://sourceforge.net/projects/cuyahoga/files/</a></p>
<p>2. Install and run site</p>
<p>Set up a sample site or use your current Cuyahoga site.</p>
<p>3. Open the Cuyahoga solution in visual studio.</p>
<p>4. Add a new web application project to the solution.</p>
<p>Name the project using the following standard: Cuyahoga.Modules.<add module name here><br />
<div id="attachment_184" class="wp-caption alignnone" style="width: 687px"><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AddProject1.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AddProject1.JPG" alt="Add Project" title="Add Project" width="677" height="684" class="size-full wp-image-184" /></a><p class="wp-caption-text">Add Project</p></div><br />
<div id="attachment_180" class="wp-caption alignnone" style="width: 693px"><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AddWebProject.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AddWebProject.JPG" alt="Add Web Project" title="c_AddWebProject" width="683" height="447" class="size-full wp-image-180" /></a><p class="wp-caption-text">Add Web Project</p></div><br />
5. Delete all files currently in the project.</p>
<p>6. Add directories</p>
<p>Add the following directories to your project:<br />
Web<br />
Install<br />
Install/Database<br />
Install/Database/mssql2000<br />
<div id="attachment_186" class="wp-caption alignnone" style="width: 239px"><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AddFolders.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AddFolders.JPG" alt="Add Folders" title="Add Folders" width="229" height="384" class="size-full wp-image-186" /></a><p class="wp-caption-text">Add Folders</p></div></p>
<p>7. Add post build events.</p>
<p>Edit and then add the following post build events to your project properties:</p>
<pre class="brush:text">
xcopy /s /y "$(ProjectDir)"Web\*.as?x "$(SolutionDir)"Web\Modules\Sample\
xcopy /s /y "$(ProjectDir)"Install\Database\*.sql "$(SolutionDir)"Web\Modules\Sample\Install\Database\
xcopy /s /y "$(TargetDir)"Cuyahoga.Modules.Sample*.dll "$(SolutionDir)"Web\bin\
</pre>
<p>You can find the post build events window by going to:<br />
Open Project Properties<br />
<div id="attachment_187" class="wp-caption alignnone" style="width: 588px"><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_GotoProjectProperties.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_GotoProjectProperties.JPG" alt="Go to Project Properties" title="Go to Project Properties" width="578" height="845" class="size-full wp-image-187" /></a><p class="wp-caption-text">Go to Project Properties</p></div><br />
Click the Compile tab<br />
<div id="attachment_188" class="wp-caption alignnone" style="width: 808px"><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_Properties.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_Properties.JPG" alt="Properties Compile" title="Properties Compile" width="798" height="780" class="size-full wp-image-188" /></a><p class="wp-caption-text">Properties Compile</p></div><br />
Click the build events button<br />
<div id="attachment_189" class="wp-caption alignnone" style="width: 808px"><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_BuildEvents.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_BuildEvents.JPG" alt="Build Events" title="Build Events" width="798" height="778" class="size-full wp-image-189" /></a><p class="wp-caption-text">Build Events</p></div></p>
<p>If your using a different version of visual studio, the build events window might be a tab in the project properties window.</p>
<p>8. Add project references.</p>
<p>You will need to add at least the following two project references:<br />
Cuyahoga.Core<br />
Cuyahoga.Web</p>
<p>To add a project reference, right click on the project in the solution explorer and the select add reference.<br />
<div id="attachment_190" class="wp-caption alignnone" style="width: 486px"><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AddRef.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AddRef.JPG" alt="Add project reference" title="Add project reference" width="476" height="844" class="size-full wp-image-190" /></a><p class="wp-caption-text">Add project reference</p></div><br />
In the add reference dialogue, navigate to the project tab and select the project you wish to add.<br />
<div id="attachment_191" class="wp-caption alignnone" style="width: 477px"><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AddReffDialog.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_AddReffDialog.JPG" alt="Add reference" title="Add reference" width="467" height="390" class="size-full wp-image-191" /></a><p class="wp-caption-text">Add reference</p></div></p>
<p>9. Create the module controller.</p>
<p>Create a new class in the root of your module project called <add module name here>Module.<br />
For example &#8211; SampleModule<br />
<a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_SampleModule.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_SampleModule.JPG" alt="Sample Module" title="Sample Module" width="701" height="478" class="alignnone size-full wp-image-193" /></a><br />
Add the following code to your class, remember to change SampleModule for the name of your module.</p>
<p>C#</p>
<pre class="brush:csharp">
using System;
using Cuyahoga.Core.Domain;

Namespace Cuyahoga.Modules.Sample
{
    ///
<summary>
    /// Controller class of the module
    /// </summary>

    class SampleModule: ModuleBase
    {
        ///
<summary>
        /// Controller constructor
        /// </summary>

        Public SampleModule()
        {
            //nothing in the constructor for this basic sample
        }
    }
}
</pre>
<p>VB.net</p>
<pre class="brush:vbnet">
Imports System
Imports Cuyahoga.Core.Domain

'''
<summary>
''' Controller class of the module
''' </summary>

Class SampleModule
    Inherits ModuleBase
    '''
<summary>
    ''' Controller constructor
    ''' </summary>

    Public Sub New()
        'nothing in the constructor for this basic sample
    End Sub
End Class
</pre>
<p>10. Create a user control.</p>
<p>Add a new user control to your web folder, for example:</p>
<pre class="brush:plain">
&lt;%@ Control Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;Sample.ascx.cs&quot;
    Inherits=&quot;Cuyahoga.Modules.Sample.Web.Sample&quot; %&gt;
Hello World!
</pre>
<p><a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_SampleASCX.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_SampleASCX.JPG" alt="Sample ASCX" title="Sample ASCX" width="730" height="674" class="alignnone size-full wp-image-194" /></a><br />
The code behind needs to inherit the BaseModule Control.<br />
<a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/C_SampleASCXVB.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/C_SampleASCXVB.JPG" alt="Sample ASCX VB" title="Sample ASCX VB" width="851" height="625" class="alignnone size-full wp-image-195" /></a></p>
<p>For example:</p>
<p>C#</p>
<pre class="brush:csharp">
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Cuyahoga.Web.UI;

Namespace Cuyahoga.Modules.Sample.Web
{
    ///
<summary>
    /// Sample control displayng in Cuyahoga the "Hello World" text
    /// </summary>

    public partial class Sample : BaseModuleControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //for this basic sample we do not need to do anything
        }
    }
}
</pre>
<p>VB.net</p>
<pre class="brush:vbnet">
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls

Imports Cuyahoga.Web.UI

Namespace Web
    '''
<summary>
    ''' Sample control displayng in Cuyahoga the "Hello World" text
    ''' </summary>

    Partial Public Class Sample
        Inherits BaseModuleControl
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
            'for this basic sample we do not need to do anything
        End Sub
    End Class
End Namespace
</pre>
<p>11. Create the SQL installation scripts.</p>
<p>In the Install/Database/mssql2000 folder you need to add 3 files to take advantage of the auto install and uninstall features.</p>
<p>Version File<br />
<a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/C_VersionSQL.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/C_VersionSQL.JPG" alt="VersionSQL" title="VersionSQL" width="799" height="485" class="alignnone size-full wp-image-196" /></a><br />
For example if your module is at version 1.0.0, you need to add a file called 1.0.0.sql with the following code:</p>
<pre class="brush:sql">
UPDATE cuyahoga_version SET major = 1, minor = 0, patch = 0 WHERE assembly = 'Cuyahoga.Modules.Sample'
go
</pre>
<p>install.sql<br />
<a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_installSQL.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_installSQL.JPG" alt="installSQL" title="installSQL" width="911" height="483" class="alignnone size-full wp-image-197" /></a><br />
The install.sql file will contain all the tables and stored procedures that need to be installed in the database to run your module, as well as update some of the CMS tables to identify your module.</p>
<p>For example:</p>
<pre class="brush:sql">
/*
 *  Table data
 */
--Install the Sample module for Cuyahoga in SQL Server

INSERT INTO cuyahoga_moduletype ([name], assemblyname, classname, path, editpath, inserttimestamp, updatetimestamp)
VALUES ('Sample', 'Cuyahoga.Modules.Sample', 'Cuyahoga.Modules.Sample.SampleModule', 'Modules/Sample/Sample.ascx', NULL, getdate(), getdate())
GO

INSERT INTO cuyahoga_version (assembly, major, minor, patch)
VALUES ('Cuyahoga.Modules.Sample', 1, 5, 0)
GO
</pre>
<p>uninstall.sql<br />
<a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_UninstallSQL.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_UninstallSQL.JPG" alt="UninstallSQL" title="UninstallSQL" width="911" height="483" class="alignnone size-full wp-image-198" /></a><br />
The uninstall.sql file will contain instructions to delete the tables, stored procedures and other records installed by the install.sql file.</p>
<p>For example:</p>
<pre class="brush:sql">
--Uninstall the Sample module in Cuyahoga for SQL Server

DELETE FROM cuyahoga_version WHERE assembly = 'Cuyahoga.Modules.Sample'
go

DELETE FROM cuyahoga_moduletype
WHERE assemblyname = 'Cuyahoga.Modules.Sample'
go
</pre>
<p>12. Rebuild entire solution and run.<br />
<a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/C_Rebuild.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/C_Rebuild.JPG" alt="Rebuild" title="Rebuild" width="685" height="737" class="alignnone size-full wp-image-199" /></a><br />
Run the site and login as admin.<br />
Navigate to the modules page and you should now see your module in the table.</p>
<p>Click install and if everything is fine it should be installed and you can now add that modules to sections of the site.</p>
<p>Troubleshooting</p>
<p>Namespace problems.</p>
<p>You might come across a problem when you try to install the module which throws the following error:</p>
<p>An error occured: Loading failed for Sample.Could not find module: Cuyahoga.Modules.Sample.SampleModule, Cuyahoga.Modules.Sample</p>
<p>This is caused by some of the namespaces in your module not being compiled correctly.<br />
I found out that Visual studio sometimes adds the default namespace to your class in addition to whatever namespace you declare.<br />
So if you used Namespace Cuyahoga.Modules.Sample.Web in your code, this will actually come out as Namespace Cuyahoga.Modules.Sample.Cuyahoga.Modules.Sample.Web.<br />
To fix this remove the default namespace from your class. So the example I provided before will now simply be: Namespace Web</p>
<p>Install Scripts</p>
<p>In order for the install scripts to work, they need to have the right file name and be places in the correct folder structure defined in the tutorial.<br />
Its recommended to have all three files for this feature to work smoothly.</p>
<p>Cannot see web form or user control source files in Visual Studio.<br />
<a href="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_ShowAllFiles.JPG"><img src="http://www.aaronblake.co.uk/blog/wp-content/uploads/2009/09/c_ShowAllFiles.JPG" alt="ShowAllFiles" title="ShowAllFiles" width="468" height="681" class="alignnone size-full wp-image-200" /></a><br />
For some reason, Visual Studio will sometimes hide certain files and folders. To see all files in the project folder go to PROJECT in the main menu and select SHOW ALL FILES.</p>
<p>Further reading:</p>
<p><a href="http://www.paolocorti.net/2007/04/30/cuyahoga-hello-world-sample-module-tutorial/">http://www.paolocorti.net/2007/04/30/cuyahoga-hello-world-sample-module-tutorial/</a><br />
<a href="http://www.cuyahoga-project.org/home/developers.aspx">http://www.cuyahoga-project.org/home/developers.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2009/09/30/cuyahoga-how-to-create-a-module-tutorial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to add web user controls to a class library project</title>
		<link>http://www.aaronblake.co.uk/blog/2009/09/28/how-to-add-web-user-controls-to-a-class-library-project/</link>
		<comments>http://www.aaronblake.co.uk/blog/2009/09/28/how-to-add-web-user-controls-to-a-class-library-project/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 11:38:26 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[ASP.net]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=142</guid>
		<description><![CDATA[Introduction By default you are unable to add web forms or user controls to a Class Library project. This guide will tell you how to get around this. IMPORTANT &#8211; Backup your project file before you make any amends to it, just in case something goes wrong. Step 1 &#8211; Open class library project file [...]]]></description>
			<content:encoded><![CDATA[<p>Introduction</p>
<p>By default you are unable to add web forms or user controls to a Class Library project. This guide will tell you how to get around this.</p>
<p>IMPORTANT &#8211; Backup your project file before you make any amends to it, just in case something goes wrong.</p>
<p>Step 1 &#8211; Open class library project file in a text editor.</p>
<p>The project file is usually in the root folder and has a file extension of .vbproj or .csproj</p>
<p>Step 2 &#8211; Add or replace the <ProjectTypeGuids> tag</p>
<p>Add or replace the <ProjectTypeGuids> tag with the following:</p>
<pre class="brush:xml"><ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids></pre>
<p>This tag should be underneath the <ProjectGuid> tag, which is within the <PropertyGroup> tag.</p>
<p>Example:</p>
<pre class="brush:xml">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{42FC0FAF-C05B-4C16-AB8A-3F4698F910D8}</ProjectGuid>
    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <RootNamespace>Cuyahoga.Modules.Test</RootNamespace>
    <AssemblyName>Cuyahoga.Modules.Test</AssemblyName>
    <FileAlignment>512</FileAlignment>
    <MyType>WebControl</MyType>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <OptionExplicit>On</OptionExplicit>
    <OptionCompare>Binary</OptionCompare>
    <OptionStrict>Off</OptionStrict>
    <OptionInfer>On</OptionInfer>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <OutputPath>bin\Debug\</OutputPath>
    <DocumentationFile>Cuyahoga.Modules.Test.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DocumentationFile>Cuyahoga.Modules.Test.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Management" />
    <Reference Include="System.Web" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.DataSetExtensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Collections" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.Data" />
    <Import Include="System.Diagnostics" />
    <Import Include="System.Linq" />
    <Import Include="System.Xml.Linq" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Class1.vb" />
    <Compile Include="My Project\AssemblyInfo.vb" />
    <Compile Include="My Project\Application.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Application.myapp</DependentUpon>
    </Compile>
    <Compile Include="My Project\Resources.Designer.vb">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Include="My Project\Settings.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="My Project\Resources.resx">
      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
      <CustomToolNamespace>My.Resources</CustomToolNamespace>
      <SubType>Designer</SubType>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <None Include="My Project\Application.myapp">
      <Generator>MyApplicationCodeGenerator</Generator>
      <LastGenOutput>Application.Designer.vb</LastGenOutput>
    </None>
    <None Include="My Project\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <CustomToolNamespace>My</CustomToolNamespace>
      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
    </None>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
</pre>
<p>Step 3 &#8211; Save file and open project up in visual studio.</p>
<p>Conclusion</p>
<p>You should now be able to add web forms and user controls from the solution explorer within visual studio.</p>
<p>Further reading:<br />
<a href="http://haacked.com/archive/2006/02/07/AddingWebUserControlToAClassLibraryInVS.NET2005.aspx">http://haacked.com/archive/2006/02/07/AddingWebUserControlToAClassLibraryInVS.NET2005.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2009/09/28/how-to-add-web-user-controls-to-a-class-library-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug fix – Application restarts on directory delete in ASP.net</title>
		<link>http://www.aaronblake.co.uk/blog/2009/09/28/bug-fix-application-restarts-on-directory-delete-in-asp-net/</link>
		<comments>http://www.aaronblake.co.uk/blog/2009/09/28/bug-fix-application-restarts-on-directory-delete-in-asp-net/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 09:12:01 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[ASP.net]]></category>

		<guid isPermaLink="false">http://www.aaronblake.co.uk/blog/?p=140</guid>
		<description><![CDATA[Introduction If a directory within an ASP.net website is deleted while the site is running, this causes the whole site to reboot, loosing any session data and logging out users. This quick tutorial will show you a quick fix that can be run in your global.asax to prevent this from happening. Step 1 &#8211; Define [...]]]></description>
			<content:encoded><![CDATA[<p>Introduction</p>
<p>If a directory within an ASP.net website is deleted while the site is running, this causes the whole site to reboot, loosing any session data and logging out users.</p>
<p>This quick tutorial will show you a quick fix that can be run in your global.asax to prevent this from happening.</p>
<p>Step 1 &#8211; Define the bug fix method</p>
<p>Define the following method somewhere in your application (easiest is within the global.asax file, but you can place it anywhere else that&#8217;s more convenient).</p>
<p>C#</p>
<pre class="brush:csharp">
private void FixAppDomainRestartWhenTouchingFiles()
{
if (CurrentTrustLevel == AspNetHostingPermissionLevel.Unrestricted)
{
// From: http://forums.asp.net/p/1310976/2581558.aspx
// FIX disable AppDomain restart when deleting subdirectory
// This code will turn off monitoring from the root website directory.
// Monitoring of Bin, App_Themes and other folders will still be operational, so updated DLLs will still auto deploy.
PropertyInfo p = typeof(HttpRuntime).GetProperty("FileChangesMonitor", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static);
object o = p.GetValue(null, null);
FieldInfo f = o.GetType().GetField("_dirMonSubdirs", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.IgnoreCase);
object monitor = f.GetValue(o);
MethodInfo m = monitor.GetType().GetMethod("StopMonitoring", BindingFlags.Instance | BindingFlags.NonPublic);
m.Invoke(monitor, new object[] { });
}
}
</pre>
<p>VB.net</p>
<pre class="brush:vbnet">
        Private Sub FixAppDomainRestartWhenTouchingFiles()
    If CurrentTrustLevel = AspNetHostingPermissionLevel.Unrestricted Then
        ' From: http://forums.asp.net/p/1310976/2581558.aspx
        ' FIX disable AppDomain restart when deleting subdirectory
        ' This code will turn off monitoring from the root website directory.
        ' Monitoring of Bin, App_Themes and other folders will still be operational, so updated DLLs will still auto deploy.
        Dim p As PropertyInfo = GetType(HttpRuntime).GetProperty("FileChangesMonitor", BindingFlags.NonPublic Or BindingFlags.[Public] Or BindingFlags.[Static])
        Dim o As Object = p.GetValue(Nothing, Nothing)
        Dim f As FieldInfo = o.[GetType]().GetField("_dirMonSubdirs", BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.IgnoreCase)
        Dim monitor As Object = f.GetValue(o)
        Dim m As MethodInfo = monitor.[GetType]().GetMethod("StopMonitoring", BindingFlags.Instance Or BindingFlags.NonPublic)
        m.Invoke(monitor, New Object() {})
    End If
End Sub
</pre>
<p>Step 2 &#8211; Create Global.asax file in root of application.</p>
<p>If you don&#8217;t already have a global.asax file, you need to create one in the root of your application.</p>
<p>Step 3 &#8211; Run method in Application Start event of global.asax</p>
<p>C#</p>
<pre class="brush:csharp">
protected void Application_Start(Object sender, EventArgs e)
{
// Misc
FixAppDomainRestartWhenTouchingFiles();
}
</pre>
<p>VB.net</p>
<pre class="brush:vbnet">
Protected Sub Application_Start(ByVal sender As [Object], ByVal e As EventArgs)
' Misc
FixAppDomainRestartWhenTouchingFiles()
End Sub
</pre>
<p>Conclusion</p>
<p>This should fix the bug and prevent the ASP.net web site from restarting when a directory is deleted.</p>
<p>Further reading:<br />
<a href="http://forums.asp.net/p/1310976/2581558.aspx">http://forums.asp.net/p/1310976/2581558.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronblake.co.uk/blog/2009/09/28/bug-fix-application-restarts-on-directory-delete-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 0.774 seconds -->

