<?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>D2 Computing Ltd</title>
	<atom:link href="http://www.d2computing.co.uk/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.d2computing.co.uk</link>
	<description>Bespoke Software Development</description>
	<lastBuildDate>Sat, 27 Oct 2012 16:43:39 +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>Solving Permission Denied Message With The Ajax Tookit AsyncFileUpload Control</title>
		<link>http://www.d2computing.co.uk/index.php/solving-permission-denied-message-with-the-ajax-tookit-asyncfileupload-control/</link>
		<comments>http://www.d2computing.co.uk/index.php/solving-permission-denied-message-with-the-ajax-tookit-asyncfileupload-control/#comments</comments>
		<pubDate>Sat, 27 Oct 2012 16:43:39 +0000</pubDate>
		<dc:creator>Paul Durbar</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.d2computing.co.uk/?p=239</guid>
		<description><![CDATA[Had a problem that threw me for a few minutes today. I&#8217;d implemented a photo upload/resize section for a customers website which was working fine when I&#8217;d last been working on it. I came to finish off the code and, on testing the AsyncFileUpload control, it was now throwing the following error when trying to upload a photo: This was strange as ...]]></description>
			<content:encoded><![CDATA[<p>Had a problem that threw me for a few minutes today. I&#8217;d implemented a photo upload/resize section for a customers website which was working fine when I&#8217;d last been working on it. I came to finish off the code and, on testing the AsyncFileUpload control, it was now throwing the following error when trying to upload a photo:</p>
<p><a href="http://www.d2computing.co.uk/wp-content/uploads/2012/10/AsyncFileUpload-error.jpg"><img class="alignnone size-full wp-image-240" title="AsyncFileUpload Error" src="http://www.d2computing.co.uk/wp-content/uploads/2012/10/AsyncFileUpload-error.jpg" alt="" width="354" height="194" /></a></p>
<p>This was strange as it was all fine when I&#8217;d last worked on the code. As the error indicated permissions my first thought was to grant the ASPNET account write permission on the Gallery upload directory. This didn&#8217;t work.</p>
<p>Then, after scratching my head for a minute I suddenly realised the images I was using to test the upload were different, I&#8217;d originally been testing with whatever random images I had lying around in my Pictures directory but todays test had been with the clients own images which were much larger.</p>
<p>A quick alteration to add a new child web.config file to the /Admin subfolder where the upload page was located with the following code in it sorted the problem (you could alternatively just use the maxRequestLength in your main web.config but I only want to allow large uploads in the admin area, not the whole site so created a child web.config instead):</p>
<p><span style="color: #008000;"> &lt;?xml version=&#8221;1.0&#8243;?&gt; </span><br />
<span style="color: #008000;">&lt;configuration&gt;       </span><br />
<span style="color: #008000;">&lt;system.web&gt;         </span><br />
<span style="color: #008000;">&lt;httpRuntime executionTimeout=&#8221;240&#8243; maxRequestLength=&#8221;20480&#8243; /&gt;       </span><br />
<span style="color: #008000;">&lt;/system.web&gt; </span><br />
<span style="color: #008000;">&lt;/configuration&gt;</span></p>
<p>So just a tip, as the AsyncFileUpload control throws a javascript error, it wont give you the nice &#8220;upload size exceeded&#8221; message that a .NET server error would contain so I&#8217;d posted this to save anyone else wasting time looking for a permission error when that may not be the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.d2computing.co.uk/index.php/solving-permission-denied-message-with-the-ajax-tookit-asyncfileupload-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Visual Studio 2010 To Always Run As Administrator</title>
		<link>http://www.d2computing.co.uk/index.php/setting-visual-studio-2010-to-always-run-as-administrator/</link>
		<comments>http://www.d2computing.co.uk/index.php/setting-visual-studio-2010-to-always-run-as-administrator/#comments</comments>
		<pubDate>Sat, 21 Jul 2012 16:50:24 +0000</pubDate>
		<dc:creator>Paul Durbar</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.d2computing.co.uk/?p=210</guid>
		<description><![CDATA[Sometimes when working on a Project or Solution within VS2010 you&#8217;ll want the IDE running under the context of an Administrator level account. One of the main reasons for needing the application running as Administrator is using IIS rather than the built-in Visual Studio web server to run or test an application. A recent app I was working on comprised ...]]></description>
			<content:encoded><![CDATA[<p>Sometimes when working on a Project or Solution within VS2010 you&#8217;ll want the IDE running under the context of an Administrator level account.</p>
<p>One of the main reasons for needing the application running as Administrator is using IIS rather than the built-in Visual Studio web server to run or test an application. A recent app I was working on comprised a solution with a number of projects, one acting as parent and the rest designed to run as child applications in IIS e.g. <em>http://Project1/</em>, <em>http://Project1/Project2</em>, <em>http://Project1/Project3/</em>.</p>
<p>In this case, running debug under IIS was necessary as the inbuilt VS2010 web server does not have any concept of virtual directories or child applications.</p>
<p>Note that even if you have a simple project that can be built and debugged using the Visual Studio web server, it is always a good idea to test using IIS as well to avoid any nasty surprises when you release it to your hosting environment.</p>
<p>Opening a project of this nature in Visual Studio (not as administrator) will result in errors like:</p>
<div id="attachment_215" class="wp-caption alignnone" style="width: 570px"><a href="http://www.d2computing.co.uk/wp-content/uploads/2012/07/VS-load-error2.png"><img class="size-full wp-image-215" title="Visual-Studio-load-error" src="http://www.d2computing.co.uk/wp-content/uploads/2012/07/VS-load-error2.png" alt="" width="560" height="97" /></a>
<p class="wp-caption-text">Visual Studio non-Administrative Load Error</p>
</div>
<p>&nbsp;</p>
<p>Along with a popup:</p>
<p><a href="http://www.d2computing.co.uk/wp-content/uploads/2012/07/VS-load-error-popup.png"><img class="alignnone size-full wp-image-216" title="VS-load-error-popup" src="http://www.d2computing.co.uk/wp-content/uploads/2012/07/VS-load-error-popup.png" alt="" width="400" height="164" /></a></p>
<p>The simple way to solve this is to right-click the shortcut you use to launch Visual Studio and choose &#8216;Run as Administrator&#8217;. Any Projects configured to use IIS for debug will now load happily.</p>
<p><a href="http://www.d2computing.co.uk/wp-content/uploads/2012/07/run-as-admin.png"><img class="alignnone size-full wp-image-217" title="run-as-admin" src="http://www.d2computing.co.uk/wp-content/uploads/2012/07/run-as-admin.png" alt="" width="338" height="199" /></a></p>
<p>The problem is though, most of the time you&#8217;ll forget to launch Visual Studio as Admin and there will be much wailing and gnashing of teeth as you are forced to close the Solution and re-open the application.</p>
<p>A more permanent solution is to configure the Visual Studio executable to always run under the context of the Administrator. This is simple, just right-click on your Visual Studio shortcut, chose Properties and it&#8217;ll show you the path to the executable that is launched.(<em>C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe</em> on my machine).</p>
<p>Within the same properties dialog, choose the Compatibility tab and check the &#8216;Run this program as an administrator&#8217; checkbox and apply. Note, you can (obviously) only do this is you are an administrative user.</p>
<div id="attachment_218" class="wp-caption alignnone" style="width: 342px"><a href="http://www.d2computing.co.uk/wp-content/uploads/2012/07/Compatibility.png"><img class="size-full wp-image-218" title="Compatibility" src="http://www.d2computing.co.uk/wp-content/uploads/2012/07/Compatibility.png" alt="" width="332" height="422" /></a>
<p class="wp-caption-text">Set Visual Studio Exe to Launch as Administrator</p>
</div>
<p>&nbsp;</p>
<p>Once this is set then your shortcut will now launch VS2010 as Administrator without you having to remember to right-click each time.</p>
<p>There is one more step you may wish to perform if you are in the habit of opening Visual Studio by opening the .sln or .<em>xx</em>proj files. These are handled in Visual Studio 2010 via the executable VSLauncher.exe (C:\Program Files (x86)\Common Files\microsoft shared\MSEnv on my machine) so to enable this to run as Administrator, right-click, view properties , open Compatibility tab and repeat steps above.</p>
<div id="attachment_220" class="wp-caption alignnone" style="width: 534px"><a href="http://www.d2computing.co.uk/wp-content/uploads/2012/07/VSLauncher.png"><img class="size-full wp-image-220" title="VSLauncher" src="http://www.d2computing.co.uk/wp-content/uploads/2012/07/VSLauncher.png" alt="" width="524" height="225" /></a>
<p class="wp-caption-text">VSLauncher.exe under C:\Program Files (x86)\Common Files\microsoft shared\MSEnv</p>
</div>
<p>&nbsp;</p>
<p>Your Visual Studio instance will now run as Admin if launched directly or via an associated file and there will be no more annoying need to re-launch the IDE.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.d2computing.co.uk/index.php/setting-visual-studio-2010-to-always-run-as-administrator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Parallels viable for use in day-to-day Windows development on OSX?</title>
		<link>http://www.d2computing.co.uk/index.php/is-parallels-viable-for-use-in-day-to-day-development/</link>
		<comments>http://www.d2computing.co.uk/index.php/is-parallels-viable-for-use-in-day-to-day-development/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 12:27:23 +0000</pubDate>
		<dc:creator>Paul Durbar</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.d2computing.co.uk/?p=99</guid>
		<description><![CDATA[I generally develop applications on two distinct platforms, Visual Studio 2010/SQL Server on the PC and XCode on the Mac. For Windows development I mainly use my speedy Core i7 desktop but I also need to develop on the move and in the evenings, when I want to code in front of the TV instead of tucked away in my ...]]></description>
			<content:encoded><![CDATA[<p>I generally develop applications on two distinct platforms, Visual Studio 2010/SQL Server on the PC and XCode on the Mac. For Windows development I mainly use my speedy Core i7 desktop but I also need to develop on the move and in the evenings, when I want to code in front of the TV instead of tucked away in my office.</p>
<p><img class="alignright size-medium wp-image-133" style="margin-left: 7px;" title="VM-Selector" src="http://www.d2computing.co.uk/wp-content/uploads/2012/03/VM-Selector-300x187.png" alt="Parallels Virtual Machines" width="300" height="187" />Like most Windows developers who own a Mac, I have a copy of Windows 7 installed on it using Bootcamp. This works great as Windows is running at native speed and performs superbly on the Apple Intel hardware. The only downside is having to reboot the machine every time I need to move between OSX and Windows.</p>
<p>This isn&#8217;t normally an issue, when I sit down for a development session, it&#8217;s normally XCode OR Visual Studio I need to use for a given task, not both.</p>
<p>Recently though, this need for a reboot began to grate on me. Working on the Ride Trader iPhone application, I was finding I needed to make changes to the server-side .NET service to compliment changes I was making on the iPhone code. This meant I was constantly swapping between OSX and Win 7 to change and test code. Also my favourite graphics app, Adobe Fireworks, is installed within Windows and is an expensive app so I certainly wasn&#8217;t going to fork out for another license for the OSX version as well!</p>
<p>I began to think about virtualisation, I&#8217;d tried running a development environment virtualised using Parallels on my old Core2Duo Mac Mini a while back and it hadn&#8217;t performed well at all so I&#8217;d given up on the idea at the time. My Macbook Pro though is packing a Core i5 processor and 4x more memory than my Mac Mini so I thought i&#8217;d give it another try.</p>
<p>Looking around at the available virtualisation solutions for OSX, the two most favoured commercial options are <a href="http://www.parallels.com/products/desktop/">Parallels Desktop</a> and <a href="http://www.vmware.com/products/fusion/overview.html">VMware Fusion</a>. Both are well regarded and both (going off user reviews) perform well. There is also the free <a href="https://www.virtualbox.org/">VirtualBox</a> solution but I did not try this as the commercial apps offered a few additional features that I felt I could use.</p>
<p>I went for Parallels Desktop 7 as it has a feature where an existing in-situ Bootcamp installation can be launched as a VM from within OSX. This enabled me to keep my Bootcamp partition in case I ever need to run something that will benefit from the full hardware horsepower (Left 4 Dead 2 for example).<a href="http://www.d2computing.co.uk/wp-content/uploads/2012/03/VM-Settings1.png"><img class="aligncenter size-full wp-image-173" title="VM-Settings" src="http://www.d2computing.co.uk/wp-content/uploads/2012/03/VM-Settings1.png" alt="" width="564" height="373" /></a></p>
<h2>Installation &amp; VM Setup</h2>
<p><a href="http://www.d2computing.co.uk/wp-content/uploads/2012/03/Create-VM.png"><img class="alignright size-medium wp-image-136" title="Create-VM" src="http://www.d2computing.co.uk/wp-content/uploads/2012/03/Create-VM-300x244.png" alt="Create new VM" width="300" height="244" /></a>Installing Parallels 7 is simple, just click the installer and&#8230;.thats it really. Setting up a VM is also very simple and intuitive, if it sees you have a Bootcamp partition present, it&#8217;ll ask you if you want to launch it from its own partition or fully import it into the OSX partition as a virtual machine (I use the former).</p>
<p>The VM creation screen also contains links for you to download free commonly used operating system images such as Fedora and Ubuntu Linux, Google Chrome OS and the Win 8 Consumer Preview. Windows can be installed from either physical DVD media or an iso image stored on disk.</p>
<p>Once you create a new VM, there are a variety of options to control the resources allocated to it, the type of hardware to be virtualised and how it integrates with OSX. It offers a coherence mode where Windows applications appear as if they are actually running within OSX itself but I prefer to keep them distinct with Windows running within its own window or running full screen mode as if it were native.</p>
<h2>Performance</h2>
<p>Performance is great on my mid 2010 Macbook Pro! I set my Bootcamp installation to use 2 of the 4 available processor cores and 2.2 GB of the available memory (my Macbook has 8GB), seems Windows requires less to run in a VM that it would on native hardware. The VM launches swiftly (far, far quicker than a reboot) and for most of the time performs as well as running Windows natively. There is the occasional tiny lag to remind you that you are running a VM instead of real hardware but its nowhere near a level that could affect a coding session.</p>
<p>I have been working within Visual Studio 2010, Fireworks and SQL Server within the VM at the same time with no issue whatsoever and these can all be resource hogs. Similarly I have noticed no slowdown within the OSX Lion host.</p>
<p>As a test, I tried running the above setup and then also launched and played a platform game within Ubuntu Linux and the machine coped fine with this, all three OS&#8217;s performed as i&#8217;d expect them to on a half decent native machine. By this point though, OSX was showing 7 GB out of the 8GB of physical memory in use so I think I&#8217;d reached the limit of what would run at an acceptable level of performance.</p>
<h2>Gotchas</h2>
<p>I&#8217;ve not really come across any downside of moving to a VM work environment but one issue which cropped up was, because the hardware that the VM provides is different to the native hardware, several of the registered applications on my Bootcamp installation decided they were no longer registered or activated when running in the VM. This isn&#8217;t a problem unless it decides you have exceeded your license allocation, which my Adobe Web Suite did. I spent a frustrating half hour chatting to Adobe support trying to explain that I <strong>didn&#8217;t</strong> want a second license, it was the SAME machine and SAME Windows installation. The guy couldn&#8217;t grasp what I meant and kept saying I wasn&#8217;t entitled to an OSX license but eventually gave up and reset my license count <img src='http://www.d2computing.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Windows itself and Microsoft Office 2010 also needed re-activating, although all apps only needed activating the first time they were run via the VM and were fine on subsequent launches. Still bad news though as it still uses one of my allocated activation entitlements when it theoretically shouldn&#8217;t.</p>
<h2>Conclusion</h2>
<p>In answer to my initial question, is it feasible to use a VM&#8217;d copy of Windows as a daily development environment then, <strong>yes</strong>, absolutely. I&#8217;ve found i&#8217;ve not had to physically boot into the Bootcamp partition once since installing Parallels. Obviously it won&#8217;t work for all the apps, games are a good example, they need full access to the physical hardware to run at their best even though they &#8216;will&#8217; run within the Parallels VM (I&#8217;ve tried).</p>
<p>Its not a cheap solution but shopping around, I managed to pick up Parallels 7 for £45 which, given how much it helps my productivity, was a good buy.</p>
<p>Heres a shot of my Windows 7 copy of Fireworks running magically within OSX:</p>
<div id="attachment_165" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.d2computing.co.uk/wp-content/uploads/2012/03/Full-VM-Screen-small.png"><img class="size-full wp-image-165" title="Full-VM-Screen-small" src="http://www.d2computing.co.uk/wp-content/uploads/2012/03/Full-VM-Screen-small.png" alt="" width="500" height="312" /></a>
<p class="wp-caption-text">Windows 7 Fireworks running speedily within OSX Lion</p>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.d2computing.co.uk/index.php/is-parallels-viable-for-use-in-day-to-day-development/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
