<?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>RichardFawcett.net</title>
	<atom:link href="http://www.richardfawcett.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richardfawcett.net</link>
	<description>Blog posts about stuff. Simples!</description>
	<lastBuildDate>Fri, 20 Apr 2012 14:22:30 +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>Estimating Effort</title>
		<link>http://www.richardfawcett.net/2012/04/20/estimating-effort/</link>
		<comments>http://www.richardfawcett.net/2012/04/20/estimating-effort/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 14:21:16 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[General Computing]]></category>
		<category><![CDATA[estimation]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://www.richardfawcett.net/?p=144</guid>
		<description><![CDATA[A few years ago, a former manager of mine taught me a valuable lesson about estimating the time it will take to complete a task in order to best meet expectations. Having done a significant amount of estimation recently, it &#8230; <a href="http://www.richardfawcett.net/2012/04/20/estimating-effort/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A few years ago, a former manager of mine taught me a valuable lesson about estimating the time it will take to complete a task in order to best meet expectations. Having done a significant amount of estimation recently, it brought the thought to the forefront of my mind.</p>
<p>The tl;dr version is: <strong>Guess how long it will take and add a bit</strong>.</p>
<p><em>Here comes the science bit … .</em></p>
<p>Let’s say that we’re asked to work out how long it will take to implement a feature on the project we’re working on. As an expert in the problem domain, we come up with the estimate that it will take 12 hours to complete. That’s just an estimate, so it follows that it will likely take a bit less, or a bit more time. What we have is something akin to a <a href="http://en.wikipedia.org/wiki/Normal_distribution">normal distribution</a> of the time it will take to complete the task. Maybe something like this:</p>
<p><a href="http://www.richardfawcett.net/wp-content/uploads/2012/04/normal.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="normal" border="0" alt="normal" src="http://www.richardfawcett.net/wp-content/uploads/2012/04/normal_thumb.png" width="244" height="124"></a></p>
<p>The problem is, if you tell your customer that it will take 12 hours to complete, that actually means that there’s a <strong>50% chance you’ll fail to deliver</strong>. Yes, you heard me, there’s a 50% chance that you will not be finished when the clock ticks over to 12 hours. That’s because half the area under the graph is to the right of 12 hours.&nbsp; In the following graph, the probability that you’ll succeed to meet an estimate of 12 hours is shown highlighted in pink:</p>
<p><a href="http://www.richardfawcett.net/wp-content/uploads/2012/04/normal_50.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="normal_50" border="0" alt="normal_50" src="http://www.richardfawcett.net/wp-content/uploads/2012/04/normal_50_thumb.png" width="244" height="124"></a></p>
<p><strong>Don’t set yourself up for failure like this</strong>. In this particular graph, the standard deviation of the curve is 1.5, but you will likely have a better feel of how accurate your estimates tend to be and can adjust your working accordingly. Now, in a normal distribution, around 95% of the area under the graph lies to the left of a point two standard deviations to the right of the mean. So, that’s 12 hours + 2 * 1.5 hours = 15 hours.&nbsp; So, in other words, if you think it will take 12 hours, giving your customer an estimate of 15 hours means you’re about 95% likely to meet, or exceed, that expectation.&nbsp; The graph becomes:</p>
<p><a href="http://www.richardfawcett.net/wp-content/uploads/2012/04/normal_95.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="normal_95" border="0" alt="normal_95" src="http://www.richardfawcett.net/wp-content/uploads/2012/04/normal_95_thumb.png" width="244" height="124"></a></p>
<p>No-one wants a failure rate of 50%, but 5% … not so bad.</p>]]></content:encoded>
			<wfw:commentRss>http://www.richardfawcett.net/2012/04/20/estimating-effort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing ASP.NET Session from ServiceStack</title>
		<link>http://www.richardfawcett.net/2012/02/29/accessing-asp-net-session-from-servicestack/</link>
		<comments>http://www.richardfawcett.net/2012/02/29/accessing-asp-net-session-from-servicestack/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 23:37:00 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ServiceStack]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://www.richardfawcett.net/?p=123</guid>
		<description><![CDATA[This content is based heavily upon an answer I posted on StackOverflow. Oh, ok then, it’s almost an exact copy. Recently, I’ve ripped WCF out of the heart of a project at work, and replaced it with ServiceStack. There were &#8230; <a href="http://www.richardfawcett.net/2012/02/29/accessing-asp-net-session-from-servicestack/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>This content is based heavily upon an </em><a href="http://stackoverflow.com/questions/8339584/how-can-i-use-a-standard-asp-net-session-object-within-servicestack-service-impl/9193782#9193782"><em>answer</em></a><em> I posted on </em><a href="http://stackoverflow.com"><em>StackOverflow</em></a><em>. Oh, ok then, it’s almost an exact copy.</em></p>
<p>Recently, I’ve ripped WCF out of the heart of a project at work, and replaced it with <a href="http://servicestack.net">ServiceStack</a>. There were a couple of reasons for doing this.&nbsp; Firstly, for the relatively simple API we wanted to expose, the configuration of endpoints and the like in `Web.config` for ServiceStack was overly complex, and also changed from client to client, depending on the base URL of their installation, and whether they ran our app over SSL or not.&nbsp; It was a maintenance headache, and broke several releases because of mis-configuration.</p>
<p>Secondly, I wasn’t keen on the amount of attributes that had to be dotted around my code to make it work with WCF.&nbsp; Also, classes in a WCF application often have dozens of methods, one for every service.&nbsp; The cohesion of these methods if often low, so the classes really break the concept of single responsibility.&nbsp; I wanted simper, more maintainable code!</p>
<p>ServiceStack has been a breath of fresh air. It prides itself on its simplicity, speed and friction-free development. Once configured in `Web.config`, the configuration is set in stone and doesn’t need to be tweaked.&nbsp; I can add new web services to the code trivially, and ServiceStack uses reflection at application startup to determine the full set of web methods, and even exposes the metadata nicely at an API documentation page.</p>
<p>There was, however, one major problem.&nbsp; Our application code relies quite heavily on the ASP.NET session, and in order to support this in a generic handler, the handler has to implement the marker interface `IRequiresSessionState`.</p>
<p>Unfortunately, ServiceStack didn’t do this in its generic handlers which are used to execute our web services. Instead, ServiceStack reimplements a light-weight, efficient Session object.&nbsp; However, the use of ASP.NET’s own (inferior) session was so baked in to our application that replacing it wasn’t practical.&nbsp; I had to find a solution.</p>
<p>To get around this limitation, I implemented two new classes, both of which use the decorator pattern to provide us with what we needed.</p>
<p>Firstly, a new IHttpHandler which requires session state. It wraps the IHttpHandler provided by ServiceStack, and passes calls through to it.</p>
<pre>
    public class SessionHandlerDecorator : IHttpHandler, IRequiresSessionState {
        private IHttpHandler Handler { get; set; }

        internal SessionHandlerDecorator(IHttpHandler handler) {
            this.Handler = handler;
        }

        public bool IsReusable {
            get { return Handler.IsReusable; }
        }

        public void ProcessRequest(HttpContext context) {
            Handler.ProcessRequest(context);
        }
    }
</pre>
<p>Next, a new `IHttpHandlerFactory` which delegates the responsibility for generating the `IHttpHandler` to ServiceStack, before wrapping the returned handler in our new `SessionHandlerDecorator`&#8230;</p>
<pre>
public class SessionHttpHandlerFactory : IHttpHandlerFactory {
    private readonly static ServiceStackHttpHandlerFactory factory = new ServiceStackHttpHandlerFactory();

    public IHttpHandler GetHandler(HttpContext context, string requestType, string url, string pathTranslated) {
        var handler = factory.GetHandler(context, requestType, url, pathTranslated);
        return handler == null ? null : new SessionHandlerDecorator(handler);
    }

    public void ReleaseHandler(IHttpHandler handler) {
        factory.ReleaseHandler(handler);
    }
}
</pre>
<p>Then, it&#8217;s just a matter of changing the `type` attributes in the handlers in Web.config to `SessionHttpHandlerFactory` instead of `ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack`, and my web services then had the ASP.NET session available to them in `HttpContext.Current.Session`.</p>]]></content:encoded>
			<wfw:commentRss>http://www.richardfawcett.net/2012/02/29/accessing-asp-net-session-from-servicestack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>O2 Disclose Mobile Numbers to Websites</title>
		<link>http://www.richardfawcett.net/2012/01/25/o2-disclose-mobile-numbers-to-websites/</link>
		<comments>http://www.richardfawcett.net/2012/01/25/o2-disclose-mobile-numbers-to-websites/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 14:53:00 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Non-IT]]></category>
		<category><![CDATA[Data Protection]]></category>
		<category><![CDATA[Law]]></category>

		<guid isPermaLink="false">http://www.richardfawcett.net/?p=118</guid>
		<description><![CDATA[Yesterday lunchtime, Lewis Peckover (@lewispeckover) noticed that mobile browsers on O2&#8242;s UK network were sending the phone&#8217;s number to websites as an HTTP header, resulting in this information being available to the websites browsed.&#160; This information is not present when &#8230; <a href="http://www.richardfawcett.net/2012/01/25/o2-disclose-mobile-numbers-to-websites/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday lunchtime, Lewis Peckover (<a href="http://twitter.com/lewispeckover">@lewispeckover</a>) <a href="https://twitter.com/#!/lewispeckover/status/161828764370747392">noticed</a> that mobile browsers on O2&#8242;s UK network were sending the phone&#8217;s number to websites as an HTTP header, resulting in this information being available to the websites browsed.&nbsp; This information is not present when browsing over WiFi, indicating that it is probably added in transit by O2.</p>
<p>The story gained momentum on Wednesday morning on Twitter, and as the image below shows, <a href="http://twitter.com/o2">O2&#8242;s Twitter account</a> was being inundated with people complaining about this.<br /><a href="http://www.richardfawcett.net/wp-content/uploads/2012/01/image.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardfawcett.net/wp-content/uploads/2012/01/image_thumb.png" width="244" height="180"></a></p>
<p>Around lunchtime today, the Guardian published <a href="http://www.guardian.co.uk/technology/2012/jan/25/02-mobile-phone-users-privacy-breach-website">an article</a> about the breach. In the article, it said that a spokesman from the <a href="http://www.ico.gov.uk/">Information Commissioner&#8217;s Office</a> said there was no immediate breach of the <a href="http://www.legislation.gov.uk/ukpga/1998/29/contents">Data Protection Act</a>, as a mobile phone number on its own is not classed as &#8220;personally identifiable information&#8221;.</p>
<p>This seemed nonsense to me, so I took a look at the legislation.</p>
<blockquote><p>1.(1) states that &#8220;personal data&#8221; means data which relate to a living individual who can be identified -<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (a) from those data, or<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (b) from those data and <strong>other information which is in the possession of</strong>, or is likely to come into the possession of, the data controller.</p>
</blockquote>
<p>I would argue that the phone number is personal data, as O2 can use it in conjunction with their billing records to identify the account holder.</p>
<p>1. (1) also states that &#8220;processing&#8221; in relation to data includes among other things, &#8220;disclosure of the information or data by transmission&#8221;.</p>
<p>So, at this point, we can say that O2 have processed personal data by transferring it to websites visited by the user of the phone.&nbsp; There are of course, many conditions laid out which govern the processing of data.&nbsp; The first principle (set out in <a href="http://www.legislation.gov.uk/ukpga/1998/29/schedule/1">Schedule 1</a>, Part 1, #1) reads:</p>
<blockquote><p>Personal data shall be processed fairly and lawfully and, in particular, shall not be processed unless -<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (a) at least one of the conditions in Schedule 2 is met, and<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (b) in the case of sensitive personal data, at least one of the conditions in Schedule 3 is met.</p>
</blockquote>
<p>Well, this isn&#8217;t <em>sensitive</em> personal data (which is limited to things like religion, political affiliation, sexual preference), so this means that O2 must satisfy at least one of the conditions in <a href="http://www.legislation.gov.uk/ukpga/1998/29/schedule/2">Schedule 2</a> before they can process the data. So, here are the conditions:</p>
<blockquote><p>1. The data subject has given consent to the processing.<br />2. The processing is necessary for the performance of a contract to which the data subject is a party, or for entering into such a contract<br />3. The processing is necessary for compliance with a legal obligation<br />4. The processing is necessary in order to protect the vital interests of the data subject<br />5. The processing is necessary for the administration of justice, for the exercise of functions of either House of Parliament, for the exercise of any functions of the Crown, or for the exercise of any other functions of a public nature exercised in the public interest by any person.</p>
</blockquote>
<p>So, a quick glance will tell you that O2 can only process this data if explicit permission has been given by the subject for them to do so.</p>
<p>Now, when signing up for a contract, you have to agree to the Privacy Policy of O2.&nbsp; Section 5 is entitled &#8220;<a href="http://www.o2.co.uk/privacy.html#disclosureofyourinformation">Disclosure of your Information</a>&#8221; and guess what… it doesn&#8217;t say that it will disclose it to every Tom, Dick or Harry who runs a website.&nbsp; So, by agreeing to their terms and conditions, data subjects do <em>not</em> consent for their information to be used in this way.</p>
<p>I&#8217;d argue that this means that O2 are in breach of the Data Protection Act.&nbsp; Case closed, although I&#8217;m no lawyer….</p>
<p>If you want to see whether you&#8217;re affected, Lewis has written a quick web page which will tell you if it&#8217;s being sent your phone number.&nbsp; Visit it at <a href="http://lew.io/headers.php">http://lew.io/headers.php</a>.</p>
</p>
<h2>Update 25-Jan-2012 15:39</h2>
<p>Since writing earlier today, O2 have issued <a href="http://blog.o2.co.uk/home/2012/01/o2-mobile-numbers-and-web-browsing.html">an explanation of what went wrong</a> on their blog. In it, they say that the problem has been occurring since 10th January owing to a bug. The reason it&#8217;s even possible is that this data is designed to be sent to trusted third parties for purposes of age verification etc. (and this <em>is</em> permitted by their privacy policy). However, given that the data doesn&#8217;t go over WiFi, then the trusted 3rd parties are only getting the information in certain cases, which makes it hard to understand how this could work for them.</p>
<p>The good news is that the <strong>data breach is now fixed</strong>, and O2 are co-operating with the Information Commissioner&#8217;s Office and have notified OFCOM. Full marks to O2 on the transparent way they&#8217;ve handled this.</p>]]></content:encoded>
			<wfw:commentRss>http://www.richardfawcett.net/2012/01/25/o2-disclose-mobile-numbers-to-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m British &#8211; SOPA Doesn&#8217;t Affect Me, Right?</title>
		<link>http://www.richardfawcett.net/2012/01/18/im-british-sopa-doesnt-affect-me-right/</link>
		<comments>http://www.richardfawcett.net/2012/01/18/im-british-sopa-doesnt-affect-me-right/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 13:46:00 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[General Computing]]></category>
		<category><![CDATA[Copyright]]></category>
		<category><![CDATA[Law]]></category>
		<category><![CDATA[SOPA]]></category>

		<guid isPermaLink="false">http://www.richardfawcett.net/?p=107</guid>
		<description><![CDATA[Wrong! The wording of the proposed SOPA legislation means that a huge number of websites can be classed as &#8220;facilitating the commission of copyright infringement&#8221;.&#160; For example: A blog which allows users to post comments An e-commerce site which allows &#8230; <a href="http://www.richardfawcett.net/2012/01/18/im-british-sopa-doesnt-affect-me-right/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong><font size="4">Wrong!</font></strong></p>
<p>The wording of the proposed SOPA legislation means that a huge number of websites can be classed as &#8220;<em>facilitating the commission</em> of copyright infringement&#8221;.&nbsp; For example:</p>
<ul>
<li>A blog which allows users to post comments</li>
<li>An e-commerce site which allows shoppers to leave reviews</li>
<li>Any other site which allows Internet users to upload content which could include copyrighted material</li>
</ul>
<p>But, I&#8217;m not subject to US jurisdiction… there&#8217;s nothing they can do, right?</p>
<p><strong>Wrong!</strong></p>
<p>If your site is classed as facilitating the commission of copyright infringement, the proposed legislation will allow the US government to force:</p>
<ul>
<li>ISPs to block access to your site in the USA (section 102(c)(2)(A)(i)) – no big deal for a UK-based small business I agree</li>
<li>Search engines (e.g. Google) to remove you from their listings (section 102(c)(2)(B) – hmm, that&#8217;s going to cause a problem</li>
<li>Ad providers (e.g. Google AdSense) from serving ads to your site – that could hurt my pocket a bit</li>
<li>Payment providers (e.g. PayPal) to terminate service to your site – ouch, I can&#8217;t sell anything!</li>
</ul>
<p>You can appeal against being cut off like this and can be granted a stay of execution, but only if you <em>subject yourself to the jurisdiction of the US courts</em>, and if you know about the action against you (<em>and the legislation does not even require that you&#8217;re notified!</em>)</p>
<p>This is a really big deal for users of the Internet across the whole world.&nbsp; Even if you&#8217;re a small cottage industry selling arts and crafts to UK citizens from a site hosted in the UK with a .co.uk web address, the chances are that a lot of your visitors will be referred by Google, and that you&#8217;ll use a US based payment provider such as PayPal.&nbsp; The US government would therefore be able to effectively shut down your website.</p>
<p>Don&#8217;t allow this to happen.&nbsp; As non-Americans, we have no congressman to lobby, but you can sign up to this <a href="https://donate.fightforthefuture.org/page/signup/state-dept-petition">petition to the US state department</a>.</p>
<p>Oppose SOPA.</p>
<p>The current text of the proposed SOPA bill can be viewed in its <a href="http://thomas.loc.gov/cgi-bin/query/z?c112:H.R.3261:">entirity here</a>. My information above is all taken from section 102.</p>]]></content:encoded>
			<wfw:commentRss>http://www.richardfawcett.net/2012/01/18/im-british-sopa-doesnt-affect-me-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Steve Jobs, 1955-2011</title>
		<link>http://www.richardfawcett.net/2011/10/06/steve-jobs-1955-2011/</link>
		<comments>http://www.richardfawcett.net/2011/10/06/steve-jobs-1955-2011/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 08:57:00 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[General Computing]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://www.richardfawcett.net/2011/10/06/steve-jobs-1955-2011/</guid>
		<description><![CDATA[Yesterday, the world lost a great visionary in Steve Jobs, who is synonymous with the Apple brand he co-founded. While reading reports of his death, I came across this great quote of his which I thought I&#8217;d share: No one &#8230; <a href="http://www.richardfawcett.net/2011/10/06/steve-jobs-1955-2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday, the world lost a great visionary in Steve Jobs, who is synonymous with the Apple brand he co-founded. While reading reports of his death, I came across this great quote of his which I thought I&#8217;d share:</p>
<blockquote><p>No one wants to die. Even people who want to go to heaven don&#8217;t want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because death is very likely the single best invention of life. It is life&#8217;s change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.</p>
<p>Your time is limited, so don&#8217;t waste it living someone else&#8217;s life. Don&#8217;t be trapped by dogma — which is living with the results of other people&#8217;s thinking. Don&#8217;t let the noise of others&#8217; opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.</p>
<p>Steve Jobs, 2005</p>
</blockquote>
<p><font color="#000000">Rest in peace.</font></p>]]></content:encoded>
			<wfw:commentRss>http://www.richardfawcett.net/2011/10/06/steve-jobs-1955-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Giving Something Back &#8211; Contributing to Open Source</title>
		<link>http://www.richardfawcett.net/2011/09/26/giving-something-back-contributing-to-open-source/</link>
		<comments>http://www.richardfawcett.net/2011/09/26/giving-something-back-contributing-to-open-source/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 19:54:00 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[General Computing]]></category>
		<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[NuGet]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.richardfawcett.net/2011/09/26/giving-something-back-contributing-to-open-source/</guid>
		<description><![CDATA[For years and years, I’ve used open source applications and libraries. The more I used, the more I felt guilty for taking advantage of other people’s hard work. I’m not sure I’m alone in feeling that, but for years I’ve &#8230; <a href="http://www.richardfawcett.net/2011/09/26/giving-something-back-contributing-to-open-source/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For years and years, I’ve used open source applications and libraries. The more I used, the more I felt guilty for taking advantage of other people’s hard work. I’m not sure I’m alone in feeling that, but for years I’ve wanted to give something back, and for some reason, never got round to it. I was thoroughly ashamed of myself. I’m a reasonably competent developer, and it was well within my power to do something about it.</p>
<p>I’ve used may different products: NuGet, Orchard, log4net, Cassandra, ELMAH, Glimpse, Ninject, Castle Windsor, jQuery, Modernizr, WordPress, Rhino Mocks. I could <strike>probably</strike> easily go on and list a hundred or so, but that’s not the point really.</p>
<p>At last, I’ve done it. Last week, I submitted a <a href="http://nugetdocs.codeplex.com/SourceControl/network/Forks/yeurch/FixGallerySetup/contribution/1527">pull request</a> to the <a href="http://nugetdocs.codeplex.com">NuGet Docs</a> project on CodePlex. It wasn’t a big change, it wasn’t even “real” code, just some fixes to the installation instructions for setting up a local copy of the <a href="http://nuget.org">NuGet gallery</a>. It was accepted.</p>
<p>I’ve now started one very small step down the road to giving back. I intend to do lots more. If you use open source products, and you have the skills to contribute, I strongly urge you to do so. Thanks.</p>]]></content:encoded>
			<wfw:commentRss>http://www.richardfawcett.net/2011/09/26/giving-something-back-contributing-to-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running ASP.NET 4.0 Web Applications on IIS 6</title>
		<link>http://www.richardfawcett.net/2011/09/16/running-asp-net-4-0-web-applications-on-iis-6/</link>
		<comments>http://www.richardfawcett.net/2011/09/16/running-asp-net-4-0-web-applications-on-iis-6/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 14:58:00 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET 4.0]]></category>
		<category><![CDATA[IIS 6]]></category>
		<category><![CDATA[MVC3]]></category>
		<category><![CDATA[Windows Server 2003]]></category>

		<guid isPermaLink="false">http://www.richardfawcett.net/2011/09/16/running-asp-net-4-0-web-applications-on-iis-6/</guid>
		<description><![CDATA[Today, I decided to install a NuGet gallery on our development server at work, in order that we can host our internal packages there, and make them easily available to all projects.&#160; The problem, our development server is not exactly &#8230; <a href="http://www.richardfawcett.net/2011/09/16/running-asp-net-4-0-web-applications-on-iis-6/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today, I decided to install a <a href="http://nuget.org">NuGet</a> gallery on our development server at work, in order that we can host our internal packages there, and make them easily available to all projects.&nbsp; The problem, our development server is not exactly state of the art, and runs Windows Server 2003 SP2 and IIS 6.0.&nbsp; It did <em>not</em> have ASP.NET 4.0 installed, which is a pre-requisite for the NuGet gallery application.</p>
<p>I was expecting quite a battle to get .Net 4 installed, configured, and working on the server.&nbsp; My fears were unfounded.&nbsp; I <a href="http://www.microsoft.com/download/en/details.aspx?id=17851">ran the installer</a>, rebooted, created a virtual directory, set it to ASP.NET version 4.0 (which required an IIS restart, more on this later), published the default &#8220;Welcome to ASP.NET&#8221; application, and voila!&nbsp; The result of a HEAD HTTP request to the new virtual directory (note the Server and X-AspNet-Version headers):</p>
<p><a href="http://www.richardfawcett.net/wp-content/uploads/2011/09/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardfawcett.net/wp-content/uploads/2011/09/image_thumb.png" width="509" height="200"></a></p>
<p>The website in action:</p>
<p><a href="http://www.richardfawcett.net/wp-content/uploads/2011/09/image1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardfawcett.net/wp-content/uploads/2011/09/image_thumb1.png" width="306" height="225"></a></p>
<p>It was almost too easy.</p>
<p>So, while I was on a roll, I decided to have a quick play around to find out if it would be easy enough to deploy <a href="http://www.asp.net/mvc/mvc3">MVC3</a> applications to the server.&nbsp; Unfortunately, it wasn&#8217;t quite so easy.&nbsp; I created another virtual directory and set it to .Net 4.&nbsp; I was surprised that the system prompted me to restart IIS again – I had assumed that this happened before because it was the first app I&#8217;d set to version 4.0.&nbsp; The prompt gives a hint about running <code>aspnet&#95;regiis –norestart –s &lt;VirtualPath&gt;</code>, but in this case, I didn&#8217;t know what the virtual path was.</p>
<p>After a little research, I found out that running <code>aspnet&#95;regiis –lk</code> lists the virtual directories on the server, and this is key to getting hold of the magic number that corresponds to the website.&nbsp; So, with that info, I was able to run:</p>
<p><code>aspnet&#95;regiis –norestart –s W3SVC/116872853/root/net4mvctest/</code></p>
<p>which updated my app to .Net 4 without needing an IIS restart.&nbsp; <em>Note that your virtual directory path will differ from the above!</em></p>
<p>MVC3 is not installed on the server, and I had no real wish to install it.&nbsp; To ensure that my app ran on the server, in Visual Studio I selected the menu item &#8220;Project –&gt; Add Deployable Dependences…&#8221; and ticked &#8220;ASP.NET MVC&#8221; and &#8220;ASP.NET Web Pages with Razor syntax&#8221;.&nbsp; Now, I deployed.&nbsp; The result… &#8220;Directory Listing Denied&#8221;.&nbsp; Hmmmm.</p>
<p>It turns out that when you deploy a .Net 4 app inside a .Net 2 website, you need to setup a wildcard extension so that .Net handles all requests to the application.&nbsp; On the application&#8217;s property pages in IIS Manager, I clicked &#8220;Configure&#8221; and inserted a new wildcard map to point to <code>C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet&#95;isapi.dll</code> and ensured that &#8220;Verify that file exists&#8221; was unticked.&nbsp; Ah, that&#8217;s better…</p>
<p><a href="http://www.richardfawcett.net/wp-content/uploads/2011/09/image2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardfawcett.net/wp-content/uploads/2011/09/image_thumb2.png" width="349" height="219"></a></p>
<p>All in all, it took me less than an hour to set all this up, including working through my problems.&nbsp; I&#8217;d say that was a good hour&#8217;s work.&nbsp; Now, I need to get on with configuring and deploying the NuGet gallery…</p>]]></content:encoded>
			<wfw:commentRss>http://www.richardfawcett.net/2011/09/16/running-asp-net-4-0-web-applications-on-iis-6/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Review of Google+</title>
		<link>http://www.richardfawcett.net/2011/07/14/a-review-of-google-plus/</link>
		<comments>http://www.richardfawcett.net/2011/07/14/a-review-of-google-plus/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 17:09:09 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[General Computing]]></category>
		<category><![CDATA[google+]]></category>
		<category><![CDATA[social networking]]></category>

		<guid isPermaLink="false">http://www.richardfawcett.net/?p=80</guid>
		<description><![CDATA[Since the launch of [Google+][1] last month, I&#8217;ve seen quite a few blog posts about whether Google+ has anything new to offer in the social media space, or indeed whether it will even _survive_. I thought I could maybe add &#8230; <a href="http://www.richardfawcett.net/2011/07/14/a-review-of-google-plus/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since the launch of [Google+][1] last month, I&#8217;ve seen quite a few blog posts about whether Google+ has anything new to offer in the social media space, or indeed whether it will even _survive_. I thought I could maybe add my tuppenceworth for good measure.</p>
<p>When I first heard about Google+, I couldn&#8217;t wait to take a look &#8211; the [demo videos][2] I saw on the Google Blog were incredibly slick, but didn&#8217;t really seem to give too much away. It&#8217;s only this last weekend, that I finally got an invite to the site and got started.</p>
<p>### First impressions</p>
<p>As I gleaned from the launch videos, the site is slick, uncluttered and well designed. Google have really given this some thought; the site looks modern and fresh. There is a nicely laid out help section, but it&#8217;s not easy to find. If you hunt hard enough, you&#8217;ll find it underneath the cog symbol on the Google+ Bar (their menu bar across the top of the page).</p>
<p>Now I&#8217;ve used Google+, the recent restyling of the web search result page makes total sense. It&#8217;s to give better visual integration between the different Google products. In the last day or two, they&#8217;ve also rebranded the calendar to match.</p>
<p>Another big win&#8230; I don&#8217;t get disturbed by countless requests to become a farmer, or manage a city, or answer inane personal questions about my friends.</p>
<p>### Integration</p>
<p>Integration with other Google products is a huge plus for Google+. I often sit with [Gmail][3] open in my browser all day. I also have my social media open&#8230; the [Facebook][10] web page and [MetroTwit][4], my current [Twitter][11] client of choice.</p>
<p>With Google though, everything is in once place. The new Google+ bar appears across the top of GMail, [Google Docs][8] and [Picasa Web Albums][7]. It has a number of features including a prominent notification icon to indicate when there&#8217;s something interesting I might want to look at, and even the functionality to share something with my Google+ contacts right from the menu bar. These functions are missing from the Google+ bar on the [calendar][9] for some reason though.</p>
<p>This is a huge plus point for me&#8230; having everything available from one portal to keep my PC decluttered.</p>
<p>Albums and photos from Picasa can be easily shared to your Google+ account. This integration alone is probably enough to stop me using [Flickr][5] and switch to Picasa instead.</p>
<p>### Privacy and Security</p>
<p>Everything&#8217;s in SSL! OK, so Facebook have started offering this, but it&#8217;s an opt-in thing that (I suspect) the vast majority of users don&#8217;t switch on. In fact, Facebook&#8217;s version is quite annoying, as any applications on your homepage that don&#8217;t support SSL result in a certificate warning in your browser for insecure content.</p>
<p>Google+ brings **circles** to the table for controlling who sees your post. In [his review][6], [@martinfowler](http://twitter.com/martinfowler &#8220;Martin Fowler &#8211; Twitter&#8221;) suggests that Circles are something new that neither Facebook nor Twitter offers. I&#8217;m not sure I agree. Facebook allows adding your friends to lists, and everything you post can be restricted to a set of people or lists by clicking the padlock icon immediately to the left of the &#8220;Share&#8221; button. However, I think one crucial difference is that Google+ pushes this choice in your face, and part of publishing an update is explicitly choosing which circles to make the post available to. With Facebook, this seems like an afterthought, and hence the mast majority of Facebook posts are visible to all friends (even the dodgy bloke you went to school with decades ago and has probably been in and out of prison a few times since). Google+ offers you a default set of circles to start with: Family, Friends, Acquaintances and Following. You can add a contact to more than one circle, and you can share a post with any number of circles.</p>
<p>The security model is so feature-rich, that I can even choose to share part of my profile only with selected circles. This is something Facebook doesn&#8217;t have. For example, Google+ gives me the option to share my employment history with all of my circles, but my places lived with just Friends and Family. Facebook gives me limited options like Everyone, Friends of Friends, Friends and Just Me.</p>
<p>If you&#8217;re tagged in album, that tag doesn&#8217;t automatically get made public &#8211; you have to approve it first. If someone tags a picture of you throwing up after too much drink, that&#8217;s not instantly going to be made public to all of your contacts. You can edit your profile to allow tags made by certain circles to be automatically approved if you&#8217;d like (I don&#8217;t think Aunty Mable will be tagging any defamotary images of me for example).</p>
<p>When viewing my profile, there&#8217;s a big option right at the top of the page to let me view the profile as it appears to another user. This is great. Check regularly to ensure that nothing sensitive is being &#8220;leaked out&#8221;. Yes, I know Facebook offers this, but it&#8217;s hidden deep inside the settings somewhere, and if I recall correctly they keep moving it (making it pretty hard to find at times!)</p>
<p>Fed up of Google+? You can download all of your data and delete your account. It&#8217;s not hidden&#8230; just go to &#8220;Account Settings -&gt; Data liberation&#8221; to get at your data&#8230; photos, profile data, stream data, circles and contacts, you name it. At the time of writing, Facebook have a lot of catching up to do in this respect, that&#8217;s for sure!</p>
<p>### Your Friend Doesn&#8217;t Use Google+? No Problem</p>
<p>You can add contacts to your circles even if they&#8217;re not Google+ users (as long as they have an email address). When you post an upate, you can tick a box to send an email of the update to your non-Google+ friends. This is innovative, but if I was the recipient, I&#8217;m not sure how much I&#8217;d appreciate getting updates from someone if I wasn&#8217;t an avid social network user?</p>
<p>### What Else Is There</p>
<p>##### Hangout</p>
<p>Hangout is a live multi-person video chat. Signing in to Hangout is like saying, &#8220;Hey, I&#8217;m hanging out, come and chat with me&#8221;. I haven&#8217;t used it yet (I don&#8217;t have enough friends on the service), but it looks fantastic. This, I have not seen anywhere else apart from the paid edition of [Skype][12].</p>
<p>##### Instant Upload</p>
<p>I&#8217;m not sure whether I think this is a good idea, or whether it violates my privacy a _little_ too much. I can&#8217;t use it as it&#8217;s ony available on the Android mobile app for now (and I&#8217;m an iPhone user). You can set your phone to automatically upload every photo you take to a private web album. Then, from anywhere, you can choose to share some of these photos with your contacts.</p>
<p>I wonder whether this will be possible on the iPhone version of the application. I suppose it all depends on what hooks are available in the iOS operating system, but I suspect this may not be possible on the platform.</p>
<p>##### Sparks</p>
<p>At the moment, I don&#8217;t know whether this is a gimmick or something I&#8217;ll find useful. Basically, you store a list of Google search terms, and they appear in your left hand menu. Click on them, and you&#8217;ll be presented with a list of hits published recently on the web. Each of the results can then easily be shared with your contacts (using the usual method where you specify which circles etc. receive the notification).</p>
<p>Personally, I&#8217;d love it if I could subscribe to RSS Feeds in Sparks&#8230; now _that_ would be useful.</p>
<p>##### Huddle</p>
<p>This is supposed to be some kind of group chat, I think. At least, that&#8217;s what I worked out from the marketing video. I can&#8217;t tell you any more as I can&#8217;t find it on my account. Maybe it&#8217;s not live yet&#8230;? Maybe it&#8217;s suppressed in the UK, as there&#8217;s a [trademark dispute][13] going on with a London startup over the name.</p>
<p>### What&#8217;s Missing &#8211; Channels</p>
<p>I can&#8217;t take any credit for this idea. I was reading a [blog post][14] by [@davidebbo](http://twitter.com/davidebbo &#8220;David Ebbo &#8211; Twitter&#8221;), and I just thought that what he had to say was a fantastic idea. David promotes the idea of channels&#8230;</p>
<p>If I write about personal things and also work techy things, I could configure my account to have two channels. When I post something, I can optionally choose to publish it to one of my channels. When one of my contacts adds me to a circle, they can just choose to add a subset of my channels. For example, most people in my family would only choose the &#8220;Personal&#8221; channel, so they wouldn&#8217;t see loads of posts about software development that they&#8217;re not interested in at all.</p>
<p>Currently, I mostly use Twitter for technical stuff, and Facebook for personal things. It would be great to have one service that I could post everything to, but allowing my followers to filter what they see of me. +1 for this idea Mr Ebbo! If this were implemented, I think it might be the single most compelling reason to jump ship and use Google+ (apart from the fact that very few people are on there yet)!</p>
<p>### Summary</p>
<p>Google+ can survive, and I _really_ hope that it does. They have some compelling features that beat Facebook hands down. Google has a billion users using its search&#8230; the question is, can Google convert these search users into Google+ users? Google+&#8217;s future depends on it.</p>
<p>[1]: <a href="http://plus.google.com/" rel="nofollow">http://plus.google.com/</a> &#8220;Google+&#8221;<br />
[2]: <a href="http://googleblog.blogspot.com/2011/06/introducing-google-project-real-life.html" rel="nofollow">http://googleblog.blogspot.com/2011/06/introducing-google-project-real-life.html</a> &#8220;Google+ Launch Announcement&#8221;<br />
[3]: <a href="https://mail.google.com/" rel="nofollow">https://mail.google.com/</a> &#8220;Gmail &#8211; Google&#8217;s email offering&#8221;<br />
[4]: <a href="http://www.metrotwit.com/" rel="nofollow">http://www.metrotwit.com/</a> &#8220;MetroTwit Twitter client&#8221;<br />
[5]: <a href="http://flickr.com" rel="nofollow">http://flickr.com</a> &#8220;Flickr&#8221;<br />
[6]: <a href="http://martinfowler.com/bliki/SocialNetworks.html" rel="nofollow">http://martinfowler.com/bliki/SocialNetworks.html</a> &#8220;SocialNetworks &#8211; Martin Fowler&#8221;<br />
[7]: <a href="http://picasaweb.google.com/" rel="nofollow">http://picasaweb.google.com/</a> &#8220;Picasa Web&#8221;<br />
[8]: <a href="http://docs.google.com/" rel="nofollow">http://docs.google.com/</a> &#8220;Google Docs&#8221;<br />
[9]: <a href="http://www.google.com/calendar/" rel="nofollow">http://www.google.com/calendar/</a> &#8220;Google Calendar&#8221;<br />
[10]: <a href="http://www.facebook.com/" rel="nofollow">http://www.facebook.com/</a> &#8220;Facebook&#8221;<br />
[11]: <a href="http://twitter.com/" rel="nofollow">http://twitter.com/</a> &#8220;Twitter&#8221;<br />
[12]: <a href="http://www.skype.com/" rel="nofollow">http://www.skype.com/</a> &#8220;Skype&#8221;<br />
[13]: <a href="http://gigaom.com/2011/07/05/huddle-google/" rel="nofollow">http://gigaom.com/2011/07/05/huddle-google/</a> &#8220;UK startup defends Huddle name against Google &#8211; again&#8221;<br />
[14]: <a href="http://blog.davidebbo.com/2011/07/one-big-feature-social-networks-really.html" rel="nofollow">http://blog.davidebbo.com/2011/07/one-big-feature-social-networks-really.html</a> &#8220;One big feature social networks really need: Channels &#8211; David Ebbo&#8221;</p>]]></content:encoded>
			<wfw:commentRss>http://www.richardfawcett.net/2011/07/14/a-review-of-google-plus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Does IE9 Installation Need Me To Close So Much Stuff?</title>
		<link>http://www.richardfawcett.net/2011/05/06/why-does-ie9-installation-need-me-to-close-so-much-stuff/</link>
		<comments>http://www.richardfawcett.net/2011/05/06/why-does-ie9-installation-need-me-to-close-so-much-stuff/#comments</comments>
		<pubDate>Fri, 06 May 2011 17:21:00 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[General Computing]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.richardfawcett.net/2011/05/06/why-does-ie9-installation-need-me-to-close-so-much-stuff/</guid>
		<description><![CDATA[We’re now supposed to believe that Internet Explorer is no longer baked into the Windows operating system.&#160; So, why is it when I upgrade to IE9 via Windows Update, that it needs me to close so much stuff.&#160; The list &#8230; <a href="http://www.richardfawcett.net/2011/05/06/why-does-ie9-installation-need-me-to-close-so-much-stuff/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We’re now supposed to believe that Internet Explorer is no longer baked into the Windows operating system.&nbsp; So, why is it when I upgrade to IE9 via Windows Update, that it needs me to close so much stuff.&nbsp; The list is incredible:</p>
<ul>
<li>Adobe Reader and Acrobat Manager</li>
<li>Google Chrome</li>
<li>GrooveMonitor Utility</li>
<li>iTunesHelper</li>
<li>Java Update Scheduler</li>
<li>Microsoft Office Excel</li>
<li>Microsoft Security Client User Interface</li>
<li>Steam</li>
<li>Synaptics ToughPad Enhancements</li>
<li>TortoiseHgOverlayServer.exe</li>
<li>Windows Explorer</li>
<li>Windows host process (Rundll32)</li>
<li>Windows Live Messenger</li>
</ul>
<p>How come Chrome can update itself without me having to close EVERYTHING I am doing?!</p>]]></content:encoded>
			<wfw:commentRss>http://www.richardfawcett.net/2011/05/06/why-does-ie9-installation-need-me-to-close-so-much-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a Mercurial Repository under IIS</title>
		<link>http://www.richardfawcett.net/2011/04/26/setting-up-a-mercurial-repository-under-iis/</link>
		<comments>http://www.richardfawcett.net/2011/04/26/setting-up-a-mercurial-repository-under-iis/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 15:52:00 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[mercurial]]></category>

		<guid isPermaLink="false">http://www.richardfawcett.net/2011/04/26/setting-up-a-mercurial-repository-under-iis/</guid>
		<description><![CDATA[Setting up Mercurial to serve repositories using IIS has been on my to do list for months. I had a quick go at it late last year, but was thwarted by confusing solutions which quite frankly, just didn&#8217;t work for &#8230; <a href="http://www.richardfawcett.net/2011/04/26/setting-up-a-mercurial-repository-under-iis/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Setting up Mercurial to serve repositories using IIS has been on my to do list for months. I had a quick go at it late last year, but was thwarted by confusing solutions which quite frankly, just didn&#8217;t work for me.</p>
<p>Many walkthroughs mention using a file named hgwebdir.cgi, but as of Mercurial 1.6, this no longer exists. Some walkthroughs mention copying the contents of a library.zip file into the website, or placing .dll files in there too. Nothing like this worked for me, and it seemed ridiculously complex.</p>
<p>Today, I&#8217;ve made a concerted effort to get things working, and guess what? It&#8217;s REALLY EASY!</p>
<p>Before you start though, you should consider whether you really want to do this. Take a look at <a title="BitBucket" href="http://bitbucket.org">BitBucket</a> which is a hosting site for Mercurial. It&#8217;s ran by Atlassian and is completely free for up to five developers. If hosting your source code externally is not politically viable, you want more control over your repos, or you don&#8217;t want to pay for BitBucket when scaling up beyond five users, then by all means follow the below instructions.</p>
<p>OK, what do you need?</p>
<ul>
<li>A Windows server, with IIS6 or IIS7 setup, including the facility to use CGI scripts.</li>
<li>Python 2.6.6 (available from <a title="http://www.python.org/download/releases/2.6.6" href="http://www.python.org/download/releases/2.6.6">http://www.python.org/download/releases/2.6.6</a>)</li>
<li>Mercurial 1.8.2 Python 2.6 package – x86 Windows (available from <a href="http://mercurial.selenic.com/downloads/">http://mercurial.selenic.com/downloads/</a>)</li>
<li>The Mercurial source release (also available from <a href="http://mercurial.selenic.com/downloads/">http://mercurial.selenic.com/downloads/</a>)</li>
</ul>
<p>And that&#8217;s it.</p>
<p>Note that the version numbers of Python must match. I dare say that future versions of the Mercurial Python package may specify version 2.7 of Python… if that&#8217;s the case, just get Python 2.7.x instead.</p>
<p>So, the steps to carry out on the server were pretty simple:</p>
<p>1. Install Python</p>
<p>2. Install the Mercurial Python package</p>
<p>3. Create a new web application in IIS.</p>
<p>4. From the Mercurial source release, copy the file hgweb.cgi to your web application, and rename it index.py. You don&#8217;t have to rename it, but I just think the extension .py accurately reflects that this is a Python script, and as it&#8217;s going to be the default document of the website, &#8220;index&#8221; seems a good name for it.</p>
<p>5. Create a subfolder called Repositories underneath your web application. This will be used to host your repositories.</p>
<p>6. Create a new file called hgweb.config in your web application&#8217;s folder. It&#8217;s contents should be something like this:</p>
<blockquote><p>[collections]<br />C:\PATH_TO_YOUR_WEB_APP\Repositories = C:\PATH_TO_YOUR_WEB_APP\Repositories</p>
</blockquote>
<p>7. Edit index.py so that the line which starts config = &#8220;some path&#8221; contains the full path to your hgweb.config file, i.e.:</p>
<blockquote><p>config = &#8220;C:\PATH_TO_YOUR_WEB_APP\hgweb.config&#8221;</p>
</blockquote>
<p>8. Configure IIS as follows:</p>
<blockquote><p>You&#8217;ll need to set the default document for your application to index.py.</p>
<p>You&#8217;ll need to enable Basic Authentication for the web application and disable all other forms of authentication. Set the default domain to be the domain of your server, so that users don&#8217;t need to qualify their usernames with the domain when logging on.</p>
<p>In IIS7 you&#8217;ll need to use Add Script Map… (under Hander Mappings) to map *.py requests to C:\Python26\python.exe %s %s.</p>
<p>In IIS6, this is available by clicking &#8220;Configuration&#8221; on the Directory tab then adding a mapping so that &#8220;C:\Python26\python.exe&#8221; %s %s (note the quotes around the executable this time) is used to handle the extension py. Also in IIS6, you&#8217;ll need to ensure that you have a web service extension for Python which is allowed and has the filename c:\Python26\python.exe %s %s.</p>
</blockquote>
<p>9. Create a test repository in your Repositories folder.</p>
<p>10. Configure the test repository by editing its .hg\hgrc file to include:</p>
<blockquote><p>[web]<br />allow_push = * # alternatively, a comma separated list of users with push privileges<br />allow_archive = zip # this allows users to download a .zip archive of the source code<br />push_ssl = false # this allows pushing over HTTP. You&#8217;re advised to setup SSL though, and then remove this line</p>
</blockquote>
<p>11. On your client machine, test out the new repo by executing the following (the program will prompt you for your credentials which is just your domain account):</p>
<blockquote><p>hg clone <a href="http://YOUR_SERVER/YOUR_APP_NAME/index.py/YOUR_REPO_NAME" rel="nofollow">http://YOUR_SERVER/YOUR_APP_NAME/index.py/YOUR_REPO_NAME</a> your_local_folder</p>
</blockquote>
<p>12. Make some changes, check them in and push back to the repository.</p>
<p>13. Browse the repository in a web browser at <a href="http://YOUR_SERVER/YOUR_APP_NAME/" rel="nofollow">http://YOUR_SERVER/YOUR_APP_NAME/</a></p>
<h4>Exercises for the interested reader:</h4>
<p>1. Setup URL rewriting so that the &#8220;index.py&#8221; part of your path is invisible.</p>
<p>2. Add a self-signed SSL certificate to your server, and get Mercurial to work with this (hint: Google for the hostfingerprints directive of Mercurial.ini).</p>
<p>3. Enable public read-only access to your repo, but require a login to push changes (I&#8217;ve not figured this out myself yet, so please comment if you work it out!)</p>]]></content:encoded>
			<wfw:commentRss>http://www.richardfawcett.net/2011/04/26/setting-up-a-mercurial-repository-under-iis/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

