<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Notes to self</title>
	<atom:link href="http://ntsblog.homedev.com.au/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://ntsblog.homedev.com.au</link>
	<description>my brain dump of solutions to technical problems</description>
	<lastBuildDate>Thu, 26 Jan 2012 13:57:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>JetPack Post Statistics Link Plug-in</title>
		<link>http://ntsblog.homedev.com.au/index.php/2012/01/25/jetpack-post-statistics-link-plug-in/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jetpack-post-statistics-link-plug-in</link>
		<comments>http://ntsblog.homedev.com.au/index.php/2012/01/25/jetpack-post-statistics-link-plug-in/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 14:23:23 +0000</pubDate>
		<dc:creator>jcrawfor74</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://ntsblog.homedev.com.au/?p=562</guid>
		<description><![CDATA[You may have noticed that the jetpack plugin provides you with some great statistics on the hits to your website. It also allows you to drill down on the statistics for each post, with one problem&#8230; If your post does not appear in the top 10 results for the day then you have no way [...]]]></description>
			<content:encoded><![CDATA[<p>You may have noticed that the jetpack plugin provides you with some great statistics on the hits to your website. </p>
<p>It also allows you to drill down on the statistics for each post, with one problem&#8230;</p>
<p>If your post does not appear in the top 10 results for the day then you have no way to see the statistics.</p>
<p>That is where the &#8220;JetPack Post Statistics Link Plug-in&#8221; comes in.</p>
<p>The plug-in provides an extra column on your Posts admin page and provides a link to the statistics for each post.</p>
<p>To download a copy go to my main website.. <a href="http://www.homedev.com.au/WordPress/View/2" title="HomeDev WordPress Plugin" target="_new"> >> Download Link << </a></p>
<p><a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/screenshot-1.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/screenshot-1.png" alt="" title="screenshot-1" width="681" height="285" class="aligncenter size-full wp-image-564" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ntsblog.homedev.com.au/index.php/2012/01/25/jetpack-post-statistics-link-plug-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crysis 2 50Hz issue ATI Card on HDMI connection</title>
		<link>http://ntsblog.homedev.com.au/index.php/2012/01/16/crysis-2-50hz-issue-ati-card-hdmi-connection/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=crysis-2-50hz-issue-ati-card-hdmi-connection</link>
		<comments>http://ntsblog.homedev.com.au/index.php/2012/01/16/crysis-2-50hz-issue-ati-card-hdmi-connection/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 12:24:59 +0000</pubDate>
		<dc:creator>jcrawfor74</dc:creator>
				<category><![CDATA[Hardware Issues]]></category>

		<guid isPermaLink="false">http://ntsblog.homedev.com.au/?p=543</guid>
		<description><![CDATA[I have been running Crysis 2 on my DVI connection no worries, but recently I changed to a HDMI cable to connect my Benq E2420HD to my Msi R6850 video card. If you see my previous post, Benq Monitor and HDMI not working you will see that I had some issues with getting my monitor [...]]]></description>
			<content:encoded><![CDATA[<p>I have been running Crysis 2 on my DVI connection no worries, but recently I changed to a HDMI cable to connect my Benq E2420HD to my Msi R6850 video card.</p>
<p>If you see my previous post, <a href="http://ntsblog.homedev.com.au/index.php/2012/01/14/benq-monitor-hdmi-working-fixed/" target="_blank">Benq Monitor and HDMI not working</a> you will see that I had some issues with getting my monitor to work, but I found the settings and all was good with the world.. until I launched Crysis 2.</p>
<h2>Issue</h2>
<p>When Crysis 2 runs with DX 11 in full screen mode, it runs @ 50Hz.</p>
<p><a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/OSD_Crysis.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/OSD_Crysis.png" alt="" title="OSD_Crysis" width="420" height="313" class="aligncenter size-full wp-image-546" /></a></p>
<p>My monitor can handle 50Hz, (it is a supported refresh rate), but the game did not fill the full screen. The full screen was black but the edges of the game fell about 1cm short or the edge of my screen.</p>
<p><a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Crysis_screen1.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Crysis_screen1.png" alt="" title="Crysis_screen1" width="480" height="360" class="aligncenter size-full wp-image-544" /></a></p>
<p><a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Crysis_screen2.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Crysis_screen2.png" alt="" title="Crysis_screen2" width="480" height="360" class="aligncenter size-full wp-image-545" /></a></p>
<p>So WTF was going on?</p>
<h2>Catalyst Control Centre.. again..</h2>
<p>The issue is the overscan setting. As per the previous post (link above), I had to set the overscan setting to 0%. But when the monitor switches to 50Hz it also switches to a different profile, and this profile has the overscan setting to about the middle of this bar, (approx 7.5% underscan)</p>
<p><a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Catalyst.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Catalyst.png" alt="" title="Catalyst" width="486" height="528" class="aligncenter size-full wp-image-526" /></a></p>
<p>The solution is:</p>
<ol>
<li>Launch Catalyst control centre
<li>Expand &#8220;Desktop Management&#8221; and click on &#8220;Desktop Properties&#8221;
<li>Set the monitor to use 50Hz and click apply<br/> <i>your monitor will switch and wow you suddenly see the black border similar to when you were playing Crysis 2
<li>Switch to the &#8220;Scaling Options&#8221; and set the Overscan to 0% and click apply
</ol>
<p>When you play Crysis it will now fill the full screen.</p>
<p>Got to go.. stuff to shoot .. <img src='http://ntsblog.homedev.com.au/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ntsblog.homedev.com.au/index.php/2012/01/16/crysis-2-50hz-issue-ati-card-hdmi-connection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benq Monitor and HDMI not working &#8211; FIXED</title>
		<link>http://ntsblog.homedev.com.au/index.php/2012/01/14/benq-monitor-hdmi-working-fixed/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=benq-monitor-hdmi-working-fixed</link>
		<comments>http://ntsblog.homedev.com.au/index.php/2012/01/14/benq-monitor-hdmi-working-fixed/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 08:16:09 +0000</pubDate>
		<dc:creator>jcrawfor74</dc:creator>
				<category><![CDATA[Hardware Issues]]></category>

		<guid isPermaLink="false">http://ntsblog.homedev.com.au/?p=525</guid>
		<description><![CDATA[Attaching a monitor to a pc via HDMI should be easy&#8230; right. Well on hooking up a Benq E2420HD monitor to a MSi R6850 (PM2DIGD5), the image looked terrible. It took a bit of tweaking but these are the steps you will need to follow to get things looking how they should. Step 1. Catalyst [...]]]></description>
			<content:encoded><![CDATA[<p>Attaching a monitor to a pc via HDMI should be easy&#8230; right.</p>
<p>Well on hooking up a Benq E2420HD monitor to a MSi R6850 (PM2DIGD5), the image looked terrible.</p>
<p>It took a bit of tweaking but these are the steps you will need to follow to get things looking how they should.</p>
<p><br/></p>
<p><br/></p>
<h2>Step 1. Catalyst Control Centre Settings</h2>
<p>In my case the software was defaulting to set the scaling options to &#8220;under scaled&#8221;! (about -7.5%)</p>
<p>Turn the scaling off and set it to 0% as shown.<br/><br />
<a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Catalyst.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Catalyst.png" alt="" title="Catalyst" width="486" height="528" class="aligncenter size-full wp-image-526" /></a></p>
<h2>Step 2. Monitor Settings</h2>
<p>You need to turn off the overscan feature, in the monitors OSD (on-screen display) settings.</p>
<ol>
<li>Go to the Picture Advanced page and choose display mode</br><br />
<a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/OSD_1.jpg"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/OSD_1.jpg" alt="On Screen Display 1" title="OSD_1" width="385" height="296" class="aligncenter size-full wp-image-527" /></a></p>
<li>Set the Overscan feature to OFF<br/><br />
<a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/OSD_2.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/OSD_2.png" alt="On screen display overscan" title="OSD_2" width="407" height="264" class="aligncenter size-full wp-image-528" /></a></p>
<p>Problem solved <img src='http://ntsblog.homedev.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ntsblog.homedev.com.au/index.php/2012/01/14/benq-monitor-hdmi-working-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SATA 3 SSD running on SATA II benchmark</title>
		<link>http://ntsblog.homedev.com.au/index.php/2012/01/11/sata-3-ssd-running-on-sata-ii-benchmark/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sata-3-ssd-running-on-sata-ii-benchmark</link>
		<comments>http://ntsblog.homedev.com.au/index.php/2012/01/11/sata-3-ssd-running-on-sata-ii-benchmark/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 13:25:08 +0000</pubDate>
		<dc:creator>jcrawfor74</dc:creator>
				<category><![CDATA[Hardware Review]]></category>

		<guid isPermaLink="false">http://ntsblog.homedev.com.au/?p=454</guid>
		<description><![CDATA[This benchmark and review is to show what performance differences you can expect when you try to run a SATA 3 SSD on older hardware that only supports SATA II (300 Mb/s) connections. I was recently looking to purchase a SSD drive as an upgrade for my old socket 775 Core 2 Duo machine to [...]]]></description>
			<content:encoded><![CDATA[<p>This benchmark and review is to show what performance differences you can expect when you try to run a SATA 3 SSD on older hardware that only supports SATA II (300 Mb/s) connections.</p>
<p>I was recently looking to purchase a SSD drive as an upgrade for my old socket 775 Core 2 Duo machine to keep it alive a bit longer. This meant purchasing a current SATA 3 drive and running it connected via the on-board SATA 2 connection. </p>
<p>When attempting to research whether I needed an add-on SATA 3 card I was unable to find any real world reviews of this type of upgrade, so this review is designed to fill this gap.<br />
<br/><br/></br></p>
<h2>The Rig</h2>
<table width="100%">
<tr>
<td><strong>Mother&nbsp;Board:</strong></td>
<td> Socket 775, Gigabyte EP45-DS3</td>
</tr>
<tr>
<td><strong>CPU:</strong></td>
<td>Core 2 Duo E8400 3.0Ghz, running overclocked @ 4.0Ghz.</td>
</tr>
<tr>
<td><strong>Memory:</strong></td>
<td>4GB (2x2GB) Corsair CM2X2048-8500C5C (1066Mhz)</td>
</tr>
<tr>
<td><strong>Video:</strong></td>
<td>MSi R6850 Storm II 1G OC (R6850 PM2DIGD5)</td>
</tr>
<tr>
<td><strong>SSD:</strong></td>
<td>Corsair Force GT 120GB, (1.3.3 firmware on SATA II in AHCI mode)</td>
</tr>
<tr>
<td><strong>ATA Drive:</strong></td>
<td>Segate Barracuda® 7200.12 1 TB</td>
</tr>
<tr>
<td><strong>OS:</strong></td>
<td>Windows 7 SP1 &#8211; 64 bit</td>
</tr>
</tr>
</table>
<h2>SSD Benchmark</h2>
<p>The SSD drive in question is a Corsair Force GT 120GB. </p>
<p>Full specs and details can be found here <a href="http://www.guru3d.com/article/corsair-force-gt-120gb-ssd-review/1" title="on guru3d" target="_blank">on guru3D</a></p>
<p>This is connected via the on board SATA II Connection.</p>
<p>The theoretical throughput is 300Mb/s. The following is the results of AS SSD.</p>
<p><a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/as-ssd-bench-Corsair-Force-GT-7.01.2012-1-15-19-AM.png" target="_blank"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/as-ssd-bench-Corsair-Force-GT-7.01.2012-1-15-19-AM.png" alt="" title="as-ssd-bench Corsair Force GT 7.01.2012 1-15-19 AM" width="503" height="501" class="aligncenter size-full wp-image-461" /></a></p>
<p>The overall score is comparable with the results from the guru 3d review with the obvious difference being the Sequential Read maxing out at 263Mb/s.</p>
<p><a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/as-ssd-bench-guru3d.png" target="_blank"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/as-ssd-bench-guru3d.png" alt="" title="as-ssd bench guru3d" width="503" height="498" class="aligncenter size-full wp-image-463" /></a></p>
<p>Here is the compression benchmark, so clearly the drive is not being pushed very hard..</p>
<p><a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/as-compr-bench-Corsair-Force-GT-10.01.2012-12-01-17-AM.png" target="_blank"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/as-compr-bench-Corsair-Force-GT-10.01.2012-12-01-17-AM.png" alt="" title="as-compr-bench Corsair Force GT 10.01.2012 12-01-17 AM" width="700" height="400" class="aligncenter size-full wp-image-484" /></a></p>
<h2>OS Benchmark</h2>
<p>The machine is running Windows 7 &#8211; 64bit, plus all the services and software one would expect, including:</p>
<ul>
<li>AVG Anitvirus</li>
<li>Catalyst control centre</li>
<li>HP Printer Software</li>
<li>Msi Afterburner</li>
<li>Core Temp</li>
<li>Network and All CPU meter gadgets</li>
</ul>
<h3>The Test</h3>
<p>This benchmark recorded the total time to startup the PC on the 7200RPM 1TB drive vs the SSD. The benchmark recorded the time from when windows started loading after the POST screen,  until a working desktop was available. This was identified as the time at which the Gadgets appeared on the desktop. This was split into 4 timing points:</p>
<ol>
<li>time to login screen
<li>time to login
<li>time to see the desktop
<li>time until the gadgets loaded.
</ol>
<p><a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/W7Statup.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/W7Statup.png" alt="" title="W7Statup" width="481" height="289" class="aligncenter size-full wp-image-513" /></a></p>
<p>The windows startup time is now 4 times faster with the SSD drive, launching to a working desktop in less than 25 seconds, (including typing my password!)</p>
<h2>Windows Experience Score</h2>
<p>The windows experience went from&#8230;<br />
<a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Windows-Experience-Score-1_1.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Windows-Experience-Score-1_1.png" alt="" title="Windows Experience Score 1_1" width="540" height="208" class="aligncenter size-full wp-image-499" /></a><br />
to..<br />
<a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Windows-Experience-Score-2.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Windows-Experience-Score-2.png" alt="" title="Windows Experience Score 2" width="549" height="203" class="aligncenter size-full wp-image-500" /></a><br />
The slowest component is now my CPU.. may have to tweak that overclock <img src='http://ntsblog.homedev.com.au/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Edit Caveat: Note you will have to factor in the fact that the SSD benchmark is on a clean install Windows 7 whilst the ATA Drive have been running for a while, but even so I have been using the SSD setup over the past few weeks since writing this review and start up is still very quick with only a few seconds between clicking login and being able to use the computer <img src='http://ntsblog.homedev.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h2>Crysis</h2>
<p>I timed the loading of the application and the loading of a new game.<br />
With the following results.<br />
<a href="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Crysis-Load.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2012/01/Crysis-Load.png" alt="" title="Crysis Load" width="481" height="863" class="aligncenter size-full wp-image-503" /></a></p>
<p>The load times were generally faster on the SSD drive and seem to have a larger performance gap as we moved from Crysis to Crysis 2.</p>
<h3>Crysis Benchmarks</h3>
<p>I ran both the Crysis and Crysis 2 benchmarks with no consistent pattern of improvement. The tests were  within 2 fps of each other but in some cases the SSD was better and some worse. So it appears the Disk has no real impact on Crysis frame rates.</p>
<h2>General Performance</h2>
<p>The general performance of loading applications like Internet Explorer and Firefox, windows media centre was recorded. In most instances the load times on the SSD drive was around the 0.5 &#8211; 2.0 seconds, whilst load times on the hard drive were sometimes comparable but more often they were slower (Browsers took approx 4 seconds to load to Google homepage), but the hard drive was inconsistent in performance with load times as high as 14.5 seconds for IE being recorded.</p>
<h2>PC Mark &#8211; Vantage (1.0.2.0)</h2>
<p>To give some kind of industry benchmark for the entire PC experience I benchmarked the machine for overall performance using PC Mark, the results were </p>
<p>Hard Drive Score &#8211; 6313<br />
SSD Score &#8211; 10683</p>
<p>This is a 70% improvement over the Hard drives score.</p>
<h2>Conclusion</h2>
<p>The general feal of the machine is much snappier with the SSD drive. Applications install really fast, open quickly and it is a nicer experience to use with no major delays when using the applications. Also I just realised my computer is also eerilly silent on start-up no more mechanical whirring and noises</p>
<p>I would say that it was worth the money even with just an old SATA II connection. Also this drive will be a useful addition to my Laptop at some point in the future <img src='http://ntsblog.homedev.com.au/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<h2>SATA 3 add-on Cards</h2>
<p>The next stage of this benchmark test will be to get my hands on a SATA 3 card like the <a href="http://www.asrock.com/mb/spec/Card.asp?Model=SATA3%20Card" title="Asrock SATA 3" target="_blank">ASRock SATA 3 card</a> or the <a href="http://www.asus.com/Motherboards/Accessories/U3S6/" target="_blank">ASUS U3S6</a> and see if these cards actually provide any performance benefit, stay tuned&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://ntsblog.homedev.com.au/index.php/2012/01/11/sata-3-ssd-running-on-sata-ii-benchmark/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Use CKEditor on MVC 3 Razor Website</title>
		<link>http://ntsblog.homedev.com.au/index.php/2011/12/06/use-ckeditor-on-mvc-3-razor-website/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=use-ckeditor-on-mvc-3-razor-website</link>
		<comments>http://ntsblog.homedev.com.au/index.php/2011/12/06/use-ckeditor-on-mvc-3-razor-website/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 10:37:07 +0000</pubDate>
		<dc:creator>jcrawfor74</dc:creator>
				<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://ntsblog.homedev.com.au/?p=442</guid>
		<description><![CDATA[This post provides the basic steps the implement a CKEditor control into your MVC Razor web page. This post assumes you have a working MVC website, with a standard _Layout.cshtml page. Follow these easy steps: Download the latest version of the CKEditor from here You only need to download the basic package. At the time [...]]]></description>
			<content:encoded><![CDATA[<p>This post provides the basic steps the implement a CKEditor control into your MVC Razor web page.</p>
<p>This post assumes you have a working MVC website, with a standard _Layout.cshtml page.</p>
<p>Follow these easy steps:</p>
<ol>
<li>Download the latest version of the CKEditor from <a href="http://ckeditor.com/download" target="_new">here</a><br />
You only need to download the basic package.
<p>
At the time of writing I downloaded the zip file of CKEditor 3.6.2<br />
<br/>You will see there is an ASP.net control that can be downloaded but this is not required to make it work with MVC.</p>
<li>Unzip the downloaded package
<li>In windows explorer copy the &#8220;ckeditor&#8221; folder into the root folder of your website.
<li>In Visual studio and click the &#8220;Show All Files&#8221; icon.
<li>right-click on the ckeditor folder and choose include in project, this can take a little while..
<li>In the &lt;head&gt; of your _Layout.cshtml file reference the ckeditor.js file<br />
<pre><code>
&lt;script src=&quot;@Url.Content(&quot;~/ckeditor/ckeditor.js&quot;)&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</code></pre></p>
<li>Create a model class with a property you wish to bind to your HTML editor</li>
<li>Create a strongly-typed view (use scaffold template of edit if you like)</li>
<li>Now the easy bit, the way this works is by generating a &lt;textarea&gt; control with the class of &#8220;ckeditor&#8221; and an id, so the html for this would look like the following. Note the id can be anything you want.<br />
<pre><code>
&lt;textarea class=&quot;ckeditor&quot; id=&quot;text-details&quot; name=&quot;Details&quot;&gt;some text&lt;/textarea&gt;
</code></pre><br />
To generate this in MVC use the following<br />
<pre><code>
@Html.TextAreaFor(model =&gt; model.Details, new { @class=&quot;ckeditor&quot;, @id=&quot;text-details&quot;})
</code></pre><br />
where model.Details is the property of the strongly-typed class you passed through
</ol>
<p>That&#8217;s it. Run the site and visit the page. Your text area control will be rendered as the CKEditor control.</p>
<p>Happy editing</p>
]]></content:encoded>
			<wfw:commentRss>http://ntsblog.homedev.com.au/index.php/2011/12/06/use-ckeditor-on-mvc-3-razor-website/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Distributed Transaction Failure &#8211; Race Condition</title>
		<link>http://ntsblog.homedev.com.au/index.php/2011/11/18/distributed-transaction-failure-race-condition/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=distributed-transaction-failure-race-condition</link>
		<comments>http://ntsblog.homedev.com.au/index.php/2011/11/18/distributed-transaction-failure-race-condition/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 11:58:46 +0000</pubDate>
		<dc:creator>jcrawfor74</dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://ntsblog.homedev.com.au/?p=421</guid>
		<description><![CDATA[I have a process that is using MSDTC (Microsoft Distributed Transaction Co-ordinator) to manage the transaction. The transaction is controlled inside a c# .Net windows form executable that manages the transaction by the TransactionScope() object. The transaction is maintained across 2 SQL server and an Oracle server and it all works&#8230; most of the time. [...]]]></description>
			<content:encoded><![CDATA[<p>I have a process that is using MSDTC (Microsoft Distributed Transaction Co-ordinator) to manage the transaction.</p>
<p>The transaction is controlled inside a c# .Net windows form executable that manages the transaction by the TransactionScope() object.</p>
<p>The transaction is maintained across 2 SQL server and an Oracle server and it all works&#8230; most of the time.</p>
<p>All transactions are opened inside a using statement, as follows <br/> <br/><br />
<pre><code>
using (TransactionScope scope = new TransactionScope())
</code></pre><br />
Or similar.</p>
<p>The overview of the .exe is it monitors a queue of jobs to process. It processes the work inside the transaction successfully commits, and then after that updates the status on the job queue to success or failure.</p>
<p>When there is an application error, the program throws an exception which means it ends the main transaction and in an outer transaction updates the status to failure.</p>
<p>Intermittently when the core logic was throwing errors on  many jobs the entire process would fail with the following error:<br />
<pre><code>
Connection currently has transaction enlisted.&nbsp;&nbsp;Finish current transaction and retry.
</code></pre></p>
<p>But it was intermitted. I had the same 12 jobs throwing errors on every run and sometimes it would crash with the above error after 2 jobs, 8 jobs, 4 jobs or it would actually not crash at all. On my development box I could not replicate it at all?</p>
<p>So I figured I had a race condition.<br />
<H2>The fix</H2><br />
After the main transaction block of code and before opening the next TransactionScope object to update the status, I put a 100ms sleep.<br />
<pre><code>
&nbsp;&nbsp;&nbsp;&nbsp;// Stop race condition
&nbsp;&nbsp;&nbsp;&nbsp;System.Threading.Thread.Sleep(100);

&nbsp;&nbsp;&nbsp;&nbsp;item.Success = false; // &lt;-- this is my object for updating the success or failure
&nbsp;&nbsp;&nbsp;&nbsp;using (TransactionScope scope = new TransactionScope())
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.SubmitChanges();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scope.Complete();
&nbsp;&nbsp;&nbsp;&nbsp;}
</code></pre></p>
<p>The problem has disappeared. I think the re-opening of a new TransactionScope() object did not allow enough time for MSDTC to close the previous transaction and it was crashing.</p>
<p>Cheers<br />
John</p>
]]></content:encoded>
			<wfw:commentRss>http://ntsblog.homedev.com.au/index.php/2011/11/18/distributed-transaction-failure-race-condition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to move wordpress.com site to a sub domain hosted on IIS &#8211; Tips and tricks</title>
		<link>http://ntsblog.homedev.com.au/index.php/2011/11/12/how-to-move-wordpress-com-site/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-move-wordpress-com-site</link>
		<comments>http://ntsblog.homedev.com.au/index.php/2011/11/12/how-to-move-wordpress-com-site/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 14:25:02 +0000</pubDate>
		<dc:creator>jcrawfor74</dc:creator>
				<category><![CDATA[Blogging]]></category>

		<guid isPermaLink="false">http://ntsblog.homedev.com.au/?p=359</guid>
		<description><![CDATA[I have recently moved my free wordpress.com blog (the one that you are reading) to my own domain. If you read the contents on this site I hope you think I am reasonalby technically savy, but the feat of moving my site and redirecting the wordpress.com links was problematic and it took me a few [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently moved my free wordpress.com blog (the one that you are reading) to my own domain.</p>
<p>If you read the contents on this site I hope you think I am reasonalby technically savy, but the feat of moving my site and redirecting the wordpress.com links was problematic and it took me a few days and many wrong turns to get it done.</p>
<p>I found that most instructions are based on apache/linux hosted solutions and I had issues using my IIS/Windows based host. My windows based host uses Plesk 10 (@ the time of writing).</p>
<p>Before you even begin to touch a computer there are a few things you have to think of first!</p>
<h2>1. Root site or sub-domain?</h2>
<p>Is this the only thing that you will have on your domain or are you going to have something else hosted on http://www.yourdomain.com? You need to answer this now as when you go to buy your domain mapping from wordpress.com you can only map a whole domain. So you would be better off hosting it @ http://blog.yourdomain.com, leaving the www for other things.</p>
<p>I started by creating my wordpress site with a click once install under a sub-directory in my httpdocs folder (main root web folder on my host), so I had my wordpress site setup @ http://www.homedev.com.au/ntsblog but as you can&#8217;t register a sub directory I had to start again.</p>
<p>So in my case I went and created a new sub-domain, <a href="http://ntsblog.homedev.com.au">http://ntsblog.homedev.com.au</a>, and now I could register the sub-domain with my wordpress.com site.</p>
<h2>2. Permalinks!!!!</h2>
<p>Before you go any further you need to consider permalinks.</p>
<p><strong>The issue</strong></p>
<p>WordPress.com by default uses links that are styled as &#8220;Pretty Links&#8221; and default to a format of /%year%/%monthnum%/%day%/%postname%/&#8221; which means a posts will appear as <a href="http://blog.yourdomain.com/2011/11/31/post_title">http://blog.yourdomain.com/2011/11/31/post_title</a></p>
<p>The problem is that with version 3.2.1 of wordpress on a Windows host the &#8220;Pretty Link&#8221; is not supported by default and most &#8220;Permalinks&#8221; contain &#8220;index.php&#8221; in the path. see image..</p>
<p><a href="http://ntsblog.homedev.com.au/wp-content/uploads/2011/11/Permalinks.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2011/11/Permalinks.png" alt="" title="Permalinks" width="700"  /></a></p>
<p>Why is this a problem? Consider the link to your wordpress.com article that gets returned in a google search. When you try and do the domain mapping from wordpress.com to your domain, google will pass through a URL that your hosted wordpress site cannot handle.</p>
<p>This article discusses the various ways of mapping pretty links, and the section you are taken to is specifically for IIS/Windows systems.</p>
<p><a href="http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite">http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite</a></p>
<p>My hosting provider already had a copy of Microsoft &#8220;URL Rewrite Module&#8221;, so I created a web.config file as per the suggestion in this article and applied it to my site but it would not work.</p>
<p>Assume the URL was<br />
<a href="http://ntsblog.homedev.com.au/2011/11/09/how-to-move-wordpress-com-site/">http://ntsblog.homedev.com.au/2011/11/09/how-to-move-wordpress-com-site/</a></p>
<p>The URL re-writer would try to go to:</p>
<p><a href="http://ntsblog.homedev.com.au/2011/11/09/how-to-move-wordpress-com-site/index.php/2011/11/09/how-to-move-wordpress-com-site/">http://ntsblog.homedev.com.au/2011/11/09/how-to-move-wordpress-com-site/index.php/2011/11/09/how-to-move-wordpress-com-site/</a></p>
<p>In the end I did a little bit of tweaking and came up with the following solution&#8230;</p>
<h3>web.config</h3>
<p>Put this is the root directory of your wordpress site.<br />
<pre><code>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;configuration&gt;
&nbsp;&nbsp;&lt;system.webServer&gt;
&nbsp;&nbsp;&lt;rewrite&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;rules&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rule name=&quot;Main Rule&quot; stopProcessing=&quot;true&quot;&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;match url=&quot;.*&quot; /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;conditions logicalGrouping=&quot;MatchAll&quot;&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsFile&quot; negate=&quot;true&quot; /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsDirectory&quot; negate=&quot;true&quot; /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/conditions&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action type=&quot;Rewrite&quot; url=&quot;redirect.php?path={R:0}&quot; /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/rule&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/rules&gt;
&nbsp;&nbsp;&lt;/rewrite&gt;
&nbsp;&nbsp;&lt;/system.webServer&gt;
&lt;/configuration&gt;
</code></pre></p>
<p>If you look at the &#8220;Action Type&#8221; link this is re-writing the url to go to a page called &#8220;redirect.php&#8221; passing in a parameter of the relative path. So we now need to create the &#8220;redirect.php&#8221; page.</p>
<h3>redirect.php</h3>
<p>Again, create this file in the root of you wordpress site.<br />
<pre><code>
&lt;?php

&nbsp;&nbsp;$relative_url = $_GET[&#039;path&#039;];
&nbsp;&nbsp;$new_relative_url = &#039;index.php/&#039;. $relative_url;
&nbsp;&nbsp;$hostname = $_SERVER[&#039;SERVER_NAME&#039;];
&nbsp;&nbsp;$new_url = &#039;http://&#039; . $hostname . &#039;/&#039; . $new_relative_url;
&nbsp;&nbsp;
&nbsp;&nbsp;header(&quot;Location: &quot; . $new_url)

?&gt;
</code></pre><br />
So what is this doing?<br />
The URL re-writer matches the invalid URL and re-writes the url to &#8220;redirect.php&#8221;. This page then takes in the parameter, and rebuilds the full url to the site based upon inserting &#8220;index.php&#8221; in the chain. This works and also the &#8220;referrer&#8221; and &#8220;search engine&#8221; stats are not affected by the extra redirect.</p>
<p>
To test this take an existing post on your new site, remove the index.php and paste that into a new browser window. The site should redirect to the index.php version. This means any link to your wordpress.com site will redirect to your new domain and be successfully passed along to the index.php page.</p>
<p>
The only problem with this is that I don&#8217;t see how you could reverse the process and return to your wordpress.com site. The new articles will be found with index.php and if you try to go back to worpress.com as the primary domain the links with index.php will all break. Solution don&#8217;t go back. I will follow this up with wordpress and see if I can find a better solution.</p>
<h2>Buy a domain from wordpress.com</h2>
<p>Before you buy a domain read these wordpress articles about <a href="http://en.support.wordpress.com/domain-mapping/map-existing-domain/">mapping domains</a> or <a href="http://en.support.wordpress.com/domain-mapping/map-subdomain/">mapping sub-domains</a></p>
<p>Now seeing as I had created a sub-domain I went down the route of creating a CNAME entry. In plesk this means going to your DNSSettings and adding in a new CNAME. But being new to plesk I did not notice that when you make a DNS setting the settings shows with a warning like this <a href="http://ntsblog.homedev.com.au/wp-content/uploads/2011/11/UnsavedDNSentry.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2011/11/UnsavedDNSentry.png" alt="" title="UnsavedDNSentry" width="187" height="31" class="alignright size-full wp-image-403" /></a><br />
and right up on the top of the page you need to confirm the change by clicking Update.</br><br />
<a href="http://ntsblog.homedev.com.au/wp-content/uploads/2011/11/SaveDNS.png"><img src="http://ntsblog.homedev.com.au/wp-content/uploads/2011/11/SaveDNS.png" alt="" title="SaveDNS" width="833" height="111" class="aligncenter size-full wp-image-414" /></a></p>
<p>So failing to notice that I handn&#8217;t saved the CNAME entry I gave up in frustration. So even though it told me not to I bought a domain and followed the full domain mapping instructions and it worked.</p>
<p>The instructions are fully mapped out in the <a href="http://en.support.wordpress.com/domain-mapping/map-existing-domain/">mapping domains</a> article but here are some extra tips.</p>
<ol>
<li>Go to your domain name provider site and find your name server settings, copy and paste them into a .txt document so you don&#8217;t forget them.</li>
<li>With my name server provider, my names servers had a &#8220;Registrar Lock&#8221; on them. To update the ns1.wordpress.com, ns2.wordpress.com, ns3.wordpress.com, I had to
<ol>
<li>Un-tick the checkbox and click save to clear the registrar lock.
<li>add the wordpress name servers and click save.
</ol>
<li>now go to your wordress.com site and go to Store &#8211;> Domains.</li>
<li>enter your domain, blog.yourdomain.com and click Add, follow the process to purchase the domain mapping</li>
<li>Once registered, select your domain as the &#8220;Primary Domain&#8221; and click &#8220;Update Primary domain&#8221;</li>
<li>Return to your name server and enter in the previous name server settings that you backed up to the text file.</li>
<li>Re-enable the &#8220;Registrar Lock&#8221; if you have one.
</ol>
<p>Your wordpress site should now all be working.</p>
<h2>What Plugins?</h2>
<p>Now you&#8217;ve been using wordpress.com for a while and you probably have it configured how you like it, so how do you make your new site just like wordpress.com.<br />
Most of the plugins on wordpress.com are special to wordpress.com, so I found it difficult to find and install the plugins to get the functionality I am used to.<br />
So here is a mapping between functionality and the plugin you can freely download and install:</p>
<table>
<tr>
<th>#</th>
<th>wordpress.com</th>
<th>Plugin Equivalent</th>
</tr>
<tr>
<td>1.</td>
<td>Site Statistics</td>
<td>Jetpack</td>
</tr>
<tr>
<td>2.</td>
<td>Importer</td>
<td>WordPress Imported</td>
</tr>
<tr>
<td>3.</td>
<td>Ratings</td>
<td>GD Star Rating</td>
</tr>
</table>
<p>Other plugins I have found of interest;</p>
<ul>
<li>Easy AdSense Lite</li>
<li>Google Analytics for WordPress</li>
<li>Preserve Code Formatting &#8211; keeps spaces and formatting when posting code snippets into your post.
</ul>
<p>Thats it for now.</p>
<p>Cheers<br />
John</p>
]]></content:encoded>
			<wfw:commentRss>http://ntsblog.homedev.com.au/index.php/2011/11/12/how-to-move-wordpress-com-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to run MvcMusicStore v3.0 with SQL Server Express</title>
		<link>http://ntsblog.homedev.com.au/index.php/2011/11/11/how-to-run-mvcmusicstore-v3-0-with-sql-server-express/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-run-mvcmusicstore-v3-0-with-sql-server-express</link>
		<comments>http://ntsblog.homedev.com.au/index.php/2011/11/11/how-to-run-mvcmusicstore-v3-0-with-sql-server-express/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 10:45:09 +0000</pubDate>
		<dc:creator>jcrawfor74</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://ntsblog.homedev.com.au/?p=371</guid>
		<description><![CDATA[I&#8217;ve been trying to do the MVCMusicStore v3.0b tutorial, and I wanted to use SQLExpress rather than SqlServerCe.4.0. When trying to do this I ran into a number of problems but I finally figured it out. This guide assumes you already have a working copy of SQL Server Express and that your user account is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to do the MVCMusicStore v3.0b tutorial, and I wanted to use SQLExpress rather than SqlServerCe.4.0.<br/><br />
When trying to do this I ran into a number of problems but I finally figured it out.
<p>
This guide assumes you already have a working copy of SQL Server Express and that your user account is a System Administrator for the database.</p>
<p>
This is the link to the PDF document for the v3.0b tutorial. <a href="http://mvcmusicstore.codeplex.com/releases/view/64379#DownloadId=228002">MvcMusicStore v3.0</a></p>
<p>
(*all page numbers quoted as on the document, page 45 is actually Page 46 when listed in Acrobat)</p>
<p>
Below is what I did and the 2 solutions that I found..</p>
<ol>
<li>As on page 45* I created the AppData Folder.
<li>I downloaded the MVC assets and extracted the files from the zip file.
<li>Right click on AppData and add an existing file, and add in the MvcMusicStore.mdf.
<li>Edit the web.config and added the following connection string:<br />
	<pre><code>
&lt;connectionStrings&gt;
&nbsp;&nbsp;&lt;add name=&quot;MusicStoreDb&quot;
&nbsp;&nbsp;&nbsp;&nbsp;connectionString=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|MvcMusicStore.mdf;Integrated Security=True;&quot;
&nbsp;&nbsp;&nbsp;&nbsp;providerName=&quot;System.Data.SqlClient&quot; /&gt;
&lt;/connectionStrings&gt;
&nbsp;&nbsp;</code></pre></p>
<li>Added the MusicStoreEntities.cs as on page 47.
</ol>
<p>At this point Debug the site and I was getting errors. First I was getting errors about meta data failures.<br />
I managed to play a bit more and somehow fixed the meta data issues so that it was no longer erroring, but the queries were not returning any data. </p>
<p>Then I noticed the following 2 issues:</p>
<ol>
<li>Write some code like the following<br/><br />
		<pre><code>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MusicStoreEntities db = new MusicStoreEntities();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;string connection = db.Database.Connection.ConnectionString;
&nbsp;&nbsp;&nbsp;&nbsp;</code></pre><br/><br />
		Run up in debug and check the value stored in the connection string.<br/><br />
		Note that the database name is related to the application MvcMusicStore, &#8220;MvcMusicStore.Models.MusicStoreEntities&#8221;? WTF?
	</li>
<li>
		Put a watch on the db.Database.Genres object and note the sql statement is is going to execute. The table name is &#8220;dbo.Genres&#8221;.<br />
		The issue? Your datbase doesn&#8217;t have a &#8220;Genres&#8221; table it has a &#8220;Genre&#8221; table (minus the &#8216;s&#8217;).
	</li>
</ol>
<h2>Solution 1</h2>
<p>So to fix these issues I have done the following:</p>
<ol>
<li>
		Create a default constructor in the MvcMusicStoreEntities class like follows:<br />
<pre><code>
public MusicStoreEntities()
{
&nbsp;&nbsp;&nbsp;&nbsp;this.Database.Connection.ConnectionString = 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ConfigurationManager.ConnectionStrings[&quot;MusicStoreDb&quot;].ConnectionString;
}
</code></pre><br />
		This over-rides the connection string with the one that we have specified in the web.config.<br />
<br/>
	</li>
<li>
		Pluralise your database.
<p>If your hosting your database on SQL Server you can use the SQL Management studio, or if you are hosting it in AppData then use the server explorer.<br />
		Right click on each table and select &#8220;Open Table Definition&#8221;. Press F4 to view the properties window, Edit the &#8220;Name&#8221; property and change the name of the table and add an &#8216;s&#8217; to the end, Genre -> Genres, Album -> Albums, Artist -> Artists etc. Save the file to apply the name change.
	</li>
<li>Edit: A bit more digging and I also found this solution to the Pluralised problem, this removes the pluralised table names. Probably a bit easier than the above solution<br />
In your MusicStoreEntities class add the following<br />
<pre><code>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;using System.Data.Entity.ModelConfiguration.Conventions;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;protected override void OnModelCreating(DbModelBuilder modelBuilder)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;modelBuilder.Conventions.Remove&lt;PluralizingTableNameConvention&gt;();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</code></pre>
</li>
<p>	Debug your site and it should all work now.
</ol>
<h2>Solution 2</h2>
<p>In attempting to work out the above solution I also found a second solution.</p>
<ol>
<li>
	Ensure the constructor is removed from the MusicStoreEntities class.
	</li>
<li>
		Edit the web.config file and add the following connection string<br />
		<pre><code>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;connectionStrings&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;add name=&quot;MusicStoreDb&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connectionString=&quot;Data Source=.\SQLEXPRESS;Integrated Security=True;&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;providerName=&quot;System.Data.SqlClient&quot; /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/connectionStrings&gt;
&nbsp;&nbsp;&nbsp;&nbsp;</code></pre>
	</li>
<li>
		Add the Sample Data as on page 47 &#038; 48 of the PDF guide.
	</li>
<p>	Debug your site and it should work.
<p>
	Launch SQL Mangement Studio and refresh the list of databases, you will see you new database [MvcMusicStore.Models.MusicStoreEntities] and look at the tables and they have pluralised names.</p>
</ol>
<p>Hope this works for you as it did for me. Happy MVC&#8217;ing.</p>
]]></content:encoded>
			<wfw:commentRss>http://ntsblog.homedev.com.au/index.php/2011/11/11/how-to-run-mvcmusicstore-v3-0-with-sql-server-express/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hyper-V Server virtual machine network connection failure &#8211; vm network issues</title>
		<link>http://ntsblog.homedev.com.au/index.php/2011/10/12/hyper-v-server-virtual-machine-network-connection-failure/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hyper-v-server-virtual-machine-network-connection-failure</link>
		<comments>http://ntsblog.homedev.com.au/index.php/2011/10/12/hyper-v-server-virtual-machine-network-connection-failure/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 10:52:55 +0000</pubDate>
		<dc:creator>jcrawfor74</dc:creator>
				<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://jcrawfor74.wordpress.com/?p=356</guid>
		<description><![CDATA[Hi, This has been a problem that has haunted me for over 18 months now and finally I have a solution. The Problem I have been creating virtual machines and been getting inconsistent success with getting the virtual network card inside the Virtual machine to successfully connect to the network. It will start up with [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>This has been a problem that has haunted me for over 18 months now and finally I have a solution.</p>
<p><strong>The Problem</strong></p>
<p>I have been creating virtual machines and been getting inconsistent success with getting the virtual network card inside the Virtual machine to successfully connect to the network. It will start up with a yellow &#8220;Warning&#8221; icon showing and when you confirm the IP Addres settings it is an invalid 169.x.x.x address. I am attempting to use DHCP to assign the IP.</p>
<p>I this situtation I have tried the following:</p>
<ol>
<li>netsh int ip reset &#8211; followed by a reboot.</li>
<li>stop the VM, remove the network card completely, start the VM and login, shutdown the VM, add the network card back, start the vm and login</li>
<li>changed the MAC ADDRESS on the virtual card to ensure it is not conflicting on the network.</li>
</ol>
<p>All of these have failed.</p>
<p>This has been really confusing as I have created 2 Virtual Machines at the same time, from the same sysprep&#8217;d .vhd image and one will succeed and one will fail!!!</p>
<p>The only thing that has worked is to assign a static IP address.</p>
<p><strong>Solution</strong></p>
<p><strong></strong>A friendly member of the infrastructure team where I am working fixed it in about 2 seconds.</p>
<p>Apparently due to the way the newtork as been configured we run a virtual Lan, its number so happens to be 100.</p>
<p>So in hyper-v server find this screen:<br />
<a href="https://skydrive.live.com/?cid=9ca9c32de073d9e0&amp;id=9CA9C32DE073D9E0%21343#!/?cid=9ca9c32de073d9e0&amp;sc=documents&amp;id=9CA9C32DE073D9E0%21343!cid=9CA9C32DE073D9E0&amp;id=9CA9C32DE073D9E0%21344&amp;sc=documents" target="_new"> <img src="https://public.bay.livefilestore.com/y1przRXuwhZbCKa4BGf0sqWaH08gY6EsiK8EQGunmu5SrmIqBSBj1EdKvgAhUkfCFOqJbkgmp764AclOIkJxYeASg/Hyperv01.png?psid=1" alt="" /></a></p>
<p>And change it to something like this:<br />
<a href="https://skydrive.live.com/?cid=9ca9c32de073d9e0&amp;id=9CA9C32DE073D9E0%21343#!/?cid=9ca9c32de073d9e0&amp;sc=documents&amp;id=9CA9C32DE073D9E0%21343!cid=9CA9C32DE073D9E0&amp;id=9CA9C32DE073D9E0%21345&amp;sc=documents" target="_new"><img src="https://public.bay.livefilestore.com/y1przRXuwhZbCIDjenwM2adXSm6SXINnDrK2-ya-LIWCSM-mOMbIHFQRuRtDn3Nhgv21UW6Qf3EWeR-I-Pp3GPLhQ/Hyperv02.png?psid=1" alt="" /></a></p>
<p>This sovled my problem.</p>
<p>I don&#8217;t know why sometimes it was set correctly and other times not, but this definitely solved my problems.</p>
<p>Let me know if it works for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://ntsblog.homedev.com.au/index.php/2011/10/12/hyper-v-server-virtual-machine-network-connection-failure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup App.Config during .msi install, msi re-installing</title>
		<link>http://ntsblog.homedev.com.au/index.php/2011/08/17/setup-app-config-during-msi-install-msi-re-installing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=setup-app-config-during-msi-install-msi-re-installing</link>
		<comments>http://ntsblog.homedev.com.au/index.php/2011/08/17/setup-app-config-during-msi-install-msi-re-installing/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 14:23:43 +0000</pubDate>
		<dc:creator>jcrawfor74</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[Windows Forms]]></category>

		<guid isPermaLink="false">http://jcrawfor74.wordpress.com/?p=338</guid>
		<description><![CDATA[The Issue I wrote a windows form application that deployed  via an .msi installer. The application has an App.Config file which contains a single configuration value. I wanted to prompt the user for this value during the installation wizard and write it to the application.exe.config file as part of the installation process. I used the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The Issue</strong></p>
<p>I wrote a windows form application that deployed  via an .msi installer.</p>
<p>The application has an App.Config file which contains a single configuration value. I wanted to prompt the user for this value during the installation wizard and write it to the application.exe.config file as part of the installation process.</p>
<p>I used the built in Setup project in Visual Studio 2010.</p>
<p><strong>The solution</strong></p>
<p>I could write it all here in my post but I have found one that was created earlier:</p>
<p><a href="http://raquila.com/software/configure-app-config-application-settings-during-msi-install/" target="top">http://raquila.com/software/configure-app-config-application-settings-during-msi-install/</a></p>
<p>I essentially implemented the same solution but I wrote my .config file using a StringBuilder and deleted and re-wrote the.config file in the Post install custom action.</p>
<p>The other thing is that I created short cuts to the application by right-clicking on the primary output and chosing &#8220;Create Shortcut&#8221;, then I copied this to the desktop and users program menu locations.</p>
<p><strong>The problem</strong></p>
<p>I was installing this for &#8220;Everyone&#8221; and it would work fine for me, but when other people logged in and tried to launch the program the .msi would run and the application.exe.config file was being overwritten with the orginal version that was deployed with the .msi, which does not contain the users input.</p>
<p><strong>The Fix</strong></p>
<p>The problem is complicated and is related to the application short-cut.</p>
<p>It appears that by default the short-cuts created in the msi are &#8220;Advertised ShortCuts&#8221;.</p>
<p>According to microsoft when an advertised shortcut is activated &#8220;.. the installer verifies that all the components in the feature are installed before launching this file&#8221;.</p>
<p>This means that if you delete any of the files that were deployed to the installation location then the .msi will attempt to fix them and re-install the missing components, which in my case means that the application.exe.config is overwritten.</p>
<p>You can identify the &#8220;Advertised&#8221; short cut by looking at the &#8220;Properties&#8221; of a short-cut and the &#8220;Target&#8221; will be greyed out.</p>
<p>I found the post below that identifies an easy way to disable advertised shortcuts.</p>
<p>You need to set the &#8220;DISABLEADVTSHORTCUTS&#8221; property on the .msi. This can be done easily in the installer, I have my custom UI that is getting details from the user for the &#8220;Edit1Property&#8221; so in the Edit2Property I set these values and keep it invisible.</p>
<ul>
<li>Edit2Property: DISABLEADVTSHORTCUTS</li>
<li>Edit2Value: 1</li>
<li>Edit2Visible: false</li>
</ul>
<p>This updates the property table in the .msi and now all your short-cuts will be normal standard shortcuts.</p>
<p><a href="http://social.msdn.microsoft.com/forums/en-US/winformssetup/thread/b0a3e6d5-38f0-4a37-9418-dd8d9297ef97/">http://social.msdn.microsoft.com/forums/en-US/winformssetup/thread/b0a3e6d5-38f0-4a37-9418-dd8d9297ef97/</a></p>
<p>Cheers <img src='http://ntsblog.homedev.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Final Tip: Setting the shortcut icon</strong></p>
<p>Another tip is to set the icon based on the icon embeded in your .exe.</p>
<ul>
<li>In the File System Editor, click on the ShortCut and view the properties</li>
<li>Click on the icon property</li>
<li>choose browse,</li>
<li>change from .ico to .exe</li>
<li>browse to the &#8220;Primary-Output for&#8230;&#8221; and choose OK.</li>
</ul>
<p>It will show you the icons embeded in your .exe and this way you don&#8217;t need to deploy a seperate .ico file.</p>
]]></content:encoded>
			<wfw:commentRss>http://ntsblog.homedev.com.au/index.php/2011/08/17/setup-app-config-during-msi-install-msi-re-installing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

