<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><language>en</language><title>Blog posts by Matt Nield</title> <link>https://world.optimizely.com/blogs/Matt-Nield/</link><description></description><ttl>60</ttl><generator>Optimizely World</generator><item> <title>Install EPiServer Composer on a SDK CMS Installation</title>            <link>http://mattnield.co.uk/2009/06/install-episerver-composer-on-a-sdk-cms-installation/</link>            <description>I’m sure that, like a lot of people working with EPiServer I have a play area that I use to try things out and start off any proof of concept work that I’m going to be implementing later on in&#160; various projects.&#160; For this, I use the SDK Installation of EPiServer CMS along with an [...]</description>            <guid>http://mattnield.co.uk/2009/06/install-episerver-composer-on-a-sdk-cms-installation/</guid>            <pubDate>Tue, 30 Jun 2009 18:06:37 GMT</pubDate>           <category>Blog post</category></item><item> <title>Poor EPiServer SDK</title>            <link>http://blogs.interakting.co.uk/mattnield/archive/2009/06/19/poor-episerver-sdk.aspx</link>            <description>&lt;p&gt;Now that I get to use &lt;a title=&quot;EPiServer&quot; href=&quot;http://www.episerver.com/&quot; rel=&quot;&quot;&gt;EPiServer&lt;/a&gt; CMS v5, I’m having approximately 165.3% more fun that I was with version 4.6.&#160; I can actually find information about 5 easily on the internet, brilliant!&#160; What I do find dismally disappointing though is the state of the SDK.&#160; A great deal of it just lists methods or properties with no description.&#160; In honesty, I can find out more using &lt;a href=&quot;http://www.red-gate.com/products/reflector/&quot; target=&quot;_blank&quot;&gt;reflector.net&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;While I appreciate that the guys at &lt;a title=&quot;EPiServer&quot; href=&quot;http://www.episerver.com/&quot; rel=&quot;&quot;&gt;EPiServer&lt;/a&gt; are doing some great work delivering a brilliant set of tools for us to work with, I can’t help but think that someone should be updating the &lt;a href=&quot;http://sdk.episerver.com/library/cms5/#&quot; target=&quot;_blank&quot;&gt;SDK&lt;/a&gt; with a little more vigor.&lt;/p&gt;&lt;img src=&quot;http://blogs.interakting.co.uk/mattnield/aggbug/386.aspx&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>            <guid>http://blogs.interakting.co.uk/mattnield/archive/2009/06/19/poor-episerver-sdk.aspx</guid>            <pubDate>Fri, 19 Jun 2009 17:48:00 GMT</pubDate>           <category>Blog post</category></item><item> <title>Registering Page Event Handlers in EPiServer</title>            <link>http://blogs.interakting.co.uk/mattnield/archive/2009/06/18/registering-page-event-handlers-in-episerver.aspx</link>            <description>&lt;p&gt;I’ve been working on a couple of things lately in &lt;a title=&quot;EPiServer&quot; rel=&quot;&quot; href=&quot;http://www.episerver.com/&quot;&gt;EPiServer&lt;/a&gt; that I want to be able to easily re-use on other projects.&#160; From my point of view that means just dropping DLLs in folders and letting &lt;a title=&quot;EPiServer&quot; rel=&quot;&quot; href=&quot;http://www.episerver.com/&quot;&gt;EPiServer&lt;/a&gt; do as much of the work as possible.&#160; One of my little pieces&#160; of functionality needs to happen when a page has been published.&#160; There are a couple of ways to do this, and previously I have been doing it in globla.ascx.&#160; Today I cam across an blog by &lt;a target=&quot;_blank&quot; href=&quot;http://labs.episerver.com/en/Blogs/Allan/&quot;&gt;Allen Thraen&lt;/a&gt; on discussing the subject of &lt;a target=&quot;_blank&quot; href=&quot;http://labs.episerver.com/en/Blogs/Allan/Dates/112230/3/When-and-Where-to-attach-DataFactory-Event-Handlers/&quot;&gt;how to register DataFactory event handlers in EPiServer&lt;/a&gt; which describes in much better detail than I can about the different methods that can be used.&lt;/p&gt;
&lt;p&gt;I ended up using the last method he mentions as I find it the cleanest way forward.&#160; I would copy the code in here, but you should go read his blog about it in honesty as its full of interesting stuff as always.&#160; The key point is that any class that inherits from &lt;a target=&quot;_blank&quot; href=&quot;http://sdk.episerver.com/library/cms5/html/N_EPiServer_PlugIn.htm&quot;&gt;EPiServer.PlugIn&lt;/a&gt;.&lt;a target=&quot;_blank&quot; href=&quot;http://sdk.episerver.com/library/cms5/html/T_EPiServer_PlugIn_PlugInAttribute.htm&quot;&gt;PlugInAttribute&lt;/a&gt; and has a void Start() method will be called by &lt;a title=&quot;EPiServer&quot; rel=&quot;&quot; href=&quot;http://www.episerver.com/&quot;&gt;EPiServer&lt;/a&gt; in the plug-in loading mechanism.&lt;/p&gt;
&lt;p&gt;The thing to keep in mind is that (as per Allen’s example code), if you register a &lt;a target=&quot;_blank&quot; href=&quot;http://sdk.episerver.com/library/cms5/html/E_EPiServer_Core_PageStoreBase_PublishedPage.htm&quot;&gt;PublishedEvent&lt;/a&gt; handler, it will happen when any&#160;page is published.&#160; That being the case, you’ll need to be inventive with filtering your exact requirements in the event handler making sure that you only do what you want when you want to!&#160; Common sense I suppose.&#160; &lt;/p&gt;
&lt;p&gt;I then got to thinking, “Hey, if I can do this then how messy is this potentially going to get if anyone can register and event handler?”.&#160; It would be pretty difficult to get a handle on what is going on.&#160; Luckily, &lt;a target=&quot;_blank&quot; href=&quot;http://labs.episerver.com/en/Blogs/Anders-Hattestad/&quot;&gt;Andres Hattestad&lt;/a&gt; has got a solution for this that reports &lt;a target=&quot;_blank&quot; href=&quot;http://labs.episerver.com/en/Blogs/Anders-Hattestad/Dates/2008/12/Page-events-what-events-are-registered/&quot;&gt;which events are registered, and where&lt;/a&gt;.&#160; I’m trying that out just now, but I’m pretty certain it’s going to be awesome and make my life a lot easier over the coming weeks, as I have a lot of plug-ins that I want to build.&lt;/p&gt;
&lt;p&gt;I strongly suggest that you going and read &lt;a target=&quot;_blank&quot; href=&quot;http://labs.episerver.com/en/Blogs/Anders-Hattestad/Dates/2008/12/Page-events-what-events-are-registered/&quot;&gt;Anders’s&lt;/a&gt; and &lt;a target=&quot;_blank&quot; href=&quot;http://labs.episerver.com/en/Blogs/Allan/Dates/112230/3/When-and-Where-to-attach-DataFactory-Event-Handlers/&quot;&gt;Allen’s&lt;/a&gt; posts and adorn them with due praise for being clever and of a sharing nature :)&lt;/p&gt;&lt;img src=&quot;http://blogs.interakting.co.uk/mattnield/aggbug/385.aspx&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>            <guid>http://blogs.interakting.co.uk/mattnield/archive/2009/06/18/registering-page-event-handlers-in-episerver.aspx</guid>            <pubDate>Thu, 18 Jun 2009 19:04:50 GMT</pubDate>           <category>Blog post</category></item><item> <title>ASP.Net: Consuming RSS Feeds</title>            <link>http://blogs.interakting.co.uk/mattnield/archive/2009/06/09/asp.net-consuming-rss-feeds.aspx</link>            <description>&lt;p&gt;I was recently working on an &lt;a href=&quot;http://www.episerver.com/&quot; target=&quot;_blank&quot;&gt;EPiServer&lt;/a&gt; solution and the client wanted to include an RSS feed on certain pages of their site.&#160; I though I would write out here how I consumed the feed.&#160; You’ll want to add error handling etc in here, as this is as rough as a tramps beard whilst being enough for you to get the point.&lt;/p&gt;  &lt;p&gt;The first thing I had to do was to find out how RSS is structured.&#160; After a little &lt;a href=&quot;http://www.google.co.uk/search?q=RSS+Structure&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla:en-US:official&amp;amp;client=firefox-a&quot; target=&quot;_blank&quot;&gt;Google&lt;/a&gt; search I found an article explaining &lt;a href=&quot;http://www.thesmallest.com/lessonettes/rssstructure.html&quot; target=&quot;_blank&quot;&gt;the structure of RSS&lt;/a&gt; in sufficient detail for me to continue.&lt;/p&gt;  &lt;p&gt;The first thing that I did was create a struck to contain the configuration that I wanted, fairly simple:&lt;/p&gt;  &lt;div class=&quot;csharpcode&quot;&gt;   &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;rem&quot;&gt;/// RSS feed configuration.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    [Serializable]&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;kwrd&quot;&gt;struct&lt;/span&gt; PropertyRssFeedData&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    {&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        &lt;span class=&quot;kwrd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; feedLocation;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        &lt;span class=&quot;kwrd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;bool&lt;/span&gt; linkTitle;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        &lt;span class=&quot;kwrd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;bool&lt;/span&gt; displayRssImage;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        &lt;span class=&quot;kwrd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; numberofItemstoDisplay;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; FeedLocation { get { &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.feedLocation; } set { &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.feedLocation = &lt;span class=&quot;kwrd&quot;&gt;value&lt;/span&gt;; } }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;bool&lt;/span&gt; LinkTitle { get { &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.linkTitle; } set { &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.linkTitle = &lt;span class=&quot;kwrd&quot;&gt;value&lt;/span&gt;; } }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;bool&lt;/span&gt; DisplayRssImage { get { &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.displayRssImage; } set { &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.displayRssImage = &lt;span class=&quot;kwrd&quot;&gt;value&lt;/span&gt;; } }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; NumberofItemstoDisplay { get { &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.numberofItemstoDisplay; } set { &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.numberofItemstoDisplay = &lt;span class=&quot;kwrd&quot;&gt;value&lt;/span&gt;; } }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; PropertyRssFeedData(&lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; url, &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; numItems, &lt;span class=&quot;kwrd&quot;&gt;bool&lt;/span&gt; linkTitle, &lt;span class=&quot;kwrd&quot;&gt;bool&lt;/span&gt; rssIcon)&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        {&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.feedLocation = url;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.numberofItemstoDisplay = numItems;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.linkTitle = linkTitle;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.displayRssImage = rssIcon;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    }&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;An instance of this will be serialized/deserialized as versions of the page are edited/created in &lt;a title=&quot;EPiServer&quot; href=&quot;http://www.episerver.com/&quot; rel=&quot;&quot;&gt;EPiServer&lt;/a&gt;.&#160; Essentially I just use it to determine how to render my HTML that I will present to the end-user.&#160; Actually reading the RSS is pretty straight forward (this is really being posted as a reminder for me, but might be useful for others).&#160;&#160; The following code creates a simple HTML block to present our feed.&lt;/p&gt;

&lt;div class=&quot;csharpcode&quot;&gt;
  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;preproc&quot;&gt;#region&lt;/span&gt; render links and things&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;internalData = DeserializeData((&lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;)PropertyData.Value);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;rem&quot;&gt;// Go get the feed&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;XmlTextReader rssReader = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; XmlTextReader(internalData.FeedLocation);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;XmlDocument rssDoc = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; XmlDocument();&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;rssDoc.Load(rssReader);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;rem&quot;&gt;// Look for the &amp;lt;rss&amp;gt; tag&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;XmlNode nodeRss = rssDoc.SelectSingleNode(&lt;span class=&quot;str&quot;&gt;&quot;//rss&quot;&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;rem&quot;&gt;// ensure we have an RSS node before we continue&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (nodeRss != &lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt;)&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;{&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;rem&quot;&gt;// OK, start creating controls&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    StringBuilder htmlResult = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; StringBuilder();&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    htmlResult.Append(&lt;span class=&quot;str&quot;&gt;&quot;&amp;lt;div id=\&quot;rssFeed\&quot;&amp;gt;&quot;&lt;/span&gt; + Environment.NewLine);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;rem&quot;&gt;// Look for the &amp;lt;channel&amp;gt; tag&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    XmlNode nodeChannel = nodeRss.SelectSingleNode(&lt;span class=&quot;str&quot;&gt;&quot;//channel&quot;&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;preproc&quot;&gt;#region&lt;/span&gt; Feed title&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    htmlResult.Append(&lt;span class=&quot;str&quot;&gt;&quot;\t&amp;lt;div id=\&quot;rssFeedTitle\&quot;&amp;gt;&quot;&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (internalData.LinkTitle)&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    {&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        htmlResult.AppendFormat(&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            &lt;span class=&quot;str&quot;&gt;&quot;&amp;lt;a href=\&quot;{0}\&quot;&amp;gt;{1}&amp;lt;/a&amp;gt;&quot;&lt;/span&gt;,&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            nodeChannel[&lt;span class=&quot;str&quot;&gt;&quot;link&quot;&lt;/span&gt;].InnerText,&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            nodeChannel[&lt;span class=&quot;str&quot;&gt;&quot;title&quot;&lt;/span&gt;].InnerText&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            ); &lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;kwrd&quot;&gt;else&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    {&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        htmlResult.Append(nodeChannel[&lt;span class=&quot;str&quot;&gt;&quot;title&quot;&lt;/span&gt;].InnerText);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    htmlResult.Append(&lt;span class=&quot;str&quot;&gt;&quot;&amp;lt;/div&amp;gt;&quot;&lt;/span&gt; + Environment.NewLine);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;preproc&quot;&gt;#endregion&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;preproc&quot;&gt;#region&lt;/span&gt; items&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;rem&quot;&gt;// get the kiddies&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (nodeChannel != &lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt;)&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    {&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        XmlNodeList itemNodes = nodeChannel.SelectNodes(&lt;span class=&quot;str&quot;&gt;&quot;//item&quot;&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (itemNodes.Count &amp;gt; 0)&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        {&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            htmlResult.Append(&lt;span class=&quot;str&quot;&gt;&quot;\t&amp;lt;ul&amp;gt;&quot;&lt;/span&gt; + Environment.NewLine);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            &lt;span class=&quot;rem&quot;&gt;// we only want to display the maximum set in the &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            &lt;span class=&quot;rem&quot;&gt;// configuration (otherwise ofc, we coudl use foreach here&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            &lt;span class=&quot;kwrd&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; counter = 0; counter &amp;lt; internalData.NumberofItemstoDisplay; counter++)&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            {&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                htmlResult.Append(&lt;span class=&quot;str&quot;&gt;&quot;\t\t&amp;lt;li&amp;gt;&quot;&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                &lt;span class=&quot;rem&quot;&gt;// Display the icon or not&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (internalData.DisplayRssImage)&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                {&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                    &lt;span class=&quot;rem&quot;&gt;// TODO : find a better way of displaying this&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                    htmlResult.AppendFormat(&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                        &lt;span class=&quot;str&quot;&gt;&quot;&amp;lt;a href=\&quot;{0}\&quot;&amp;gt;{1}&amp;lt;/a&amp;gt;&quot;&lt;/span&gt;,&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                        itemNodes[counter][&lt;span class=&quot;str&quot;&gt;&quot;link&quot;&lt;/span&gt;].InnerText,&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                        String.Format(&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                            &lt;span class=&quot;str&quot;&gt;&quot;&amp;lt;img src=\&quot;{0}\&quot;&amp;gt;{1}&quot;&lt;/span&gt;,&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                            &lt;span class=&quot;str&quot;&gt;&quot;/rssIcon.gif&quot;&lt;/span&gt;,&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                            itemNodes[counter][&lt;span class=&quot;str&quot;&gt;&quot;title&quot;&lt;/span&gt;].InnerText&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                            )&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                        );&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                &lt;span class=&quot;kwrd&quot;&gt;else&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                {&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                    htmlResult.AppendFormat(&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                        &lt;span class=&quot;str&quot;&gt;&quot;&amp;lt;a href=\&quot;{0}\&quot;&amp;gt;{1}&amp;lt;/a&amp;gt;&quot;&lt;/span&gt;,&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                        itemNodes[counter][&lt;span class=&quot;str&quot;&gt;&quot;link&quot;&lt;/span&gt;].InnerText,&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                        itemNodes[counter][&lt;span class=&quot;str&quot;&gt;&quot;title&quot;&lt;/span&gt;].InnerText&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                        );&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;                htmlResult.Append(&lt;span class=&quot;str&quot;&gt;&quot;\t\t&amp;lt;/li&amp;gt;&quot;&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;            htmlResult.Append(&lt;span class=&quot;str&quot;&gt;&quot;\t&amp;lt;/ul&amp;gt;&quot;&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;        }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    }&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;preproc&quot;&gt;#endregion&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    Literal output = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Literal();&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    output.Text = htmlResult.ToString();&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.Controls.Add(output);&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;}&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwrd&quot;&gt;else&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;{&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;    &lt;span class=&quot;rem&quot;&gt;// NO RSS TAG&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;}&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;preproc&quot;&gt;#endregion&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&#160;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;While I could write about creating the property in &lt;a title=&quot;EPiServer&quot; href=&quot;http://www.episerver.com/&quot; rel=&quot;&quot;&gt;EPiServer&lt;/a&gt; and wrapping it up all nicely.&#160; I’ll be honest, it’s just a PropertyString, so not worth worrying about.&#160; Ye sits rough and not very good at the error handling (as I eluded to above), but this is the easy bit.&#160; I now have to go and port this back to &lt;a title=&quot;EPiServer&quot; href=&quot;http://www.episerver.com/&quot; rel=&quot;&quot;&gt;EPiServer&lt;/a&gt; CMS 4.6!&lt;/p&gt;&lt;img src=&quot;http://blogs.interakting.co.uk/mattnield/aggbug/382.aspx&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>            <guid>http://blogs.interakting.co.uk/mattnield/archive/2009/06/09/asp.net-consuming-rss-feeds.aspx</guid>            <pubDate>Tue, 09 Jun 2009 14:50:32 GMT</pubDate>           <category>Blog post</category></item><item> <title>Developing with EPiServer</title>            <link>http://blogs.interakting.co.uk/mattnield/archive/2009/03/27/developing-with-episerver.aspx</link>            <description>&lt;p&gt;I often get asked to provide a handy starting guide to new people joining the company/team.&#160; It&#39;s pretty straight forward to find on the &lt;a href=&quot;http://world.episerver.com/&quot; target=&quot;_blank&quot;&gt;EPiServer World&lt;/a&gt; site if you look under the &lt;a href=&quot;http://world.episerver.com/en/Get-Started/&quot; target=&quot;_blank&quot;&gt;Get Started&lt;/a&gt; tab.&lt;/p&gt;
&lt;p&gt;Just follow the link to &lt;a href=&quot;http://world.episerver.com/en/Get-Started/Developing-with-EPiServer-CMS/&quot; target=&quot;_blank&quot;&gt;Start Developing with EPiServer CMS 5 R2&lt;/a&gt; for some articles explaining the basics and video presentations too.&lt;/p&gt;
&lt;p&gt;I would also recommend having a look at &lt;a href=&quot;http://www.episerver.com/en/Products/EPiServer-Relate-2/&quot; target=&quot;_blank&quot;&gt;Relate+&lt;/a&gt;, which is a great addition to &lt;a href=&quot;http://www.episerver.com/en/Products/EPiServer-CMS-5/&quot; target=&quot;_blank&quot;&gt;EPiServer CMS&lt;/a&gt; for building community-themed web sites.&#160; Again, there is some useful documentation about this in the &lt;a href=&quot;http://world.episerver.com/en/Get-Started/&quot; target=&quot;_blank&quot;&gt;Get Started&lt;/a&gt; tab under &lt;a href=&quot;http://world.episerver.com/en/Get-Started/Start-Developing-with-EPiServer-Community-and-Relate-/&quot; target=&quot;_blank&quot;&gt;Start Developing with Relate+&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src=&quot;http://blogs.interakting.co.uk/mattnield/aggbug/381.aspx&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>            <guid>http://blogs.interakting.co.uk/mattnield/archive/2009/03/27/developing-with-episerver.aspx</guid>            <pubDate>Fri, 27 Mar 2009 09:52:41 GMT</pubDate>           <category>Blog post</category></item><item> <title>EPiServer: The trust relationship between the primary domain and the trusted domain failed</title>            <link>http://blogs.interakting.co.uk/mattnield/archive/2009/03/25/episerver-the-trust-relationship-between-the-primary-domain-and-the.aspx</link>            <description>&lt;p&gt;I&#39;m still fairly new to &lt;a title=&quot;EPiServer&quot; href=&quot;http://www.episerver.com/&quot; rel=&quot;&quot;&gt;EPiServer&lt;/a&gt;, so I&#39;m going through the process of a great many rookie errors whilst taking over a site from someone with vastly more knowledge of the product than me.&lt;/p&gt;
&lt;p&gt;One issue I had recently was when I was creating a new stage server for a client so that they could test things out.&#160; I went through a cobbled route of copying their live DB and live code and slapping them on to of a clean &lt;a title=&quot;EPiServer&quot; href=&quot;http://www.episerver.com/&quot; rel=&quot;&quot;&gt;EPiServer&lt;/a&gt; install and hacking about in the web.config file to get it all working.&#160; The in itself was a piece of cake.&lt;/p&gt;
&lt;p&gt;I started getting problems when the AD users could not connect tot he site.&#160; I checked and rechecked the LDAP settings in the web.config and they were all correct.&#160; After a quick look on &lt;a href=&quot;http://world.episerver.com&quot; target=&quot;_blank&quot;&gt;EPiServer World&lt;/a&gt;, I found an &lt;a href=&quot;http://world.episerver.com/en/FAQ/Items/The-trust-relationship-between-the-primary-domain-and-the-trusted-domain-failed/&quot; target=&quot;_blank&quot;&gt;FAQ explaining the problem&lt;/a&gt;, though I could not manage to get the workarounds to provide the goods.&lt;/p&gt;
&lt;p&gt;The problem is not caused by EPiServer, it is how the .Net framework deals with AD when it is not connected to the domain.&#160; Now that I knew a little more about what the cause of the problem might be, I hit Google to try and find a resolution.&#160; Eventually a came across &lt;a href=&quot;http://www.techsupportforum.com/microsoft-support/windows-nt-2000-2003-server-2008-server/169618-disconnecting-domain.html&quot; target=&quot;_blank&quot;&gt;this forum entry&lt;/a&gt; which gave a possible solution.&#160; The long story short is that bay changing the Local Policy on the server and rebooting.&lt;/p&gt;
&lt;p&gt;To make the change, follow the steps below:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Go to &#39;&lt;strong&gt;Local Security Policy&lt;/strong&gt;&#39; on the server through the Administrative Tools.&lt;/li&gt;
    &lt;li&gt;Expand &#39;&lt;strong&gt;Local Policies&lt;/strong&gt;&#39; and then click on &#39;Security Options&#39; to see the list of security policies.&lt;/li&gt;
    &lt;li&gt;Select the &#39;&lt;strong&gt;Interactive Logon: Number of previous logons to cache&lt;/strong&gt;&#39; policy.&lt;/li&gt;
    &lt;li&gt;In the properties, set the cache value to 0.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This stops the OS for caching user details between logins, forcing the server to connect to the domain.&#160; After quick reboot, this fixes the problem.&lt;/p&gt;
&lt;h3&gt;Related Links&lt;/h3&gt;
&lt;p&gt;&lt;a title=&quot;http://world.episerver.com/en/FAQ/Items/The-trust-relationship-between-the-primary-domain-and-the-trusted-domain-failed/&quot; href=&quot;http://world.episerver.com/en/FAQ/Items/The-trust-relationship-between-the-primary-domain-and-the-trusted-domain-failed/&quot;&gt;http://world.episerver.com/en/FAQ/Items/The-trust-relationship-between-the-primary-domain-and-the-trusted-domain-failed/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title=&quot;http://www.techsupportforum.com/microsoft-support/windows-nt-2000-2003-server-2008-server/169618-disconnecting-domain.html&quot; href=&quot;http://www.techsupportforum.com/microsoft-support/windows-nt-2000-2003-server-2008-server/169618-disconnecting-domain.html&quot;&gt;http://www.techsupportforum.com/microsoft-support/windows-nt-2000-2003-server-2008-server/169618-disconnecting-domain.html&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://blogs.interakting.co.uk/mattnield/aggbug/380.aspx&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>            <guid>http://blogs.interakting.co.uk/mattnield/archive/2009/03/25/episerver-the-trust-relationship-between-the-primary-domain-and-the.aspx</guid>            <pubDate>Wed, 25 Mar 2009 11:07:56 GMT</pubDate>           <category>Blog post</category></item></channel>
</rss>