<?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>Development Blog</title>
	<atom:link href="http://blog.yeticode.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.yeticode.co.uk</link>
	<description>John Tindell's Blog For Development Related Things</description>
	<lastBuildDate>Tue, 14 Feb 2012 19:05:27 +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>Failed to run method &#8216;Microsoft.Web.Farm.SyncApplicationsRemoteMethod&#8217; on server</title>
		<link>http://blog.yeticode.co.uk/2012/01/failed-to-run-method-microsoft-web-farm-syncapplicationsremotemethod-on-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=failed-to-run-method-microsoft-web-farm-syncapplicationsremotemethod-on-server</link>
		<comments>http://blog.yeticode.co.uk/2012/01/failed-to-run-method-microsoft-web-farm-syncapplicationsremotemethod-on-server/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 01:21:38 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development Log]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[IIS7]]></category>
		<category><![CDATA[Web Farm Framework]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=944</guid>
		<description><![CDATA[I have currently been having an issue with Web Farm Framework 2 not provisioning my applications correctly. I would receive and error message saying that it could not delete the temp app pool file on the secondary server. Failed to &#8230; <a href="http://blog.yeticode.co.uk/2012/01/failed-to-run-method-microsoft-web-farm-syncapplicationsremotemethod-on-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have currently been having an issue with Web Farm Framework 2 not provisioning my applications correctly. I would receive and error message saying that it could not delete the temp app pool file on the secondary server.</p>
<pre>
Failed to run operation 'ProvisionApplications'.
Failed to run method 'Microsoft.Web.Farm.SyncApplicationsRemoteMethod' on server 'xx.xx.xx.xx'.
Exception in response stream. An error was encountered when processing operation 'Delete File' on 'APCE41E.tmp'.
The error code was 0x80070020.
The process cannot access 'C:\inetpub\temp\appPools\APCE41E.tmp' because it is being used by another process.
Exception in response stream. An error was encountered when processing operation 'Delete File' on 'APCE41E.tmp'.
The error code was 0x80070020.
The process cannot access 'C:\inetpub\temp\appPools\APCE41E.tmp' because it is being used by another process.
</pre>
<p>This can be resolved by ignoring the appPool temp files from the sync. To do edit the the ignore list in c:\windows\system32\inetsrv\conf\applicationHost.config on the web farm controller so that the web farm includes the following skip directives.</p>
<pre>
&lt;webFarm&gt;
  &lt;applicationProvision offlineWhileSync="true" syncWebServerFromPrimary="true" periodicSync="00:00:30"&gt;
    &lt;clear /&gt;
    &lt;skipDirectives&gt;
      &lt;skip name="appPools" skipDirective="objectName=dirPath,absolutePath=.*appPools.*" /&gt;
      &lt;skip name="logFiles" skipDirective="objectName=dirPath,absolutePath=.*LogFiles.*" /&gt;
    &lt;/skipDirectives&gt;
  &lt;/applicationProvision&gt;
&lt;/webFarm&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2012/01/failed-to-run-method-microsoft-web-farm-syncapplicationsremotemethod-on-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Backup IIS Server Package to Amazon S3 using C#</title>
		<link>http://blog.yeticode.co.uk/2012/01/backup-iis-server-package-to-amazon-s3-using-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=backup-iis-server-package-to-amazon-s3-using-c</link>
		<comments>http://blog.yeticode.co.uk/2012/01/backup-iis-server-package-to-amazon-s3-using-c/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 22:57:21 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development Log]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[S3]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=926</guid>
		<description><![CDATA[I recently updated our backup process at work to store our backups on Amazon S3. I wanted a simple process to that would backup the IIS server configuration and website files that can be easily be restored on a new &#8230; <a href="http://blog.yeticode.co.uk/2012/01/backup-iis-server-package-to-amazon-s3-using-c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently updated our backup process at work to store our backups on Amazon S3. I wanted a simple process to that would backup the IIS server configuration and website files that can be easily be restored on a new server in case of a major problem. Luckily Microsoft have release <a href="http://www.iis.net/download/webdeploy">MSDeploy</a> which can be installed using the <a href="http://www.microsoft.com/web/downloads/platform.aspx">Web Platform Installer</a>.</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2012/01/image1.png" rel="lightbox[926]"><img class="alignleft size-medium wp-image-928" title="image1" src="http://blog.yeticode.co.uk/wp-content/uploads/2012/01/image1-300x181.png" alt="" width="300" height="181" /></a></p>
<p>Within IIS you can backup everything to a server package by opening the context menu selecting depoy, then “Export Server Package”. This will create the server package containing the IIS configuration along with all the sites and their files. This is all good however it is still a manual process that is likely to be forgotten about after a while. Likely there are a series of libraries we can use to automate this process.</p>
<p>The namespace Microsoft.Web.Deployment provide the functionality we need to backup IIS, this is provided by Microsoft.Web.Deployment.dll. To backup the server we need to use the DeploymentManager to create an object use to create the package, we can then use this to “sync” the server setting to a package.</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2012/01/image2.png" rel="lightbox[926]"><img class="alignleft size-medium wp-image-929" title="image2" src="http://blog.yeticode.co.uk/wp-content/uploads/2012/01/image2-300x72.png" alt="" width="300" height="72" /></a></p>
<p>After we have backed up the site package we need to upload it to Amazon S3. To do this we can use the AWSSDK .NET library. The library can be installed via NuGet by searching for “AWS SDK”. This will install the required assemblies.</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2012/01/image3.png" rel="lightbox[926]"><img class="alignleft size-medium wp-image-930" title="image3" src="http://blog.yeticode.co.uk/wp-content/uploads/2012/01/image3-300x168.png" alt="" width="300" height="168" /></a></p>
<p>We can use the AWS SDK to upload our server package zip to S3 using the TransferUtilityUploadRequest to create our request to use with the TransferUtility to upload our file.</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2012/01/image4.png" rel="lightbox[926]"><img class="alignleft size-medium wp-image-931" title="image4" src="http://blog.yeticode.co.uk/wp-content/uploads/2012/01/image4-300x88.png" alt="" width="300" height="88" /></a></p>
<p>When this is all tied together we have an app that will backup and upload the server package to S3.</p>
<p>I have attached a sample app that can be configured using the App.config</p>
<p><strong><a href="http://blog.yeticode.co.uk/wp-content/uploads/2012/01/yeticode-utility.zip">Download yeticode-utility.zip</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2012/01/backup-iis-server-package-to-amazon-s3-using-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MVC Update User Online via Action Filter</title>
		<link>http://blog.yeticode.co.uk/2012/01/mvc-update-user-online-via-action-filter/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mvc-update-user-online-via-action-filter</link>
		<comments>http://blog.yeticode.co.uk/2012/01/mvc-update-user-online-via-action-filter/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 00:03:55 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development Log]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[MVC3]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=904</guid>
		<description><![CDATA[Action filter to update the currently logged in users last online time to allow you to identify which of your users are online /// &#60;summary&#62; /// User Online Action Filter Attribute /// &#60;/summary&#62; public class UserOnlineActionFilterAttribute : ActionFilterAttribute { /// &#8230; <a href="http://blog.yeticode.co.uk/2012/01/mvc-update-user-online-via-action-filter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Action filter to update the currently logged in users last online time to allow you to identify which of your users are online</p>
<pre>
/// &lt;summary&gt;
/// User Online Action Filter Attribute
/// &lt;/summary&gt;
public class UserOnlineActionFilterAttribute : ActionFilterAttribute
{
    /// &lt;summary&gt;
    /// Called by the ASP.NET MVC framework after the action method executes.
    /// &lt;/summary&gt;
    /// &lt;param name="filterContext"&gt;The filter context.&lt;/param&gt;
    public override void OnActionExecuted(ActionExecutedContext filterContext)
    {
        try
        {
            if (filterContext.HttpContext != null &#038;&#038; filterContext.HttpContext.User != null &#038;&#038; filterContext.HttpContext.User.Identity != null)
            {
                Membership.Provider.GetUser(filterContext.HttpContext.User.Identity.Name, true);
            }
        }
        catch
        {
            // BAD: Swallow the exception to prevent it messing with the users action
        }

        base.OnActionExecuted(filterContext);
    }
}
</pre>
<p>Add the action filter to the global list inside the global.asax Application_Start.</p>
<pre>
GlobalFilters.Filters.Add(new UserOnlineActionFilterAttribute());
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2012/01/mvc-update-user-online-via-action-filter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gnome 3 &#8211; Stupid Power Options Fix</title>
		<link>http://blog.yeticode.co.uk/2011/05/gnome-3-stupid-power-options-fix/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gnome-3-stupid-power-options-fix</link>
		<comments>http://blog.yeticode.co.uk/2011/05/gnome-3-stupid-power-options-fix/#comments</comments>
		<pubDate>Mon, 30 May 2011 21:42:05 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development Log]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=861</guid>
		<description><![CDATA[Upgraded to Fedora 15 and Gnome 3 everything is working well and the new interface is looking slick. The gnome guys have done a very good job and am very impressed. However I have come across on thing that, for &#8230; <a href="http://blog.yeticode.co.uk/2011/05/gnome-3-stupid-power-options-fix/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Upgraded to Fedora 15 and Gnome 3 everything is working well and the new interface is looking slick. The gnome guys have done a very good job and am very impressed. However I have come across on thing that, for a while, really pissed me off. They removed the ability to easily change the power options when you close the lid on your laptop. The default option is to suspend the computer. This isn&#8217;t a problem for a lot of people, even if there is a bug on the dell M1330 laptop which causes a crash when starting from a suspended state. I digress, a lot of work has done into this and has already been discussed in detail.</p>
<p>http://blogs.gnome.org/hughsie/2011/02/02/is-gnome-3-going-to-melt-your-laptop/</p>
<p>http://afaikblog.wordpress.com/2011/02/03/on-laptop-lids-and-power-settings/</p>
<p>http://live.gnome.org/Design/SystemSettings/Power</p>
<p>However all the discussion did not cover my use case, which occurs on a daily basis:</p>
<ol>
<li>Play audio book.</li>
<li>Run command to shutdown laptop after half an hour.</li>
<li>close laptop lid turn off lights and go to sleep.</li>
</ol>
<p>You can resolve this using the solution, provided by <a href="http://fedora.rasmil.dk/blog/?page_id=5">timlau</a>, to <a href="http://fedora.rasmil.dk/blog/?p=208">use gsetting to manually set the power setting</a> (He post links to a script to automatically set this using a zenity dialog).</p>
<pre>
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action “blank”
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action “blank”
</pre>
<p>End Rant.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2011/05/gnome-3-stupid-power-options-fix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adventures Into Web Farm Framework 2.0</title>
		<link>http://blog.yeticode.co.uk/2011/05/adventures-into-web-farm-framework-2-0/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=adventures-into-web-farm-framework-2-0</link>
		<comments>http://blog.yeticode.co.uk/2011/05/adventures-into-web-farm-framework-2-0/#comments</comments>
		<pubDate>Tue, 17 May 2011 23:03:57 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development Log]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=841</guid>
		<description><![CDATA[I have been using the Web Farm Framework 2.0 to handle the load balancing and provision of the applications. Our web farm consists of four servers, 1 load balancer, 2 web servers and 1 database server. The installation was simple &#8230; <a href="http://blog.yeticode.co.uk/2011/05/adventures-into-web-farm-framework-2-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been using the Web Farm Framework 2.0 to handle the load balancing and provision of the applications. Our web farm consists of four servers, 1 load balancer, 2 web servers and 1 database server. The installation was simple enough using the <a href="http://www.microsoft.com/web/downloads/platform.aspx">Web Platform Installer.</a></p>
<p><center><br />
<a href="http://blog.yeticode.co.uk/wp-content/uploads/2011/05/server-setup-blog.jpg" rel="lightbox[841]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2011/05/server-setup-blog-300x242.jpg" alt="" title="Web Farm Setup" width="300" height="242" class="alignnone size-medium wp-image-842" /></a><br />
</center></p>
<p>The web platform installer was used to install the Web Farm Framework 2.0 onto the load balancer. The guide &#8220;<a href="http://learn.iis.net/page.aspx/919/setting-up-a-server-farm-with-the-web-farm-framework-20-for-iis-7/">Setting up a Server Farm with the Web Farm Framework 2.0 for IIS 7</a>&#8221; provides an easy walk through for getting your web farm setup. However once it has been setup there are a number of steps that still had to be configured to ensure the web farm worked correctly.</p>
<p>
Before completing the following steps I ran into a an issue where the server would appear available for load balancing in the &#8220;Servers&#8221; view, but would be unavailable in the &#8220;Monitoring and Management&#8221; view. To resolve try the following steps.
</p>
<h2>1. Health Test Url</h2>
<p>Make sure that the health test url has been set. The application request routing uses this to test whether a server should be used for load balancing.</p>
<p><center><br />
<a href="http://blog.yeticode.co.uk/wp-content/uploads/2011/05/health-test.png" rel="lightbox[841]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2011/05/health-test-300x271.png" alt="" title="health-test" width="300" height="271" class="alignnone size-medium wp-image-846" /></a><br />
</center></p>
<h2>2. Default App Pool Settings</h2>
<p>
Edit the advanced settings of the DefaultAppPool on the controlling server and set the recyling value for &#8220;Regular Time Interval (minutes)&#8221; to zero.
</p>
<p><center><br />
<a href="http://blog.yeticode.co.uk/wp-content/uploads/2011/05/apppool.png" rel="lightbox[841]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2011/05/apppool-245x300.png" alt="" title="apppool" width="245" height="300" class="alignnone size-medium wp-image-849" /></a><br />
</center></p>
<h2>3. Set Primary and Secondary Servers to Response to Ping</h2>
<p>Update the firewall settings on the Primary and Secondary servers to respond to ping.</p>
<p><center><br />
<a href="http://blog.yeticode.co.uk/wp-content/uploads/2011/05/ping.png" rel="lightbox[841]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2011/05/ping-258x300.png" alt="" title="ping" width="258" height="300" class="alignnone size-medium wp-image-850" /></a><br />
</center></p>
<p>These are thing steps that I followed to get it to work correctly, they might vary for you depending on your setup.</p>
<h3>Related Reading</h3>
<table style="border: solid  0px white;">
<tr valign="top">
<td>
<a href="http://www.amazon.co.uk/gp/product/1430234040/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=worldoverride-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=1430234040"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2011/03/51E4HoB-MPL._SL160_.jpg" alt="" title="51E4HoB-MPL._SL160_" width="121" height="160" class="alignnone size-full wp-image-836" /></a><img src="http://www.assoc-amazon.co.uk/e/ir?t=worldoverride-21&#038;l=as2&#038;o=2&#038;a=1430234040" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
</td>
<td>
<p><a href="http://www.amazon.co.uk/gp/product/B0015DYJNU/ref=as_li_qf_sp_asin_tl?ie=UTF8&#038;tag=worldoverride-21&#038;linkCode=as2&#038;camp=1634&#038;creative=6738&#038;creativeASIN=B0015DYJNU"><img alt="" src="https://images-na.ssl-images-amazon.com/images/I/51JWACNnwOL._SL160_.jpg" class="alignnone" width="127" height="160" /></a><br />
<img src="http://www.assoc-amazon.co.uk/e/ir?t=worldoverride-21&#038;l=as2&#038;o=2&#038;a=B0015DYJNU" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2011/05/adventures-into-web-farm-framework-2-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IIS7 &amp; IIS Express 401 Access is denied due to invalid credentials Issue</title>
		<link>http://blog.yeticode.co.uk/2011/03/iis7-iis-express-401-access-is-denied-due-to-invalid-credentials-issue/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=iis7-iis-express-401-access-is-denied-due-to-invalid-credentials-issue</link>
		<comments>http://blog.yeticode.co.uk/2011/03/iis7-iis-express-401-access-is-denied-due-to-invalid-credentials-issue/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 10:05:55 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development Log]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[IIS Express]]></category>
		<category><![CDATA[IIS7]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=822</guid>
		<description><![CDATA[I have been working on a large web application using MVC3, NHibernate using IIS Express to debug and IIS7 to stage. I&#8217;m using the membership services provided by ASP.NET to handle user authentication and provide security to the system. However &#8230; <a href="http://blog.yeticode.co.uk/2011/03/iis7-iis-express-401-access-is-denied-due-to-invalid-credentials-issue/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been working on a large web application using MVC3, NHibernate using IIS Express to debug and IIS7 to stage. I&#8217;m using the membership services provided by ASP.NET to handle user authentication and provide security to the system. However I kept running across an issue, when accessing remotely, that was preventing me from logging in. Whenever I tried to view a page as a non logged in user I was returned a 404 Unauthorized error. </p>
<div id="attachment_823" class="wp-caption alignnone" style="width: 610px"><a href="http://blog.yeticode.co.uk/wp-content/uploads/2011/03/401.png" rel="lightbox[822]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2011/03/401.png" alt="401 - Unauthorized: Access is denied due to invalid credentials." title="401 - Unauthorized: Access is denied due to invalid credentials." width="600" height="183" class="size-full wp-image-823" /></a><p class="wp-caption-text">401 - Unauthorized: Access is denied due to invalid credentials.</p></div>
<p>After searching around for a solution to why this was not displaying the correct page, even if it was redirecting to the login page I decided to try to set the error displaying to return more information. After adding &lt;httpErrors errorMode=&#8221;Details&#8221; /&gt; to try and get a detail output from IIS the page started to work as expected.</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2011/03/webconfig.png" rel="lightbox[822]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2011/03/webconfig-300x95.png" alt="" title="system.WebServer" width="300" height="95" class="alignnone size-medium wp-image-827" /></a></p>
<p>With this option enabled the login page was now correctly displayed. This can be set without having to edit the web.config on IIS7 by editing the &#8220;Error Pages&#8221; features settings for your site in IIS. Set the Error Response to &#8220;Detailed errors&#8221;</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2011/03/errorpages.png" rel="lightbox[822]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2011/03/errorpages.png" alt="" title="Edut Error Pages Settings" width="407" height="378" class="alignnone size-full wp-image-831" /></a></p>
<h3>Related Reading</h3>
<table style="border: solid  0px white;">
<tr valign="top">
<td>
<a href="http://www.amazon.co.uk/gp/product/1430234040/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=worldoverride-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=1430234040"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2011/03/51E4HoB-MPL._SL160_.jpg" alt="" title="51E4HoB-MPL._SL160_" width="121" height="160" class="alignnone size-full wp-image-836" /></a><img src="http://www.assoc-amazon.co.uk/e/ir?t=worldoverride-21&#038;l=as2&#038;o=2&#038;a=1430234040" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
</td>
<td>
<p><a href="http://www.amazon.co.uk/gp/product/B0015DYJNU/ref=as_li_qf_sp_asin_tl?ie=UTF8&#038;tag=worldoverride-21&#038;linkCode=as2&#038;camp=1634&#038;creative=6738&#038;creativeASIN=B0015DYJNU"><img alt="" src="https://images-na.ssl-images-amazon.com/images/I/51JWACNnwOL._SL160_.jpg" class="alignnone" width="127" height="160" /></a><br />
<img src="http://www.assoc-amazon.co.uk/e/ir?t=worldoverride-21&#038;l=as2&#038;o=2&#038;a=B0015DYJNU" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2011/03/iis7-iis-express-401-access-is-denied-due-to-invalid-credentials-issue/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Javascript string.format</title>
		<link>http://blog.yeticode.co.uk/2010/08/javascript-string-format/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=javascript-string-format</link>
		<comments>http://blog.yeticode.co.uk/2010/08/javascript-string-format/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 12:56:42 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development Log]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=799</guid>
		<description><![CDATA[String.prototype.format = function () { formatted = this; for (i = 0; i < arguments.length; i++) { formatted = formatted.replace("{" + i + "}", arguments[i]); } return formatted; }]]></description>
			<content:encoded><![CDATA[<pre>
String.prototype.format = function () {
    formatted = this;
    for (i = 0; i < arguments.length; i++) {
        formatted = formatted.replace("{" + i + "}", arguments[i]);
    }
    return formatted;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2010/08/javascript-string-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My First Triathlon</title>
		<link>http://blog.yeticode.co.uk/2010/06/my-first-triathlon/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-first-triathlon</link>
		<comments>http://blog.yeticode.co.uk/2010/06/my-first-triathlon/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 21:06:38 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Running]]></category>
		<category><![CDATA[triathlon]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=725</guid>
		<description><![CDATA[So last Sunday I did my first sprint triathlon, the Mid Sussex Triathlon. The day started at 5.00 when me and Tom woke up to a quick breakfast and a cup of tea. A short drive to the Triangle Leisure &#8230; <a href="http://blog.yeticode.co.uk/2010/06/my-first-triathlon/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So last Sunday I did my first sprint triathlon, the <a href="http://www.midsussextriclub.com/MidSussexTriathlon/">Mid Sussex Triathlon</a>. The day started at 5.00 when me and Tom woke up to a quick breakfast and a cup of tea. A short drive to the Triangle Leisure Centre in Burgess Hill and we were set to have our numbers draw on us in the strongest permanent marker in the world (Which took 3 days to wash off). After registration we took our carefully packed tri boxes and bikes to the transition area.</p>
<p>After laying out my foot towel in the perfect foot drying position and my helmet, shades and top in the most efficient way possible. All this in the vein hope that when it came to the actual transition  I would have some clue what the hell I was supposed to be doing.</p>
<p>Stuff sorted we waiting casually chatting with the other competitors about the course and general pre-race banter. Ranging from our kit to subtle ways to psych one another out. After the race briefing the first swimmer started at 7.00. Me and my brother took a walk to the observation deck in the pool to watch the starters. This was when the nerves started to kick in.</p>
<p>More and more of the swimmers started my start time neared and my position in the line grew shorter. With only four competitors I turned to my brother, now feeling really nervous, and said &#8220;Whose stupid idea was this?&#8221; </p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2010/06/SSP_AB_1619.jpg" rel="lightbox[725]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2010/06/SSP_AB_1619-300x200.jpg" alt="Swimming Section" title="Swimming Section" width="300" height="200" class="alignnone size-medium wp-image-735" /></a></p>
<p>There was no one in front of me and I was in the pool. Three. Two. One. I was off. Nothing quite prepared myself from going from full of nerves to race mode. Halfway down the first length my body woke up and all the training I had done kicked in. No longer nervous. A single thought in my mind. Swim straight, don&#8217;t drown don&#8217;t waste to much energy.</p>
<p>The final length of the swim drew to a close and it was time to get out of the pool. Using the steps, as not to make a tit of myself if i fell over, I pulled myself out and started the run to the transition area to get ready for the bike ride. I had no idea what the hell I was supposed to be doing. I got to the transition area remembering only one thing. Make sure you helmet is on before you touch your bike. I stand on the towel, move my top out of the way and put my helmet on it. Pick up top and realise that I need to take my helmet off, put my top on, put my helmet on and step into my shoes. Now its time to pick up my bike and run with it to the mounting area. Enter the mounting area mounting my bike and start to ride narrowly missing a woman trying to get her bike into gear. A luck escape as I don&#8217;t think she would have been too happy if I had ridden into her. Exiting the leisure centre the race portion begins.</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2010/06/MA1D1157.jpg" rel="lightbox[725]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2010/06/MA1D1157-300x200.jpg" alt="Section Two - The Ride" title="Section Two - The Ride" width="300" height="200" class="alignnone size-medium wp-image-737" /></a></p>
<p>For the majority of the bike ride there was nothing to worry about. A side from needing to practice on gear changes on the hills it all went fairly well. I was taken back a few times as the more experienced competitors, on really expensive bikes, wizzed past me closer than I expected. But after the first couple of times that happened I started to check behind me more often so that I knew who was behind me, and so that I wasn&#8217;t causing an obstruction people who were clearly better than me. Like the people who overtook me on the steep up hill sections.</p>
<p>With the bike section drawing to a close I changed down gears to try and warm up my legs ready for the run. In my haste I changed down to many gears and was left coasting with my legs spinning around aimlessly. Coasting into the dismount area I jump off my bike and run it back to my place in the transition area to rack it up. Throwing my helmet into my box and picking up a bottle of water I head out for the final section, the run.</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2010/06/IMG_1954.jpg" rel="lightbox[725]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2010/06/IMG_1954-200x300.jpg" alt="" title="The Final Section - The Run" width="200" height="300" class="size-medium wp-image-739" /></a></p>
<p>Leaving the transition area water bottle in hand I start the run. My legs feeling heavy from the cycle I knew it would only be a little longer before they would feel normal again. The run went fine with brownies lining the route with list of everyone&#8217;s names and numbers ready to cheer you on just when you need it. With the final stretch drawing to a close, the cheers from the brownies getting louder and the finished line getting closer it was time to muster the last of my energy. It was time for a sprint finish. My legs where not quite feeling up to the job. Then I spy my bother, who had already finished waiting on the finish straight. I hold my arms out for a high five. High five received I now have the energy, pulled from the ether, to sprint the last little bit to the finish. Crossing the line and stopping my watch. Covered in sweat and in dire need for a shower and a cup of tea I look down at the time. 1:19:55. Happy that my first triathlon went better than my <a href="http://blog.yeticode.co.uk/2009/09/epic-fail-but-with-a-good-note/">first marathon</a>. </p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2010/06/SSP_AB_4478.jpg" rel="lightbox[725]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2010/06/SSP_AB_4478-200x300.jpg" alt="The Finish Line" title="The Finish Line" width="200" height="300" class="alignnone size-medium wp-image-738" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2010/06/my-first-triathlon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bazaar Plugin for OnTime Integration</title>
		<link>http://blog.yeticode.co.uk/2010/04/bazaar-plugin-for-ontime-integration/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bazaar-plugin-for-ontime-integration</link>
		<comments>http://blog.yeticode.co.uk/2010/04/bazaar-plugin-for-ontime-integration/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 22:26:01 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development Log]]></category>
		<category><![CDATA[bzr]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ontime]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=683</guid>
		<description><![CDATA[I was playing around with bazaar, whilst reviewing distributed version control systems (DVCS), and created a simple plugin for use with axosoft&#8217;s ontime. The plugin parses the commit message and links the files to the related task, defect or feature. &#8230; <a href="http://blog.yeticode.co.uk/2010/04/bazaar-plugin-for-ontime-integration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was playing around with <a href="http://bazaar.canonical.com/">bazaar</a>, whilst reviewing distributed version control systems (DVCS), and created a simple plugin for use with <a href="http://www.axosoft.com/ontime">axosoft&#8217;s ontime</a>. The plugin parses the commit message and links the files to the related task, defect or feature.<br />
<br/></p>
<h3>Install</h3>
<p>Download the tar file from [download id="3"]<br />
Extract and run the installer using the following:</p>
<pre>
tar -vxzf bzr-ontime-0.0.1.tar.gz
cd bzr-ontime-0.0.1
sudo python setup.py install
</pre>
<p><br/></p>
<h3>Configure</h3>
<p>Setup the database connection information.<br />
<strong>/etc/bzr-ontime.conf</strong></p>
<pre>[ontime]
server=your-mssql-server
username=sa
password=p4ssw0rd
database=ontime
</pre>
<p><br/></p>
<h3>Confirm Installation</h3>
<pre>bzr hooks
</pre>
<p>If the plugin is installed correct you should see the plugin listed under the post_commit section.</p>
<h3>Related Reading</h3>
<table>
<tr>
<td>
<a href="http://www.amazon.co.uk/gp/product/1590593561?ie=UTF8&#038;tag=worldoverride-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=1590593561"><img border="0" src="http://static.yeticode.co.uk/blog/images/dive_into_python.jpg"></a><img src="http://www.assoc-amazon.co.uk/e/ir?t=worldoverride-21&#038;l=as2&#038;o=2&#038;a=1590593561" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2010/04/bazaar-plugin-for-ontime-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running NHibernate in Medium Trust</title>
		<link>http://blog.yeticode.co.uk/2010/03/running-nhibernate-in-medium-trust/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=running-nhibernate-in-medium-trust</link>
		<comments>http://blog.yeticode.co.uk/2010/03/running-nhibernate-in-medium-trust/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 23:34:50 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development Log]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Castle]]></category>
		<category><![CDATA[Medium Trust]]></category>
		<category><![CDATA[NHibernate]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=636</guid>
		<description><![CDATA[After deploying a NHibernate to a shared host I started running into a number of issues. Whilst developing we were running in full trust not in medium trust whilst the majority of shared hosts use. After hours and hours of &#8230; <a href="http://blog.yeticode.co.uk/2010/03/running-nhibernate-in-medium-trust/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After deploying a NHibernate to a shared host I started running into a number of issues. Whilst developing we were running in full trust not in medium trust whilst the majority of shared hosts use. After hours and hours of searching I finally come across a <a href="http://groups.google.com/group/castle-project-users/browse_thread/thread/2451ef352523865f?hl=en&#038;pli=1">post</a> on the <a href="http://groups.google.com/group/castle-project-users?hl=en">Castle Project mailing list</a> which detailed how to get a nhibernate working under medium trust. Here is the steps I followed to get it working.</p>
<p>I am using NHibernate 2.1.2 and C# .NET 3.5 in Visual Studio 2008.</p>
<h3>Step 1</h3>
<p>Download Castle.Core from gitbhub<br />
git://github.com/castleproject/Castle.Core.git</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2010/03/Screenshot-1.png" rel="lightbox[636]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2010/03/Screenshot-1.png" alt="" title="Screenshot-1" width="489" height="337" class="alignnone size-full wp-image-647" /></a></p>
<h3>Step 2</h3>
<p>Enable Castle to allow partially trusted callers.<br />
Open buildscripts/CommonAssemblyInfo.cs and enable the library to enable partially trusted callers</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2010/03/Screenshot-2.png" rel="lightbox[636]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2010/03/Screenshot-2.png" alt="" title="Screenshot-2" width="589" height="286" class="alignnone size-full wp-image-654" /></a></p>
<h3>Step 3</h3>
<p>Disable generation of debug information for the projects Castle.Core and Castle.DynamicProxy.<br />
<a href="http://blog.yeticode.co.uk/wp-content/uploads/2010/03/Screenshot-4.png" rel="lightbox[636]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2010/03/Screenshot-4-300x175.png" alt="" title="Screenshot-4" width="300" height="175" class="alignnone size-medium wp-image-657" /></a></p>
<h3>Step 4</h3>
<p>Build the projects</p>
<h3>Step 5</h3>
<p>Download Nhibernate source code from source forge.</p>
<p>http://sourceforge.net/projects/nhibernate/files/</p>
<h3>Step 6</h3>
<p>Open Nhibernate.Everything.sln and update the references for the NHibernate.ByteCode.Castle project so that the references for Castle.Core and Castle.DynamicProxy2 are the libraries build in step 4. Disable generation of debug information for the projects NHibernate, Iesi.Collections and NHibernate.ByteCode.Castle, similar to what was done in step 3.</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2010/03/Screenshot-5.png" rel="lightbox[636]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2010/03/Screenshot-5-300x187.png" alt="" title="Screenshot-5" width="300" height="187" class="alignnone size-medium wp-image-661" /></a></p>
<h3>Step 7</h3>
<p>Copy the outputted library files from NHibernate.ByteCode/bin/Release to your shared libs folder of your project.</p>
<p><a href="http://blog.yeticode.co.uk/wp-content/uploads/2010/03/Screenshot-6.png" rel="lightbox[636]"><img src="http://blog.yeticode.co.uk/wp-content/uploads/2010/03/Screenshot-6-300x225.png" alt="" title="Screenshot-6" width="300" height="225" class="alignnone size-medium wp-image-663" /></a></p>
<h3>Step 8</h3>
<p>Update the references in your project to point to the new libraries. Next turn off reflection optimization. This needs to be done in code before you create the configuration object. Configuring this in the hibernate.cfg.xml does not work. Update all your projects assemblies to set allow partially trusted callers, similar to step 2. Update your web.config to set requirePermission=&#8221;false&#8221; in the nhibernate section delceration</p>
<pre class="c-sharp" name="code">
NHibernate.Cfg.Environment.UseReflectionOptimizer = false;
Configuration = new Configuration();
Configuration.Configure();
</pre>
<pre name="code" class="xml">
<configSections>
<section name="hibernate-configuration" requirePermission="false" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"/>
</configSections>
</pre>
<p>You can now run your site in medium trust using lay loading.</p>
<h2>Links</h2>
<ul>
<li><b>msysgit</b> &#8211; http://code.google.com/p/msysgit/</li>
<li><b>TortoiseGit</b> &#8211; http://code.google.com/p/tortoisegit/</li>
<li><b>NHibernate</b> &#8211; http://nhforge.org/</li>
<li><b>Castle.Core Source</b> &#8211; http://github.com/castleproject/</li>
<li><b>NHibernate Source</b> &#8211; http://sourceforge.net/projects/nhibernate/files/</li>
</ul>
<h2>Related Reading</h2>
<table>
<tr>
<td>
<a style="display:inline-block;" href="http://www.amazon.co.uk/gp/product/1932394923?ie=UTF8&#038;tag=yetiblog-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=1932394923"><img border="0" src="http://static.yeticode.co.uk/blog/images/nhibernate.jpg"></a><img src="http://www.assoc-amazon.co.uk/e/ir?t=yetiblog-21&#038;l=as2&#038;o=2&#038;a=1932394923" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
</td>
<td>
<a style="display:inline-block;" href="http://www.amazon.co.uk/gp/product/0321228103?ie=UTF8&#038;tag=worldoverride-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=0321228103"><img border="0" src="http://static.yeticode.co.uk/blog/images/open_source_dot_net.jpg"></a><img src="http://www.assoc-amazon.co.uk/e/ir?t=worldoverride-21&#038;l=as2&#038;o=2&#038;a=0321228103" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;display:inline-block;" />
</td>
<td>
<a style="display:inline-block;" href="http://www.amazon.co.uk/gp/product/1847198902?ie=UTF8&#038;tag=worldoverride-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=1847198902"><img border="0" src="http://static.yeticode.co.uk/blog/images/nhibernate_2.jpg"></a><img src="http://www.assoc-amazon.co.uk/e/ir?t=worldoverride-21&#038;l=as2&#038;o=2&#038;a=1847198902" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2010/03/running-nhibernate-in-medium-trust/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

