<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>.NET/C#</title>
        <link>http://blogs.interakting.co.uk/danmatthews/category/16.aspx</link>
        <description>General .NET programming</description>
        <language>en-GB</language>
        <copyright>Dan Matthews</copyright>
        <managingEditor>dmatthews@businessdecision.co.uk</managingEditor>
        <generator>Subtext Version 1.9.5.177</generator>
        <item>
            <title>Property Data Injection in EPiServer</title>
            <link>http://blogs.interakting.co.uk/danmatthews/archive/2008/12/09/property-data-injection-in-episerver.aspx</link>
            <description>&lt;p&gt;I am currently working on a project where it was necessary to conditionally inject some content into certain properties on some pages. Dynamic Content didn't really help me because what I wanted to do was replace entire properties with content from a property on another page and do it in a nice way for the editor. Linking the page with a shortcut to another page didn't help me because it needed to be only a partial replace and also conditional.&lt;/p&gt;
&lt;p&gt;Here's an example - and I know there are better ways to do this but I want an example that won't compromise the Intellectual Property of what I am actually doing :)&lt;/p&gt;
&lt;p&gt;Lets say you have a news article at &lt;a href="http://myepisite/News/SomeArticle"&gt;http://myepisite/News/SomeArticle&lt;/a&gt;. The article has a nice big image on it and you want to be able to swap the image out with a different one (lets forget the fact that you'd probably just do this with two properties). You have a sub-page storing the smaller image in a property at &lt;a href="http://myepisite/News/SomeArticle/LowImagery"&gt;http://myepisite/News/SomeArticle/LowImagery&lt;/a&gt;, which is hidden from the site. The way that you trigger the load of the low image is by URL QueryString, e.g. &lt;a href="http://myepisite/News/SomeArticle?bandwidth=lo"&gt;http://myepisite/News/SomeArticle?bandwidth=lo&lt;/a&gt;. (If you want some more tips on achieving this URL neatly, see my posts or other posts on URL rewriting.) Anyway, you could write a custom property type etc. to do this, but that's a fair whack of work and you'll need to create a new custom property for every content type that you might want to replace.&lt;/p&gt;
&lt;p&gt;So how do I achieve this in a neat, generic way? EPiServer provides a nice way, but it's not the most well documented route and neither do they really recommend it. Still, I think it can work well if properly implemented. The way I implemented to achieve this was using a custom Property Get Handler.&lt;/p&gt;
&lt;p&gt;When EPiServer asks for a page, it builds a PropertyDataCollection of all the properties on that page, along with their values. This PropertyDataCollection contains all the user-defined properties along with some that EPiServer add in as well such as PageLink, PageLanguageBranch and others. These are absolute lifesavers, although they are not well documented. The PropertyDataCollection has a default indexer which, when called, calls to a helper method to get the actual PropertyData for a property. The default helper method is a static method called 'DefaultPropertyHandler' on EPiServer.Core.PropertyGetHandler. This helper method looks for the the actual property data in four stages:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;It looks at the property on the current page and the current language &lt;/li&gt;
    &lt;li&gt;If that is empty, it checks to see whether the property is language specific and, if it is, whether the current language is the master language. If not, then it grabs the master language page and returns the value from that property. &lt;/li&gt;
    &lt;li&gt;If language isn't an issue, then it tries to get the property value from the linked page, if any. &lt;/li&gt;
    &lt;li&gt;If there is not data on a linked page, then it tries to return a dynamic property value with that property name. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This works well and is the default that probably fits 99% of EPiServer installations. However, EPiServer kindly allow us to replace this default Property Get Handler. All you need to do is write your own method that matches the delegate for the handler, and then set an EPiServer property like so:&lt;/p&gt;
&lt;p&gt;EPiServer.Core.PropertyDataCollection.GetHandler = new GetPropertyDelegate(Test.BandwidthPropertyGetHandler.BandwidthPropertyHandler); &lt;/p&gt;
&lt;p&gt;I'm sure you can set this in most places where you need it, but I just put it into the Application_Start of Global.asax.cs. So we can see how easy it is to override the property handling, but what does our custom method actually look like? The following code is incomplete, untested and partially commented out, but it should give the idea. The two parameters coming in are the property name being queried for data and the property data collection for the current page/language. Notice that rather than use the default indexer for properties, when asking for a property data value I am explicitly calling the 'Get' method - this prevents nasty infinite loops where my custom handler keeps calling itself.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Test
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; BandwidthPropertyGetHandler
    {
        &lt;span class="rem"&gt;// Methods&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; PropertyData BandwidthPropertyHandler(&lt;span class="kwrd"&gt;string&lt;/span&gt; name, &lt;br /&gt;						PropertyDataCollection properties)
        {
            &lt;span class="rem"&gt;// check querystring to see if we need to replace property (where possible)&lt;/span&gt;

            HttpRequest Request = System.Web.HttpContext.Current.Request;

            &lt;span class="kwrd"&gt;if&lt;/span&gt; (Request.QueryString[&lt;span class="str"&gt;"bandwidth"&lt;/span&gt;] == &lt;span class="str"&gt;"lo"&lt;/span&gt;)
            {
                &lt;span class="rem"&gt;// we need to swap low bandwidth if it's the right property name&lt;/span&gt;
                &lt;span class="rem"&gt;// you could drive this any way you like - don't hardcode it in production :)&lt;/span&gt;

                &lt;span class="kwrd"&gt;if&lt;/span&gt; (name == &lt;span class="str"&gt;"ArticleImage"&lt;/span&gt;)
                {
                    &lt;span class="rem"&gt;// lets reach out and grab the data from the sub-page&lt;/span&gt;

                    PageReference ThisPageReference = (PageReference)properties.&lt;br /&gt;							Get(&lt;span class="str"&gt;"PageLink"&lt;/span&gt;).Value;

                    PageDataCollection ChildPages = EPiServer.DataFactory.Instance.&lt;br /&gt;			GetChildren(ThisPageReference, LanguageSelector.MasterLanguage());

                    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (PageData ChildPage &lt;span class="kwrd"&gt;in&lt;/span&gt; ChildPages)
                    {
                        &lt;span class="rem"&gt;// find an article subpage&lt;/span&gt;

                        &lt;span class="kwrd"&gt;if&lt;/span&gt; (ChildPage.PageTypeName.ToLower() == &lt;span class="str"&gt;"article subpage"&lt;/span&gt;)
                        {
                            &lt;span class="rem"&gt;// grab our property and return it&lt;/span&gt;

                            &lt;span class="kwrd"&gt;return&lt;/span&gt; ChildPage.Property.Get(&lt;span class="str"&gt;"ArticleImageLow"&lt;/span&gt;);
                        }
                    }
                }
            }

            &lt;span class="rem"&gt;// just return the default handler&lt;/span&gt;
            &lt;span class="kwrd"&gt;return&lt;/span&gt; PropertyGetHandler.DefaultPropertyHandler(name, properties);
        }
    }
}&lt;/pre&gt;
&lt;/blockquote&gt;&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;
&lt;p&gt;In my actual implementation I handle languages properly, error handling, null property values and all sorts of other things, but it should be fairly obvious how that would work. In essence, this is a very simple way of customising properties to make them do fairly clever things without customising property types themselves. In fact, this would be a nice way to retro-fit a feature such as bandwidth tailoring or other targeted content to an existing type. Just remember that if it's not a special case you should be handling, call the default handler to do it's stuff with that property! Also, it might be best to try to keep your injected property types the same as the property type on the owner page. Not sure what would happen if you messed with that.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/370.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dan Matthews</dc:creator>
            <guid>http://blogs.interakting.co.uk/danmatthews/archive/2008/12/09/property-data-injection-in-episerver.aspx</guid>
            <pubDate>Tue, 09 Dec 2008 12:42:03 GMT</pubDate>
            <wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/370.aspx</wfw:comment>
            <comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/12/09/property-data-injection-in-episerver.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/370.aspx</wfw:commentRss>
        </item>
        <item>
            <title>File Extensions and URL Rewriting in EPiServer</title>
            <link>http://blogs.interakting.co.uk/danmatthews/archive/2008/12/05/file-extensions-and-url-rewriting-in-episerver.aspx</link>
            <description>&lt;p&gt;I needed to throw together a quick geolocalisation demo for EPiServer v5 R2 the other day and to do that it was necessary to override some of the default URL rewriting behaviour of EPiServer. I knew it could be done, but I'd never actually had to write a custom URL provider before, so &lt;a href="http://labs.episerver.com/en/Blogs/Ted-Nyberg/Dates/112276/7/Implementing-a-custom-URL-rewrite-provider-for-EPiServer/"&gt;Ted Nyberg's blog post&lt;/a&gt; on rewriting in EPiServer gave me a good kick-start.&lt;/p&gt;
&lt;p&gt;My geolocalisation changes worked a treat (maybe I'll blog about that another time) but I did come across one really nasty 'feature' in EPiServer. I did find a workaround though, so I'll share it with you. Some background first though.&lt;/p&gt;
&lt;p&gt;As you may know, EPiServer has the nice ability to add a file extension on to pages. Before you rush off and try this out on your live site, be aware that it does change the default behaviour a little, for example it stops trailing slashes from working on the URL, e.g. this works:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myepisite/SomePage/"&gt;http://myepisite/SomePage/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;...but this does not...&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myepisite/SomePage.htm/"&gt;http://myepisite/SomePage.htm/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In fact, I like this feature because when using an external cache provider (such as Akamai), page extensions are A Good Thing as it knows how to treat them, and it also reduces the number of a URL 'possibilities' for a single page, so reducing the cache usage. As a bonus, it can also help with security as it slightly abstracts the page engine from the URL. Why not use the extension 'cfm' and then watch and laugh as all the ColdFusion-specific attacks roll in :)&lt;/p&gt;
&lt;p&gt;So I set an extension on my geolocalisation demo of '.htm' (done in the urlRewriteExtension property of the site settings element in Web.Config, make sure you put the dot in the extension as well otherwise you'll get SomePagehtm). So far, so good, and the out-the-box demo templates site appeared to run fine. But then I noticed a weird quirk. On the menu across the top, the various links made sense, for the most part:&lt;/p&gt;
&lt;p&gt;News -&amp;gt; &lt;a href="http://myepisite/en/News.htm"&gt;http://myepisite/en/News.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Events -&amp;gt; &lt;a href="http://myepisite/en/Events.htm"&gt;http://myepisite/en/Events.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and so on... but the Start link was all messed up:&lt;/p&gt;
&lt;p&gt;Start -&amp;gt; &lt;a href="http://myepisite/en.htm"&gt;http://myepisite/en.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What was strangest of all though was that this link actually worked! This made no sense on any level, and it was obvious that some internal fudge in the default URL rewriter was catching this as a special case. This was confirmed when I found &lt;a href="http://world.episerver.com/Forum/Pages/Thread.aspx?id=15768&amp;amp;epslanguage=en"&gt;this post from EPiServer support&lt;/a&gt;. They'd obviously found this 404'ing so built a special case for it.&lt;/p&gt;
&lt;p&gt;So why do I care? Because this breaks the URL model and breaks my geolocalisation scheme quite badly. That link should 404 or else I have an issue. Ideally, I want to actually write out the proper link. So I started digging. It turns out that you get a link like this when you have an EPiServer Start Page and ask for the LinkURL for it. The default URL rewriter seems to munge it up and spit out this crazy short URL rather than a nicely formatted link. This is the same for any language, for example the Swedish start page gives sv.htm. Ideally though, I would want it to write out something like this (the page is actually called Public in the English version):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://myepisite/en/Public.htm"&gt;http://myepisite/en/Public.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I mean OK, it looks like any other page rather than a start page but surely that's better than en.htm! So... how do we go about getting the right page link rendered out and bypassing EPiServer's little 'fix'? Well, we can do it with the URL rewriter. I'll let Ted's post explain how to actually create the URL rewrite provider, but once you have the rewrite provider ready, you can override the ConvertToExternalInternal method as follows:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; ConvertToExternalInternal(UrlBuilder url, &lt;span class="kwrd"&gt;object&lt;/span&gt; internalObject, Encoding toEncoding)
{
    &lt;span class="rem"&gt;// apply default rewriting first&lt;/span&gt;
    &lt;span class="kwrd"&gt;bool&lt;/span&gt; bRewriteSuccess = &lt;span class="kwrd"&gt;base&lt;/span&gt;.ConvertToExternalInternal(url, internalObject, toEncoding);

    &lt;span class="kwrd"&gt;if&lt;/span&gt; (bRewriteSuccess)
    {
        &lt;span class="kwrd"&gt;string&lt;/span&gt;[] urlSplit = url.Path.Split(&lt;span class="str"&gt;'/'&lt;/span&gt;);
        
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (urlSplit.Length == 2)
        {
            &lt;span class="rem"&gt;// default page&lt;/span&gt;

            &lt;span class="kwrd"&gt;string&lt;/span&gt; DestinationCountryCode = urlSplit[1].Substring(0, 2);

            EPiServer.Core.PageData StartPage;

            &lt;span class="kwrd"&gt;try&lt;/span&gt;
            {
                StartPage = EPiServer.DataFactory.Instance.GetPage(&lt;br /&gt;&lt;span class="kwrd"&gt;	new&lt;/span&gt; EPiServer.Core.PageReference(EPiServer.Configuration.Settings.Instance.PageStartId), &lt;br /&gt;	&lt;span class="kwrd"&gt;new&lt;/span&gt; LanguageSelector(DestinationCountryCode));
            }
            &lt;span class="kwrd"&gt;catch&lt;/span&gt;
            {
                &lt;span class="rem"&gt;// no page with that language, just grab the link anyway and it will&lt;br /&gt;		 still work just with the current language name&lt;/span&gt;

                StartPage = EPiServer.DataFactory.Instance.GetPage(&lt;br /&gt;	&lt;span class="kwrd"&gt;new&lt;/span&gt; EPiServer.Core.PageReference(EPiServer.Configuration.Settings.Instance.PageStartId));
            }

            url.Path = &lt;span class="str"&gt;"/"&lt;/span&gt; + DestinationCountryCode + &lt;span class="str"&gt;"/"&lt;/span&gt; + StartPage.URLSegment + &lt;br /&gt;			EPiServer.Configuration.Settings.Instance.UrlRewriteExtension;
        }
    }
    
    &lt;span class="kwrd"&gt;return&lt;/span&gt; bRewriteSuccess;
}      &lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;This is not a fully-tested solution and it might need more work, but it shows that it is possible to fix this troublesome default behaviour. My geolocalisation demo then wrote out links as I would expect, and seemed to work perfectly across languages too. Hope this is of some use to anyone with similar issues even if it only gets you started on a fix!&lt;font face="Courier New"&gt;&lt;br /&gt;
&lt;/font&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/369.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dan Matthews</dc:creator>
            <guid>http://blogs.interakting.co.uk/danmatthews/archive/2008/12/05/file-extensions-and-url-rewriting-in-episerver.aspx</guid>
            <pubDate>Fri, 05 Dec 2008 11:53:04 GMT</pubDate>
            <wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/369.aspx</wfw:comment>
            <comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/12/05/file-extensions-and-url-rewriting-in-episerver.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/369.aspx</wfw:commentRss>
        </item>
        <item>
            <title>EPiServer vs. Open Source</title>
            <link>http://blogs.interakting.co.uk/danmatthews/archive/2008/11/11/episerver-vs.-open-source.aspx</link>
            <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Interakting use both Open Source and proprietary products to deliver solutions for many companies. We always try to select the best tool for the job, and when it comes to Content Management it is no different. We have a range of tools we consider using including various Open Source tools (e.g. &lt;a href="http://www.nuxeo.com/"&gt;Nuxeo&lt;/a&gt;, &lt;a href="http://www.dotnetnuke.com/"&gt;DotNetNuke&lt;/a&gt;) and also our proprietary offerings (&lt;a href="http://www.episerver.com/"&gt;EPiServer&lt;/a&gt;, &lt;a href="http://www.adxstudio.com/"&gt;ADXSTUDIO&lt;/a&gt;). In the context of many projects it would certainly be possible to deliver a ‘successful’ project in either a proprietary or an Open Source solution. However, when we consider budgetary, functionality, deadline, support and longevity constraints, all of these areas are problematic in the Open Source arena, whereas proprietary systems such as EPiServer can provide an arguably better and more cost-effective solution. This article discusses some of the reasons for this. The majority of 'pure CMS' sites we deliver are on the EPiServer platform and so this will form the basis of our discussion. Interakting is an EPiServer Solution Partner.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Budgetary&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With a proprietary CMS such as EPiServer, the main costs are ‘up front’. The client would be buying a licence to use EPiServer CMS, and the cost of this covers the effort and time taken by the vendor to develop and support the product. This means that the vendor does not need to find other ways to recoup their costs beyond the licence fee and an optional small annual support fee. The client can therefore budget for the outright licence as a clearly transparent and defined cost.&lt;/p&gt;
&lt;p&gt;Open Source costs are far less clear, as companies who ‘own’ an Open Source initiative may give the software away ‘free’ but then seek to recoup their costs, even if only running costs. This is usually done by support contracts, consulting or selling additional ‘modules’. It is easy to be trapped into a ‘free’ product and then find that the actual cost is far higher.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Functionality&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As proprietary systems are designed to be sold as widely as possible to reach the maximum number of customers, functionality in proprietary systems is usually excellent and if additional functionality would assist their sales then the company owning the product will often update their core product or provide value-add modules at low or no cost. This is very much the case with EPiServer, who have grown rapidly due to their responsiveness to customer demands and now have many thousands of seats worldwide. The CMS is particularly user-friendly and intutitive and can be used by novice users without the need for costly training.&lt;/p&gt;
&lt;p&gt;In the Open Source arena this becomes more complex. The popular view is that the community ‘works together’ to build a product for the good of the community. This works well, to a point, but ultimately people are not entirely altruistic. Sooner or later (and sometimes always) they only contribute to things that benefit themselves. This means that the ‘out of the box’ product is often minimal functionality, and even if it is fairly well featured then those features are often not very flexible and designed for the use of the company that commissioned them with specific needs. It is unlikely the community will help add or update functionality and therefore it is left to the project team to do so, which can be fairly hard and time consuming. User training is likely to be required, particularly post deplyoment when users change jobs and new users need to work with the CMS. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Deadline&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As a general rule, any proprietary systems must be designed to provide a very rapid solution as this is a key selling point since the market is very competitive and unforgiving. In this regard EPiServer stands up very well which is one of the many reasons that Interakting has selected this tool. The well-featured out of the box nature of EPiServer, together with the well-documented and supported APIs, mean that a robust solution can be built rapidly and efficiently. The tools are built with the clients business needs clearly in mind as much as the developers.&lt;/p&gt;
&lt;p&gt;In an Open Source project, it has generally built by developers with a very code-centric approach. There is an expectation that the basic product will be customised by developers as needed, and the out-of-the-box functionality capability is usually minimal. Even with ‘starter’ kits for a particular tool, there is often a large amount of code and customisation to be done. Agencies promoting open source solutions capitalise on this aspect as it is very lucrative to develop the added functionality needed for more complex reqirements such as multi-lingual non-Latin support &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Support&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With EPiserver, as part of the licence agreement, the vendor undertakes to provide support and their reputation relies on this support being accessible and effective. The support is also usually rapid and efficient to respond with managed Help Desks staffed by knowledgeble individuals. They are able to respond with authority on support issues as they designed, wrote, maintain and own the codebase.&lt;/p&gt;
&lt;p&gt;For an Open Source tool, the support is either an expensive add-on from the company providing the tool or is community based. If a company is supporting a tool this is often not so much of a problem, although there is an issue that they are supporting code that they quite possibly did not write. From our experience (remember that we also work with Open Source solutions when we feel it appropriate), support from the community is often slow and inadequate for projects that have a critical path.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Longevity&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;EPiServer is committed to the products they sell and even if they discontinue a product will generally provide migration or upgrade paths. Generally speaking, it will also be clear in advance whether a product will be passing out of support and therefore a proper exit or migration strategy can be planned well in advance. EPiServer is also helpful in that, in the event of it ceasing to trade, it has made its code available to its licensees through an escrow arrangement at a nominal annual cost (although this is optional).&lt;/p&gt;
&lt;p&gt;Open Source projects are often left unfinished or unsupported once the community using them has moved onto something different. As a general rule, Open Source projects have a limited time in which they are actively updated and maintained and once a critical inactivity threshold is reached then they effectively become ‘legacy’, are taken into closed source or amalgamated into something larger. It can also be harder to plan an exit strategy as the ‘lifetime’ of a product is usually unclear.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In summary, we believe that for the many projects, the unknowns and variables involved in taking the Open Source route will result in a slightly higher initial cost of development and deployment and a significantly higher cost of ownership over a two year period following the initial go-live.&lt;/p&gt;
&lt;p&gt;By choosing to use a well-proven CMS which uses the .NET framework, a project is grounded on a solid, well defined and tightly costed product and the real cost of deployment and support over a 2-5 year lifetime can be estimated with a far higher degree of accuracy. Ongoing maintenance, functional enhancements and support will also be easier to define and budget. Finally, a large pool of .NET developers able to work with EPiServer and are readily available at competitive day rates meaning the client has total flexibility and would not be locked into any single supplier in the future.&lt;/p&gt;
&lt;p&gt;If you're looking for a CMS solution for your web site, &lt;a href="http://www.interakting.co.uk/en-gb/additional-menu/contact-us/"&gt;shouldn't we be talking&lt;/a&gt;?&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/360.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dan Matthews</dc:creator>
            <guid>http://blogs.interakting.co.uk/danmatthews/archive/2008/11/11/episerver-vs.-open-source.aspx</guid>
            <pubDate>Tue, 11 Nov 2008 10:58:05 GMT</pubDate>
            <wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/360.aspx</wfw:comment>
            <comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/11/11/episerver-vs.-open-source.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/360.aspx</wfw:commentRss>
        </item>
        <item>
            <title>New module on EPiCode</title>
            <link>http://blogs.interakting.co.uk/danmatthews/archive/2008/06/10/New-module-on-EPiCode.aspx</link>
            <description>&lt;p&gt;At the &lt;a target="_blank" href="http://www.episerver.com/en/Start_page/NewsEvents/EPiServer_Events/Passed_Events/EPiServer-Partner-Summit-2008/"&gt;EPiServer Partner Summit&lt;/a&gt; I was chatting over dinner to &lt;a target="_blank" href="http://www.networkedplanet.com/about/bios.html"&gt;Andy Brodie of Networked Planet&lt;/a&gt;. He was remarking that it would be nice within EPiServer to have the capability to show site thumbnails when you hovered over hyperlinks. This intrigued me so when I got back to the UK I did some investigation. There are sites on the internet that do provide a service for this, such as &lt;a target="_blank" href="http://www.websnapr.com/"&gt;websnapr&lt;/a&gt;, but ideally I wanted something that I had full control over.&lt;/p&gt;
&lt;p&gt;Time to start coding :)&lt;/p&gt;
&lt;p&gt;After some investigation on the web I found a great article about the &lt;a target="_blank" href="http://www.beansoftware.com/ASP.NET-Tutorials/Get-Web-Site-Thumbnail-Image.aspx"&gt;WebBrowser control and ASP.NET&lt;/a&gt;. I tailored it to my needs and got a little thumbnail generator working. I also built a set of JavaScript functions that would show the thumbnails on hyperlinks using DHTML. Next I built a Control Adapter that would pick up EPiServer properties and parse them for hyperlinks. If it found hyperlinks it would insert references to my JavaScript functions. Lastly I wrapped all this in an assembly complete with my Single-Assembly VPP method and using &lt;a target="_blank" href="http://blogs.interakting.co.uk/brad/archive/2008/01/31/ASP.NET-Embed-ImagesJavaScript-in-a-dll.aspx"&gt;dynamic web resource&lt;/a&gt; references.&lt;/p&gt;
&lt;p&gt;And so &lt;a target="_blank" href="https://www.coderesort.com/p/epicode/wiki/HyperThumbnail"&gt;HyperThumbnail&lt;/a&gt; was born. Go check it out on &lt;a target="_blank" href="https://www.coderesort.com/p/epicode/wiki/WikiStart"&gt;EPiCode&lt;/a&gt; or see the sample on &lt;a target="_blank" href="http://epilabs.bdnet.co.uk/en/News/Lorem-ipsum-dolor"&gt;B&amp;amp;D EPiLabs&lt;/a&gt; (hover over the hyperlinks in the content). Deploying to your own site couldn't be easier - simply drag-and-drop the DLL and a .browser file into your website folders.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/311.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dan Matthews</dc:creator>
            <guid>http://blogs.interakting.co.uk/danmatthews/archive/2008/06/10/New-module-on-EPiCode.aspx</guid>
            <pubDate>Tue, 10 Jun 2008 12:13:32 GMT</pubDate>
            <wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/311.aspx</wfw:comment>
            <comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/06/10/New-module-on-EPiCode.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/311.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Google Translate and .NET</title>
            <link>http://blogs.interakting.co.uk/danmatthews/archive/2008/05/20/Google-Translate-and-.NET.aspx</link>
            <description>&lt;p&gt;Google have released a lovely little API for their Google Translate service. It uses a &lt;a href="http://www.xfront.com/REST-Web-Services.html"&gt;RESTful&lt;/a&gt; interface and returns a &lt;a href="http://www.json.org/"&gt;JSON&lt;/a&gt; object in the HTTP Response. The usual way to use this would be AJAX-style in client side JavaScript. This might not always be what you want to do though. For example, if you have a server resource in English and you want to show it in the page as Spanish you wouldn't want to render it in English and then have some page load event client side to translate it. You really want to do it server side and render it on the page as Spanish straight away.&lt;/p&gt;  &lt;p&gt;Of course, Google know this and so they have provided a couple of snippets on their Google code site for PHP and Java. It should probably be expected, but they decided not to provide a nice .NET snippet. Looking around on the web, I can't find any .NET snippets for it and so I did some digging myself to put together a solution.&lt;/p&gt;  &lt;p&gt;Before I throw out the snippet, it's worth explaining briefly what JSON is and what libraries are available. JSON is an object definition 'language' similar conceptually to XML in that it is effectively name tags / value pairs but it has the added advantage that it is part of the JavaScript language definition and can be 'eval'ed in JavaScript to give you a client-side object. This is great for AJAX websites. Whilst you could cook your own JSON handler, there are a few JSON libraries out there for .NET. In fact, &lt;a title="Windows Communication Foundation" href="http://msdn.microsoft.com/en-us/netframework/aa663324.aspx"&gt;Windows Communication Foundation&lt;/a&gt; has some JSON support built-in. The only problem is that most of the libraries out there are to do with serializing and deserializing .NET objects as JSON objects. That's fine as far as it goes, but it relies on you already having a well-defined .NET type. With Google Translate, we are getting a JSON object as a string that has no well-known .NET type to deserialize to. It might be possibly in theory to map it to an object or even map it to XML but I explored those options and found them incredibly convoluted. &lt;/p&gt;  &lt;p&gt;Thankfully you don't need to write your own little JSON parser though because I did find &lt;strong&gt;one&lt;/strong&gt; library out there to do the job, &lt;a href="http://litjson.sourceforge.net/"&gt;LitJSON&lt;/a&gt;. It has a couple of the usual serializer/deserializer features but in addition it also has a feature to parse JSON into a simple hashtable/array. I tried to do something similar with JSON to XML with WCF but couldn't get it to work. One of my colleagues, &lt;a href="http://blogs.interakting.co.uk/steve"&gt;Stephen Horsfield&lt;/a&gt;, did - and I've included his technique after mine.&lt;/p&gt;  &lt;p&gt;And so to the code. The snippet below assumes that you are running this in a web form with the following four web controls:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;txtSource - textbox for source text &lt;/li&gt;    &lt;li&gt;txtTranslated - textbox for translated text &lt;/li&gt;    &lt;li&gt;ddlFrom - drop down list with the 2-letter language values for the source language &lt;/li&gt;    &lt;li&gt;ddlTo - drop down list with the 2-letter language values for the destination language &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Of course you could easily swap these with command line args or whatever you like. I have put the snippet in C# and the .NET 2.0 framework, but of course you could rework it for VB.NET or even for .NET 1.0.&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;// do a check to make sure that we aren't making Google unhappy&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (txtSource.Text.Length &amp;gt; 500)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Exception(&lt;span style="color: #006080"&gt;"Google Translation license forbids more than 500 characters to be translated at once!"&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt; &lt;span style="color: #008000"&gt;// create the web request to the Google Translate REST interface&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; WebRequest oRequest = WebRequest.Create(&lt;span style="color: #006080"&gt;"http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&amp;amp;q="&lt;/span&gt; + HttpUtility.UrlEncode(txtSource.Text) + &lt;span style="color: #006080"&gt;"&amp;amp;langpair="&lt;/span&gt; + ddlFrom.SelectedValue + &lt;span style="color: #006080"&gt;"%7C"&lt;/span&gt; + ddlTo.SelectedValue);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt; &lt;span style="color: #008000"&gt;// make the web call&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt; WebResponse oResponse = oRequest.GetResponse();&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt; &lt;span style="color: #008000"&gt;// grab the response stream&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt; StreamReader oReader = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StreamReader(oResponse.GetResponseStream());&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt; &lt;span style="color: #008000"&gt;// put the whole response in a string&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; sContent = oReader.ReadToEnd();&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt; &lt;span style="color: #008000"&gt;// parse the string into the litJSON simple object model&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt; JsonData oData = JsonMapper.ToObject(sContent);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt; &lt;span style="color: #008000"&gt;// write out the translated text&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt; txtTranslated.Text = oData[&lt;span style="color: #006080"&gt;"responseData"&lt;/span&gt;][&lt;span style="color: #006080"&gt;"translatedText"&lt;/span&gt;].ToString();&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;You could enhance this by using the Google Translate API call to auto-detect the source language, but for simplicity I haven't bothered with that extra step.&lt;/p&gt;

&lt;p&gt;So lets see what it would look like with WCF. You'll need to include a using statement for System.IO, System.Xml and System.Runtime.Serialization.Json (and reference the appropriate DLLs):&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; XmlDocument doc = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XmlDocument();&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; XmlDictionaryReader xr = JsonReaderWriterFactory.CreateJsonReader(s,&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; XmlDictionaryReaderQuotas.Max);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt; doc.Load(xr);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; xr.Close();&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt; s.Close();&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;For more details see the complete post on &lt;a href="http://blogs.interakting.co.uk/steve/archive/2008/05/22/NET-JSON-support-in-WCF.aspx"&gt;Steve's blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And that is how easy it is to call Google Translate from .NET! I'm currently thinking of some funky ways that I could integrate it with the EPiServer Edit mode. There are all sorts of possibilities. Suggestions on a postcard of how you might want it to look. Maybe a right-click option on the navigation tree? Maybe an extra button in the editor? Maybe something that catches the event when a language for a page is created?&lt;/p&gt;

&lt;p&gt;Lastly, a tip on the 2-letter languages. I used the System.Globalization feature of .NET to create the drop down lists with their names. Snippet below:&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; CultureInfo [] aCultures = CultureInfo.GetCultures(CultureTypes.NeutralCultures);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (CultureInfo oCulture &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; aCultures)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (ConfigurationManager.AppSettings[&lt;span style="color: #006080"&gt;"SupportedLanguages"&lt;/span&gt;].IndexOf(oCulture.TwoLetterISOLanguageName) &amp;gt;= 0)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;         ListItem oItem = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ListItem(oCulture.EnglishName, oCulture.TwoLetterISOLanguageName);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;         ddlFrom.Items.Add(oItem);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;         ddlTo.Items.Add(oItem);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;All that is needed after that is a line in the web.config like so:&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;appSettings&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add&lt;/span&gt; &lt;span style="color: #ff0000"&gt;key&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="SupportedLanguages"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="ar,bg,zh,hr,cs,da,nl,en,fi,fr,de,el,hi,it,ja,ko,no,pl,pt,ro,ru,es,sv"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;appSettings&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Hope this is useful to someone. There's a whole load more that could be done such as error checking and catching but that is for a later post once I work out how far I can take this.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/289.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dan Matthews</dc:creator>
            <guid>http://blogs.interakting.co.uk/danmatthews/archive/2008/05/20/Google-Translate-and-.NET.aspx</guid>
            <pubDate>Tue, 20 May 2008 15:20:26 GMT</pubDate>
            <wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/289.aspx</wfw:comment>
            <comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/05/20/Google-Translate-and-.NET.aspx#feedback</comments>
            <slash:comments>9</slash:comments>
            <wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/289.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Partner Summit '08</title>
            <link>http://blogs.interakting.co.uk/danmatthews/archive/2008/04/04/Partner-Summit-08.aspx</link>
            <description>&lt;p&gt;My flight is booked and I'm looking forward to the summit! The agenda looks packed and I'm especially interested to see what is put on the developer second day 'stream'. At the moment it's just TBA... although there's plenty of other tasty tidbits on the other days too (like the MOSS/EPiServer slot with Mats &lt;font face="Arial"&gt;Hellström).&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;I'm flying out on the early doors SAS flight from Heathrow on the 29th. If there's any other UK partners out there on the same flight, give me a shout and maybe we can link up on our way.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/245.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dan Matthews</dc:creator>
            <guid>http://blogs.interakting.co.uk/danmatthews/archive/2008/04/04/Partner-Summit-08.aspx</guid>
            <pubDate>Fri, 04 Apr 2008 08:44:31 GMT</pubDate>
            <wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/245.aspx</wfw:comment>
            <comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/04/04/Partner-Summit-08.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/245.aspx</wfw:commentRss>
        </item>
        <item>
            <title>VPP Initializer not firing properly</title>
            <link>http://blogs.interakting.co.uk/danmatthews/archive/2008/04/02/VPP-Initializer-not-firing-properly.aspx</link>
            <description>&lt;p&gt;Whilst building the CloudCuckoo module, I used a neat trick to register my custom VPP on-the-fly by using an attribute flag to mark it as an EPiServer plugin. This would cause EPiServer to find it and intialise it when I first hit the EPiServer site. This worked fine on my machine and some others, but I was finding that on one specific machine it wasn't firing properly. EPiServer was calling it to initialise it, but the problem was when I tried to access the &lt;font face="Courier New" color="#3366ff"&gt;HttpContext&lt;/font&gt;. In a nutshell, for some reason when this machine fired up the plugin to initialise it, it was losing or not passing in the HTTP context. Typically, this would happen if there was a funny AppDomain issue or if something was being recycled, but all the configuration looked fine. The code causing the problem is below:&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (HttpContext.Current == &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #008000"&gt;// Running from the scheduler, skip registration&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     System.Diagnostics.Debug.Write(&lt;span style="color: #006080"&gt;"VppInitializer called without HttpContext. Exiting"&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt; &lt;span style="color: #008000"&gt;// Register&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt; Assembly lateBoundAssembly = System.Reflection.Assembly.LoadFrom(HttpContext.Current.Server.MapPath(&lt;span style="color: #006080"&gt;@"\bin\BusinessDecision.CloudCuckoo.dll"&lt;/span&gt;));&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font face="Courier New" color="#3366ff"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;When I ran DebugView I could see that the plugin was bombing out due to no HTTP context and never getting to the registration. After trying for a while to get the HTTP context and failing, I decided to tweak things around. First I changed the way the plugin was detected to using inheritance, as described in &lt;a href="http://labs.episerver.com/en/Blogs/Allan/Dates/112230/3/When-and-Where-to-attach-DataFactory-Event-Handlers/"&gt;this post&lt;/a&gt; by &lt;font face="Arial"&gt;Allan Thræn&lt;/font&gt;. That worked insofar that it did exactly the same thing - but I preferred to use inheritance so left it in there anyway :) I then decided to eliminate the need for the HTTP context at all. The only reason it was there was to get the path using &lt;font face="Courier New" color="#3366ff"&gt;Server.MapPath&lt;/font&gt;, but it occurred to me that given my Single-Assembly-Plugin approach, all I had to do was grab the codebase property of the current assembly! That had the added advantage that I was no longer limiting the DLL to having to reside in the BIN folder. In theory it could now even go in the GAC. The updated code looks like this:&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; Debug.Write(&lt;span style="color: #006080"&gt;"VppInitializerX Loading CloudCuckoo VPP from: "&lt;/span&gt; + &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(VppInitializerX).Assembly.CodeBase);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; &lt;span style="color: #008000"&gt;// now binds without using HttpContext&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; Assembly lateBoundAssembly = System.Reflection.Assembly.LoadFrom(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(VppInitializerX).Assembly.CodeBase);&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#3366ff"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;As you can see, this code is much cleaner and, most importantly, it works on that machine that was being problemmatical. This is probably a good thing to bear in mind for any EPiServer plugins called in this way - using HTTP context might be risky.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/244.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dan Matthews</dc:creator>
            <guid>http://blogs.interakting.co.uk/danmatthews/archive/2008/04/02/VPP-Initializer-not-firing-properly.aspx</guid>
            <pubDate>Wed, 02 Apr 2008 12:10:43 GMT</pubDate>
            <wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/244.aspx</wfw:comment>
            <comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/04/02/VPP-Initializer-not-firing-properly.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/244.aspx</wfw:commentRss>
        </item>
        <item>
            <title>CloudCuckoo for v5 SP1</title>
            <link>http://blogs.interakting.co.uk/danmatthews/archive/2008/04/02/CloudCuckoo-for-v5-SP1.aspx</link>
            <description>&lt;p&gt;I've recompiled the CloudCuckoo binary against EPiServer v5 SP1 to save you having to recompile the project yourself. (it was originally built against vanilla v5) Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.coderesort.com/p/epicode/wiki/CloudCuckoo/Download"&gt;Get CloudCuckoo here&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/243.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dan Matthews</dc:creator>
            <guid>http://blogs.interakting.co.uk/danmatthews/archive/2008/04/02/CloudCuckoo-for-v5-SP1.aspx</guid>
            <pubDate>Wed, 02 Apr 2008 09:55:48 GMT</pubDate>
            <wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/243.aspx</wfw:comment>
            <comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/04/02/CloudCuckoo-for-v5-SP1.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/243.aspx</wfw:commentRss>
        </item>
        <item>
            <title>EPiCloud &gt; CloudCuckoo &gt; Released!</title>
            <link>http://blogs.interakting.co.uk/danmatthews/archive/2008/03/25/EPiCloud--CloudCuckoo--Released.aspx</link>
            <description>&lt;p&gt;The EPiCloud module that I've been working on for a while is finally ready for release! Due to the EPiServer preferred module naming policy (no EPi.... please!) we had a few thoughts around the office here and one of my colleagues, Alan Bartlett, came up with CloudCuckoo. The name appealed to me because it was rather different and also has mild amusement value. The best part is this though - I have obtained clearance to release the module for FREE on EPiCode!&lt;/p&gt;
&lt;p&gt;The module and sourcecode is &lt;a href="https://www.coderesort.com/p/epicode/wiki/CloudCuckoo"&gt;available on EPiCode here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I also finished off the tag moderation part of the plugin, which can be seen on the screenshot below:&lt;/p&gt;
&lt;p&gt;&lt;img height="377" width="362" alt="" src="/images/blogs_bdnet_co_uk/danmatthews/moderation.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;There's a few more things that might be nice to add, but for now it's good to get version 1.0 out there and let people start to play with it. If you decide to evaluate/use it and have any feedback at all please let me know.&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/239.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dan Matthews</dc:creator>
            <guid>http://blogs.interakting.co.uk/danmatthews/archive/2008/03/25/EPiCloud--CloudCuckoo--Released.aspx</guid>
            <pubDate>Tue, 25 Mar 2008 15:53:38 GMT</pubDate>
            <wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/239.aspx</wfw:comment>
            <comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/03/25/EPiCloud--CloudCuckoo--Released.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/239.aspx</wfw:commentRss>
        </item>
        <item>
            <title>EPiServer when disconnected from domain controller</title>
            <link>http://blogs.interakting.co.uk/danmatthews/archive/2008/03/20/EPiServer-when-disconnected-from-domain-controller.aspx</link>
            <description>&lt;p&gt;I've just spent the last few days in a Commerce Server 2007 training course, which was surprisingly interesting. One of the things that leapt out at me was that there are a couple of partners who have worked with Commerce Server 2002 and EPiServer together. It's something that has interested me too and I see even more possibilities with Commerce Server 2007. Hmm...&lt;/p&gt;
&lt;p&gt;As soon as I got back I got busy getting EPiCloud release ready (and thinking of a nice name for it). In doing that I came across this old error again: "&lt;font face="Arial"&gt;The trust relationship between the primary domain and the trusted domain failed".&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;You may remember my &lt;a href="http://blogs.bdnet.co.uk/danmatthews/archive/2007/07/18/81.aspx"&gt;blog&lt;/a&gt; about it a while ago, but that was a slightly different scenario. Then I was on my corporate network and getting SQL/Windows authorisations muddled up. This time I was working on my laptop at home. Turns out that EPiServer v5 was trying to resolve a SID against the domain controller, and as I was disconnected at the time it failed. Even connecting to my work VPN didn't help. I even tried logging on locally to my laptop and it was failing. Every time it would throw the error and according to the stack trace it was when it was trying to resolve the VPPs, although I'm not sure how right that was.&lt;/p&gt;
&lt;p&gt;Ultimately, the only thing that worked was to temporarily drop my laptop off the domain and onto a workgroup. I then changed all my authorisations to SQL just to check and re-added it to the domain. It promptly broke again, as I expected, so I once more dropped it off the domain.&lt;/p&gt;
&lt;p&gt;On Tuesday once I'm back in the office I'll grab a VPC which isn't on a domain and continue my development on there. That should get around the problem of having to mess around the domains on my laptop!&lt;/p&gt;&lt;img src="http://blogs.interakting.co.uk/danmatthews/aggbug/236.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dan Matthews</dc:creator>
            <guid>http://blogs.interakting.co.uk/danmatthews/archive/2008/03/20/EPiServer-when-disconnected-from-domain-controller.aspx</guid>
            <pubDate>Thu, 20 Mar 2008 16:38:47 GMT</pubDate>
            <wfw:comment>http://blogs.interakting.co.uk/danmatthews/comments/236.aspx</wfw:comment>
            <comments>http://blogs.interakting.co.uk/danmatthews/archive/2008/03/20/EPiServer-when-disconnected-from-domain-controller.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blogs.interakting.co.uk/danmatthews/comments/commentRss/236.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>