<rss version="2.0">
  <channel>
    <title>Blog</title>
    <link>http://nickmayne.com/</link>
    <description>&lt;![CDATA[Hi, I'm Nick.

When not writing crazy code, I enjoy writing about programming related stuff.]]&gt;</description>
    <item>
      <title>PSINI in PowerShell</title>
      <link>http://nickmayne.com/blog/psini-in-powershell</link>
      <description>&lt;![CDATA[&lt;p&gt;Recently I have had to deal with INI files, for anyone who doesn't know what one looks like, its full of key-value pairs&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Foo=1
Bar=2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can have sections [SectionName] too. But quite often, when you are dealing with INI files in a DevOps approach, you want to change values based on something dynamic, be it an IpAddress, URL... something.&lt;/p&gt;
&lt;p&gt;To the rescue is the PowerShell module of PSINI. Here is an example of one I did earlier;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Import-Module PsIni

$FileContent = Get-IniContent &amp;quot;c:\file.ini&amp;quot;

$FileContent[&amp;quot;tcp_enabled&amp;quot;] = 1
$FileContent[&amp;quot;a_value&amp;quot;] = &amp;quot;some text&amp;quot;
$FileContent[&amp;quot;http_enabled&amp;quot;] = 1

Out-IniFile -InputObject $FileContent -FilePath &amp;quot;c:\file.ini&amp;quot; -Force
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;PSINI will load the INI file into memory, and allow you to modify or add additional values. Super easy.&lt;/p&gt;
]]&gt;</description>
      <pubDate>Tue, 04 Feb 2020 10:46:21 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/blog/psini-in-powershell</guid>
    </item>
    <item>
      <title>SSIS and Azure Devops</title>
      <link>http://nickmayne.com/blog/ssis-and-azure-devops</link>
      <description>&lt;![CDATA[&lt;p&gt;Here at Tesco, one of the projects I am working on requires me to use SSIS.. For anyone who doesn't know what SSIS is, it stands for SQL Server Integration Services and is the next version of automation after the old DTS packages.&lt;/p&gt;
&lt;p&gt;SSIS can be super useful for moving data around, but deploying it can be a pain... especially building. There are normally three methods;&lt;/p&gt;
&lt;p&gt;Build using DevEnv&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;- task: CmdLine@1
    displayName: 'Build SSIS'
    inputs:
        filename: '&amp;quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Devenv.com&amp;quot;'
        arguments: '&amp;quot;$(Build.SourcesDirectory)\$(Solution)&amp;quot; /rebuild $(SSISBuildConfiguration) /project &amp;quot;$(Build.SourcesDirectory)\src\Tesco.HRAM.IntegrationServices\Tesco.HRAM.IntegrationServices.dtproj&amp;quot;'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Building through Devnv can take up to 20-30minutes.. and when moving to an on-prem build agent, it also requires you to have a valid VS license.&lt;/p&gt;
&lt;p&gt;Use the Azure DevOps marketplace - this was my initially prefered option, however, they don't have commercial licenses... no good.&lt;/p&gt;
&lt;p&gt;Powershell to the rescue!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;- Powershell: |
        $dtProjFolderToLoad = &amp;quot;$(Build.SourcesDirectory)\src\Tesco.HRAM.IntegrationServices&amp;quot;
        $dtProjFileToLoad = Join-Path $dtProjFolderToLoad &amp;quot;Tesco.HRAM.IntegrationServices.dtproj&amp;quot;
        [xml]$dtProjXmlDoc = New-Object System.Xml.XmlDocument
        $dtProjXmlDoc.PreserveWhitespace = $true
        $dtProjXmlDoc.Load($dtProjFileToLoad)

        # Create folder with the project name. This will essentially be zipped into an ispac
        $devFolder = Join-Path $dtProjFolderToLoad &amp;quot;bin\$(SSISBuildConfiguration)&amp;quot;
        if (Test-Path $devFolder)
        {
                Remove-Item $devFolder -Recurse
        }
        $ispacFolder = Join-Path $devFolder &amp;quot;Tesco.HRAM&amp;quot;
        Write-Host $ispacFolder
        New-Item -ItemType Directory -Force -Path $ispacFolder

        # Create the project manifest in the ispac folder
        # Exists in node /Project/DeploymentModelSpecificContent/Manifest/SSIS:Project
        $projectManifestXml = $dtProjXmlDoc.Project.DeploymentModelSpecificContent.Manifest.Project.OuterXml
        $projectManifestFullPath = Join-Path $ispacFolder &amp;quot;@Project.manifest&amp;quot;
        $projectManifestXml | Out-File $projectManifestFullPath -Encoding ascii -NoNewline

        # Add [Content types].xml, which has a static content
        $contentTypesXml = &amp;quot;&amp;lt;?xml version=`&amp;quot;1.0`&amp;quot; encoding=`&amp;quot;utf-8`&amp;quot;?&amp;gt;&amp;lt;Types xmlns=`&amp;quot;http://schemas.openxmlformats.org/package/2006/content-types`&amp;quot;&amp;gt;&amp;lt;Default Extension=`&amp;quot;dtsx`&amp;quot; ContentType=`&amp;quot;text/xml`&amp;quot; /&amp;gt;&amp;lt;Default Extension=`&amp;quot;conmgr`&amp;quot; ContentType=`&amp;quot;text/xml`&amp;quot; /&amp;gt;&amp;lt;Default Extension=`&amp;quot;params`&amp;quot; ContentType=`&amp;quot;text/xml`&amp;quot; /&amp;gt;&amp;lt;Default Extension=`&amp;quot;manifest`&amp;quot; ContentType=`&amp;quot;text/xml`&amp;quot; /&amp;gt;&amp;lt;/Types&amp;gt;&amp;quot;
        $contentTypesFullPath = Join-Path $ispacFolder '[Content_Types].xml'
        $contentTypesXml | Out-File -LiteralPath $contentTypesFullPath -Encoding utf8 -NoNewline

        # Iterate over all SSIS packages (*.dtsx) inside the .dtproj file add them to the ispac folder
        $dtProjXmlDoc.Project.DeploymentModelSpecificContent.Manifest.Project.Packages.Package | ForEach-Object { 
                $fileToCopy = (Join-Path $dtProjFolderToLoad ([string]$_.Name))
                Copy-Item $fileToCopy $ispacFolder 
        }


        # Iterate over all project-level connection managers (*.connmgr), add them to the ispac folder
        $dtProjXmlDoc.Project.DeploymentModelSpecificContent.Manifest.Project.ConnectionManagers.ConnectionManager | ForEach-Object { 
                $fileToCopy = (Join-Path $dtProjFolderToLoad ([string]$_.Name))
                Copy-Item $fileToCopy $ispacFolder 
        }

        # Copy the parameters file to the ispac folder
        $paramsFullPathSource = Join-Path $dtProjFolderToLoad &amp;quot;Project.params&amp;quot;
        Copy-Item $paramsFullPathSource $ispacFolder

        # Archive the ispac folder as a &amp;quot;.ispac&amp;quot; file
        Compress-Archive ($ispacFolder + &amp;quot;\*&amp;quot;) ($ispacFolder + &amp;quot;.zip&amp;quot;) -Force
        Rename-Item ($ispacFolder + &amp;quot;.zip&amp;quot;) ($ispacFolder + &amp;quot;.ispac&amp;quot;) -Force
        Remove-Item $ispacFolder -Recurse
    displayName: 'Build SSIS'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above takes around 1-2 minutes to run, and you end up with the same outcome!&lt;/p&gt;
&lt;p&gt;Easy and fast - All result in a deployable ISPAC file.&lt;/p&gt;
]]&gt;</description>
      <pubDate>Tue, 04 Feb 2020 10:43:39 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/blog/ssis-and-azure-devops</guid>
    </item>
    <item>
      <title>MapReduce using Dapper</title>
      <link>http://nickmayne.com/blog/mapreduce-using-dapper</link>
      <description>&lt;![CDATA[&lt;p&gt;Whilst working at Patient.Info, I was tasked with upgrading the forums to be more performant; The Forums hose thousands of page, hundreds of categories, and help people from all over the globe to overcome medical issues - and some just like to chat. It's a real community.&lt;/p&gt;
&lt;p&gt;Anyways; from a performance perspective, the forums pages were loading on an average of 4-5seconds, SQL was sat at around 30% utilization, going to 60% with some load, and then occasionally it would fall over... not a good place to be.&lt;/p&gt;
&lt;p&gt;To tackle this; I took a look at how Orchard Core was using YesSql. YesSql turns data in to &amp;quot;Json Documents&amp;quot; and stores everything in one column, it then turns the queryable data into a highly optimized index table. SQL is very fast when the data is indexed, and that index is not defragmented. Each table within YesSql is a clustered index.&lt;/p&gt;
&lt;p&gt;This was great - let's do that!&lt;/p&gt;
&lt;p&gt;But just using YesSQL was not possible due to time constraints; I needed a way to simulate this.. to do this, I created a map-reduce pattern in C# using Views.&lt;/p&gt;
&lt;p&gt;To start with, you need a query to get you what you want... in this scenario, a discussion. I use a TVP to make the query slightly faster when I have multiple records;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var itemDataTable = new DataTable();
itemDataTable.Columns.Add(&amp;quot;Id&amp;quot;, typeof(long));

foreach (var queryId in queryIds) {
    itemDataTable.Rows.Add(queryId);
}

var results = _connection.Query&amp;lt;DiscussionSummary,
    DiscussionSummary&amp;gt;(@&amp;quot;
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;

    SELECT
        d.Id,
        d.Content,
        d.HasImages,
        d.HasVideos
    FROM Discussions d
        INNER JOIN @discussionIdsTVP dtvp ON dtvp.Id = d.Id;&amp;quot;,
    (d) =&amp;gt; {
        d.SluggedTitle = d.Title.Slug();

        return d;
    },
    param: new { discussionIdsTVP = itemDataTable.AsTableValuedParameter(&amp;quot;[dbo].[IdTVP]&amp;quot;) });

return results
    .ToDictionary(k =&amp;gt; queryKeyValues.First(x =&amp;gt; x.Value == k.Id).Key, v =&amp;gt; v);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So... I can now get a discussion by an Id; the next step is knowing what I want!? This is where the filter comes in, the reduce.&lt;/p&gt;
&lt;p&gt;I want to get all Discussions archived since a specific date;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public IEnumerable&amp;lt;long&amp;gt; GetAllArchivedSince(DateTime lastUpdated) {
    return _connection.Query&amp;lt;long&amp;gt;(@&amp;quot;
        SELECT
            d.[Id]
            FROM Discussions d
            WHERE d.Archived = 1
              AND d.LastUpdated &amp;gt;= @lastUpdated
        &amp;quot;,
        new { lastUpdated });
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here you would place an index on the Archived and LastUpdated records.&lt;/p&gt;
&lt;p&gt;So... you have your MapReduce pattern using Dapper; you reduce your records and get your map. Next, add caching :)&lt;/p&gt;
]]&gt;</description>
      <pubDate>Tue, 04 Feb 2020 10:41:55 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/blog/mapreduce-using-dapper</guid>
    </item>
    <item>
      <title>Using Orchard {culture} routes</title>
      <link>http://nickmayne.com/memorystream/using-orchard-culture-routes</link>
      <description>&lt;![CDATA[&lt;p&gt;As part of the upcoming Orchard CMS 1.9 release, a new feature crept in as part of the localization work that has happened on the 1.x branch, and that is the ability to specify the culture in the route and Orchard will as if by magic use the localized version of that page if its available.&lt;/p&gt;
&lt;p&gt;So.. What do I need to do?&lt;/p&gt;
&lt;p&gt;There are two ways to use this new feature,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Query parameter ?culture=en-GB&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use Orchard routes.&lt;/p&gt;
&lt;p&gt;new Route(&amp;quot;{culture}/foo&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Wonder how it all works? Take a look in to the file DefaultFrontEndCultureSelector.cs&lt;/p&gt;
&lt;p&gt;Also note that Orchard will also try to determine the culture if it is a POST, so if you have a generic route with no culture, it will try to determine it from the referer or request path.&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:26:25 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/using-orchard-culture-routes</guid>
    </item>
    <item>
      <title>What!? Orchard CMS with Owin throwing some sorta weird &amp;quot;No owin.Environment item was found in the context&amp;quot; error under IIS?</title>
      <link>http://nickmayne.com/memorystream/orchardcms-owin-environment-missing</link>
      <description>&lt;![CDATA[&lt;p&gt;Today I decided to get OWIN up and running on Orchard. Sebastien had done the leg work, I just needed to get it compiling, update the DLL packages for Owin, and get those unit tests running. Fantastic, not hard.. but hang on!! What's this error!&lt;/p&gt;
&lt;p&gt;No owin.Environment item was found in the context&lt;/p&gt;
&lt;p&gt;After lots of googling, it appears that this error will only occur if the Owin Startup class is not called.&lt;/p&gt;
&lt;p&gt;I fire up IIS Express, and hey presto, it works, Orchard kicks up, so the issue is IIS!&lt;/p&gt;
&lt;p&gt;So I cleared my cache, deleted dependencies, cleaned, rebuilt, still issues.... ultimately, its the ASP.Net temporary files that are going to kick ya. Just do this..&lt;/p&gt;
&lt;p&gt;Run this in PowerShell&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;net stop w3svc
Remove-Item -Path &amp;quot;C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\*&amp;quot; -Force -Recurse
Remove-Item -Path &amp;quot;C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\*&amp;quot; -Force -Recurse
net start w3svc
&lt;/code&gt;&lt;/pre&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:25:35 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/orchardcms-owin-environment-missing</guid>
    </item>
    <item>
      <title>Orchard Forums: Where are we?</title>
      <link>http://nickmayne.com/memorystream/orchard-forums-ndash-where-are-we</link>
      <description>&lt;![CDATA[&lt;p&gt;One of the most requested features on the Orchard User Voice is a Forum module. Internet forums in the conventional sense is just a discussion site where people can post a question, receive an answer or merely to strike up a conversation.&lt;/p&gt;
&lt;p&gt;Forums have a large and varied vocabulary which can be very confusing to a user, i.e. a Thread can be referred to as a Topic, A Post maybe a Reply, so on a so forth. For the Orchard Forums module I have used this vocabulary.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Forum: A board to start your journey i.e. Asking a question or striking up a conversation. These contain a collection of Threads.&lt;/li&gt;
&lt;li&gt;Thread: A collection of Posts.&lt;/li&gt;
&lt;li&gt;Post: A user submitted message.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I am going to walk through below how to get started.. but first you need to clone the Repo at &lt;a href="http://orchardforums.codeplex.com"&gt;orchardforums.codeplex.com&lt;/a&gt; (Make sure the Directory name is NGM.Forum)&lt;/p&gt;
&lt;h3&gt;Enable Feature&lt;/h3&gt;
&lt;p&gt;To start seeing the Forums module you need to enable the Forums feature &lt;strong&gt;FYI: This demo is done in ThemeMachine and is not styled.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_2.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Create Forum&lt;/h3&gt;
&lt;p&gt;Once installed there will be a Forums button on the Admin menu. Click that to create a Forum. &lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_26.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_12.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now lets create a new forum. In my demo below I am creating a Discussions Forum.&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_4.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_1.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hit save and Vola… You have just created a Discussions Forum. (Obviously with no threads…)&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_6.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_2.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Going to the permalink that has been generated through the AutoRoutePart… in this case &lt;a href="http://localhost:30320/OrchardLocal/discussions"&gt;http://localhost:30320/OrchardLocal/discussions&lt;/a&gt; you will find your self at the UI for the users to interact with.&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_8.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_3.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Create Thread&lt;/h3&gt;
&lt;p&gt;Now let now create a Thread.&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_10.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_4.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are a few things to note on this page.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Categories and Tags. These are delivered though the Taxonomies module.&lt;/li&gt;
&lt;li&gt;The Permalink and Home page button. These are there by default when you create/edit a Thread. You can remove them with the Placement.info file in your theme.&lt;/li&gt;
&lt;li&gt;Where is my Rich Text Editor? I am NOT using the BodyPart for Posts. Instead I have implemented my own version of what BodyPart does because it does not cater to the needs to anything outside of the Admin Screens.. i.e. Media Management. So How can I have a Rich Text Editor? Implement one.. Just copy the code from TinyMCE. I have added a flavor to the part so creating your own is easy.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now hit Save….&lt;/p&gt;
&lt;h3&gt;Moderation&lt;/h3&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_12.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_5.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;By default all users are moderated. This is done two fold.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;A Part called UserForumPart: This is a part that is attached directly to the user.&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_14.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_6.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ApproveUnapprove Permission: Allows a user in a role to approve or un-approve Posts and threads.&lt;/p&gt;
&lt;p&gt;To Approve or un-approve Posts and Threads you need access to the admin screens, so head to your admin screens and click on ‘&lt;strong&gt;Manage Forum&lt;/strong&gt;’ &lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_16.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_7.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here you have a Thread awaiting approval. A Thread or Post can live in 3 states.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Approved: Content is okay. &lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_18.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_8.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;2. Awaiting Approval: Content needs to be reviewed&lt;/p&gt;
&lt;p&gt;3. Not Approved: Content is Rejected. &lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_20.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_9.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this case I will approve. You can now see your thread on the front screen.&lt;/p&gt;
&lt;h1&gt;View / Reply Post&lt;/h1&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_22.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_10.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A few things to note from the screen above. 1. You have the taxonomies being displayed. 2. Quick reply. This is the edit box displayed. The Forums module DOES support multithreaded posts, but have not implemented from a UI perspective.&lt;/p&gt;
&lt;p&gt;Okay so that is the end of this demo. Please clone the Repo at &lt;a href="http://orchardforums.codeplex.com"&gt;orchardforums.codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;But Nick, Functionality is starting to come together… but where is the theming!?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Hold on there busta!, So I have been speaking with Ryan Drew Burnett around the theming side of things, and he has produced the first mock up of a themed Orchard Forums… Check it out! (&lt;strong&gt;I think is look great!&lt;/strong&gt;)&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_24.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Orchard-Forums--Where-are-we_EC82/image_thumb_11.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;CORRECTION: Fixing naming of folder form NGM.Forums to NGM.Forum (Thanks Volody)&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 16:55:02 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/orchard-forums-ndash-where-are-we</guid>
    </item>
    <item>
      <title>AppFabric Caching in Orchard CMS</title>
      <link>http://nickmayne.com/memorystream/appfabric-caching-in-orchard-cms</link>
      <description>&lt;![CDATA[&lt;p&gt;A while ago I was commissioned to write a AppFabric Caching module for Onestop Internet Ltd, who have subsequently generously donated the module to the wider community. Well what is AppFabric Caching? And how does it help me? AppFabric Caching is a distributed caching mechanism that allows multiple web applications to use the same cache, this is different to how most websites currently work, even Orchard by default maintains its own cache within its separate website instances. With AppFabric, all website instances maintain and contribute to the &lt;strong&gt;same cache&lt;/strong&gt;. If you are at all interested in the Concepts and Architecture of AppFabric please visit &lt;a href="http://msdn.microsoft.com/en-us/library/ff383813%28v=azure.10%29.aspx"&gt;Concepts and Architecture (Windows Server AppFabric Caching)&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Implementation&lt;/h1&gt;
&lt;p&gt;In order to implement AppFabric caching please follow these steps.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install AppFabric Cache Server V1.1 (&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=27115"&gt;Microsoft AppFabric 1.1 for Windows Server&lt;/a&gt;) It is VERY important that it is this version and NOT V1.0&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once installed you will have a powershell command in your start menu… &lt;a href="http://www.themayneissue.com/Media/Default/Windows-Live-Writer/AppFabric-Caching-in-Orchard-CMS_9E76/image_2.png"&gt;&lt;img src="http://www.themayneissue.com/Media/Default/Windows-Live-Writer/AppFabric-Caching-in-Orchard-CMS_9E76/image_thumb.png" alt="image" title="image" /&gt;&lt;/a&gt; Open this up and run the following command &lt;em&gt;Update-CacheHostAllowedVersions 3 3 3 3&lt;/em&gt; This will update you cache server to the right version of the DLLs you are going to use, I would the restart your cache cluster (Restart-CacheCluster)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.themayneissue.com/Media/Default/Windows-Live-Writer/AppFabric-Caching-in-Orchard-CMS_9E76/image_4.png"&gt;&lt;img src="http://www.themayneissue.com/Media/Default/Windows-Live-Writer/AppFabric-Caching-in-Orchard-CMS_9E76/image_thumb_1.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download the AppFabric Module instance to your modules directory. Currently here (&lt;a href="https://orchardappfabric.codeplex.com"&gt;https://orchardappfabric.codeplex.com&lt;/a&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open up you Web.Config file in Orchard.Web and add the following configuration… Add this to your &lt;code&gt;&amp;lt;ConfigSections&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowlocation="true" allowdefinition="Everywhere"&gt;
&lt;p&gt;Next add this anywhere in your config file.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;    &amp;lt;datacacheclients&amp;gt;&amp;lt;datacacheclient name=&amp;quot;default&amp;quot;&amp;gt;&amp;lt;/datacacheclient&amp;gt;&amp;lt;/datacacheclients&amp;gt;
          &amp;lt;securityProperties mode=&amp;quot;None&amp;quot; protectionLevel=&amp;quot;None&amp;quot;&amp;gt;
            &amp;lt;!--&amp;lt;messageSecurity
              authorizationInfo=&amp;quot;Your authorization token will be here.&amp;quot;&amp;gt;
            &amp;lt;/messageSecurity&amp;gt;--&amp;gt;
          &amp;lt;/securityProperties&amp;gt;
        &amp;lt;/dataCacheClient&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;A few things to note at this point.

*   Your **dataCacheClient name** is the **name of your Tenant (default should ALWAYS be left lowercase)**

*   Your **host name** and **cachePort** are the same as the one your screen shot above, if you have forgotten, jump on to powershell and type Get-Cache

*   The SecurityProperties attribute MUST be in there. I have set in to non in powershell, but this is down to the individual configuration you have set. – **If this does not match, appfabric will fall over in a mess.**

&amp;lt;/section&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Enable AppFabric module and you are good to go.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Some important URLs&lt;/h3&gt;
&lt;p&gt;Once you have everything working, you can view some stuff in Orchard…&lt;/p&gt;
&lt;p&gt;View your Cache: &lt;a href="http://localhost:30320/OrchardLocal/Appfabric/Index" title="http://localhost:30320/OrchardLocal/Appfabric/Index"&gt;http://localhost:30320/OrchardLocal/Appfabric/Index&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Clear Cache for Tenant: &lt;a href="http://localhost:30320/OrchardLocal/Appfabric/Clear"&gt;http://localhost:30320/OrchardLocal/Appfabric/Clear&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Constraining the AppFabric Module&lt;/h3&gt;
&lt;p&gt;Out of the box the AppFabric Module attempts to cache everything within distributed cache apart from ShapeDescriptor, ShapeTable and ContentTypeDefinition.&lt;/p&gt;
&lt;p&gt;If you want your object cached only locally and not in AppFabric, then create an implementation of ICacheStoreStrategy.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.themayneissue.com/Media/Default/Windows-Live-Writer/AppFabric-Caching-in-Orchard-CMS_9E76/image_8.png"&gt;&lt;img src="http://www.themayneissue.com/Media/Default/Windows-Live-Writer/AppFabric-Caching-in-Orchard-CMS_9E76/image_thumb_3.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Returning true/false will force local cache to take over on that particular object.&lt;/p&gt;
&lt;h1&gt;Challenges faced?&lt;/h1&gt;
&lt;h3&gt;Serialization issues:&lt;/h3&gt;
&lt;p&gt;By default AppFabric Serializes objects using the DataContactSerializer, which means that you need a couple of things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Default Constructor&lt;/li&gt;
&lt;li&gt;Mark entities' with the [Serialization] attribute&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This posed a major problem as this was a MASSIVE constraint, the whole point of Orchard is to allow people to create objects and cache them and not have to worry about external stuff like “how does it cache?” but just know that some how, it does. To solve this issue I created a wrapper object and marked that as Serializable: (code does need to be cleaned up)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    [Serializable]
    public class EntryWrapper&amp;lt;T&amp;gt; : ISerializable {
        private readonly Lazy&amp;lt;T&amp;gt; _value;

        [XmlIgnore]
        public T Value {
            get { return _value.Value; }
        }

        public EntryWrapper(T value) {
            _value = new Lazy&amp;lt;T&amp;gt;(() =&amp;gt; value);
        }

        protected EntryWrapper(SerializationInfo info, StreamingContext context) {
            var settings = new JsonSerializerSettings {
                Converters = new List&amp;lt;JsonConverter&amp;gt; {new MultipleConstructorsJsonConverter(), new InterfaceJsonConverter()},
                TypeNameHandling = TypeNameHandling.All,
                ContractResolver = new DefaultContractResolver {
                    DefaultMembersSearchFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance
                },
                ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
                ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor
            };

            _value = new&amp;gt; Lazy&amp;lt;T&amp;gt;(() =&amp;gt; JsonConvert.DeserializeObject&amp;lt;T&amp;gt;(info.GetString(&amp;quot;JsonValue&amp;quot;), settings));
        }

        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
        void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) {
            var settings = new JsonSerializerSettings {
                TypeNameHandling = TypeNameHandling.All,
                ContractResolver = new DefaultContractResolver {
                    DefaultMembersSearchFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance
                },
                ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
                ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor
            };
            // Do JSON serialization of the underlying object here
            var json = JsonConvert.SerializeObject(Value, settings);
            info.AddValue(&amp;quot;JsonValue&amp;quot;, json);
        }
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I then implemented Json.Net to Serialize/De-serialize said object, this works perfectly fine in the majority of all cases, except when that object as multiple constructors, or &lt;T&gt; was an interface, for this I created some JsonConverters. I am not posting the code here, but you can view them over on codeplex &lt;a href="https://orchardappfabric.codeplex.com"&gt;https://orchardappfabric.codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Case Sensitive Cache Names&lt;/h3&gt;
&lt;p&gt;One thing I found out that wasted ALOT of time was that cache names are case sensitive, you can have two caches, one called “Default” and another called “default” (note the lower and upper case ‘Dd’). By default AppFabric has the later out of the box, which then ties to Orchards Default tenant which cannot be renamed. I therefore imposed a constraint on the cache names ‘Default’ by always setting it to lowercase.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    var cacheName = _shellSettings.Name;
    if (cacheName.Equals(&amp;quot;default&amp;quot;, StringComparison.OrdinalIgnoreCase))
        cacheName = cacheName.ToLowerInvariant();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In all other cases, the cache name is the the one specified within your web.config, which should also map to your Tenant.&lt;/p&gt;
&lt;h1&gt;What’s next?&lt;/h1&gt;
&lt;p&gt;Multi Datacentre Support So please give it a go, and let me know how your get on. If you have any suggestions/comments/feature etc, let me know and I will do my best to include them.&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:24:12 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/appfabric-caching-in-orchard-cms</guid>
    </item>
    <item>
      <title>Hooking up MSTest to Specflow</title>
      <link>http://nickmayne.com/memorystream/hooking-up-mstest-to-specflow</link>
      <description>&lt;![CDATA[&lt;p&gt;Open up the App.config file in your Test project and add&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;unitTestProvider name=&amp;quot;MsTest&amp;quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to the specFlow Element. The resulting XML should look like this...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;
&amp;lt;configuration&amp;gt;
  &amp;lt;configSections&amp;gt;
    &amp;lt;section name=&amp;quot;specFlow&amp;quot; type=&amp;quot;TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow&amp;quot;/&amp;gt;
  &amp;lt;/configSections&amp;gt;

  &amp;lt;specFlow&amp;gt;
    &amp;lt;unitTestProvider name=&amp;quot;MsTest&amp;quot; /&amp;gt;
  &amp;lt;/specFlow&amp;gt;
&amp;lt;/configuration&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next step is to regenerate your specflow features to use the new MSTest stuff... and Job Done!&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:23:03 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/hooking-up-mstest-to-specflow</guid>
    </item>
    <item>
      <title>Cannot set a value on node type &amp;#39;Element&amp;#39;</title>
      <link>http://nickmayne.com/memorystream/cannot-set-a-value-on-node-type-element</link>
      <description>&lt;![CDATA[&lt;p&gt;Dealing with XML can be a pain at the best of times, but running in to this error can be a pain… Why does it happen and what’s the fix?&lt;/p&gt;
&lt;p&gt;Why? You cant map to the value property on Element Nodes… You may have code that looks like this…&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;string value = “foo”;
string value = “bar”;
var sessionNode = xmlDocument.CreateElement(name);
sessionNode.Value = value; // The problem happens here…
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The Fix:&lt;/p&gt;
&lt;p&gt;Change to InnerText&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;string value = “foo”;
string value = “bar”;
var sessionNode = xmlDocument.CreateElement(name);
sessionNode.InnerText = value; // All Working now :)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hope this helps someone. Nick&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:22:26 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/cannot-set-a-value-on-node-type-element</guid>
    </item>
    <item>
      <title>2011: My year in review</title>
      <link>http://nickmayne.com/memorystream/2011-my-year-in-review</link>
      <description>&lt;![CDATA[&lt;p&gt;Wow, what a year, lots done, lots learnt, lots left to do… Here what my year has been like… (I will keep updating it as I remember exactly what ive done, long year!)&lt;/p&gt;
&lt;h1&gt;ITV&lt;/h1&gt;
&lt;p&gt;So lots have happened at ITV in the last year, to sum it up I took lead on delivering the .net solution for the ITV pay project, this was a huge deal for me as it is one of ITVs biggest projects, so for me to take lead on delivering it was big – but I couldn't have done it with out a great team behind me, and the fruits of our labour paid off when we saw pay content playing back thru the ITV player two days before Christmas, fantastic win.&lt;/p&gt;
&lt;p&gt;Another big project for the .net team going forward is delivering a new pipeline for some new projects coming along, which is an exciting greenfield project, which means we start from the ground up.&lt;/p&gt;
&lt;p&gt;Testing has also taken centre stage this year, I started teaching Feature File sessions which were fun and have been a massive driver behind pushing them to the rest of the business, but I have been so busy with my work in and out of ITV its been hard to fit them in, so something I must improve upon.&lt;/p&gt;
&lt;h1&gt;Mayneframe Computing&lt;/h1&gt;
&lt;p&gt;So in the later half of 2011 I started my own company called Mayneframe Computing (stole it from my dad) – I am still working out the details of where I want to take it, but its in a good position to deliver product in 2012.&lt;/p&gt;
&lt;p&gt;Around the same time I landed a contract with a company in LA working on Orchard (more below), one of the sites is already live (&lt;a href="http://www.spyoptic.com/" title="http://www.spyoptic.com/"&gt;http://www.spyoptic.com/&lt;/a&gt;) – with a few other ones to follow! – On top of that I am flying over to LA in a week to see them!! So stoked!!&lt;/p&gt;
&lt;p&gt;I have another start-up in the fire with some friends delivering agile coaching, though this is just an idea at the moment… more about in the coming months!&lt;/p&gt;
&lt;h1&gt;Orchard Project&lt;/h1&gt;
&lt;p&gt;This year has been big in terms of Orchard for me – I have worked hard on delivering features to a brand new platform that is still being proved in the commercial sense. So what have I delivered this year?&lt;/p&gt;
&lt;p&gt;(ripped from my CV)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Orchard Open Authentication&lt;/strong&gt; – The aim of this project was to provide multiple authentication mechanisms to Orchard CMS. This project leveraged multiple 3&lt;sup&gt;rd&lt;/sup&gt; party project including DotNetOpenAuth, Linq2Twitter, Facebook C# SDK, and Microsoft Connect (Live ID). &lt;a href="http://orchardopenauth.codeplex.com/"&gt;http://orchardopenauth.codeplex.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Orchard Forums&lt;/strong&gt; – This project provides a forums module to the Orchard CMS stack. &lt;a href="http://orchardforums.codeplex.com/"&gt;http://orchardforums.codeplex.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(this was not)&lt;/p&gt;
&lt;p&gt;In September there was a community election for the &lt;strong&gt;Orchard Steering Committee&lt;/strong&gt;, and I was one of the five that got elected (&lt;a href="http://www.orchardproject.net/about" title="http://www.orchardproject.net/about"&gt;http://www.orchardproject.net/about&lt;/a&gt;) which for me shows that my hard work has paid off, and its something I have been really proud of.&lt;/p&gt;
&lt;h1&gt;Other highlights&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In May we went to Florida with some friends and saw others whist out there, Gary and Kim we love you guys!&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Discovering a club with a hot-tub!!, and seeing Twickenham bridge at 5am.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Passed my Windows Forms Application Development Microsoft Exam.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Met my target for saving for the year.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Also been with Pens for 8 years. (This was added by request of the girlfriend!)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:21:42 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/2011-my-year-in-review</guid>
    </item>
    <item>
      <title>How to get your Awesome Dev workspace for Orchard CMS up and running 101</title>
      <link>http://nickmayne.com/memorystream/how-to-get-your-awesome-dev-workspace-for-orchard-cms-up-and-running-101</link>
      <description>&lt;![CDATA[&lt;p&gt;After watching twitter for the last couple of days, and with the additional of a couple other comments, I have decided to write this post.&lt;/p&gt;
&lt;p&gt;What does this post assume… 2 things, You have Mercurial (+ Tortoise HG (&lt;a href="http://tortoisehg.bitbucket.org/"&gt;Download Here&lt;/a&gt;)) and Visual Studio 2010.&lt;/p&gt;
&lt;p&gt;Lets get going.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a new folder structure that resembles this.. D:\BlogPosts\Orchard&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Right click on the Orchard Folder navigate via the sub menus to TortoiseHg –&amp;gt; Clone..&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Details are..&lt;/p&gt;
&lt;p&gt;Source: &lt;a href="https://hg01.codeplex.com/orchard" title="https://hg01.codeplex.com/orchard"&gt;https://hg01.codeplex.com/orchard&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Destination: D:\BlogPosts\Orchard&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hit Clone (This will take a while so make a cup of tea :))&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to D:\BlogPosts\Orchard\src\ and open up Orchard.sln in Visual Studio&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hit F5 in Visual Studio&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Welcome to Orchard.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Time to create your own area to allow easy maintenance.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Copy and paste Orchard.sln – rename Copy of Orchard.sln to MyNewAwesomeOrchardInstance.sln – Why do this? Its important to allow you to decrease merge pain from the main repo further down the line.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check in to your new repo thru the Tortoise Workbench - Always use your new solution.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:20:56 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/how-to-get-your-awesome-dev-workspace-for-orchard-cms-up-and-running-101</guid>
    </item>
    <item>
      <title>Latest Orchard Forum Mock-Ups</title>
      <link>http://nickmayne.com/memorystream/latest-orchard-forum-mock-ups</link>
      <description>&lt;![CDATA[&lt;p&gt;I thought a quick update to the community as to where I am with an Orchard Forum Module. I have not come too much further from my first post in terms of features (&lt;a href="/memorystream/orchard-forums..-basic-functionality"&gt;/memorystream/orchard-forums..-basic-functionality&lt;/a&gt;) but instead I have worked on more core issues rather than bulking out functionality as Orchard is about building modules right? so functionality can always be added later on.&lt;/p&gt;
&lt;h3&gt;So what do I have that’s new from the first post?&lt;/h3&gt;
&lt;p&gt;1. Enhanced Security – Still a work in progress.&lt;br /&gt;
2. Basic Styling – (Screenshots below).&lt;br /&gt;
3. Ability to Close a Thread or Forum.&lt;br /&gt;
4. Ability to mark a Thread as Sticky.&lt;br /&gt;
5. Ability to mark a Thread as a ‘Question’ or ‘Discussion’  - functionality to mark a post as a question is not there yet.&lt;br /&gt;
6. Show the Latest Post at both the Forum level and the Thread level.&lt;/p&gt;
&lt;p&gt;Okay so here are some mock-ups. Feedback welcome!! (FYI Code: &lt;a href="http://orchardforums.codeplex.com/" title="http://orchardforums.codeplex.com/"&gt;http://orchardforums.codeplex.com/&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/Forums&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A list of all forums&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Latest-Orchard-Forum-Mock-ups_12E91/image_2.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Latest-Orchard-Forum-Mock-ups_12E91/image_thumb.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/discussions&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A list of threads under a forum.&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Latest-Orchard-Forum-Mock-ups_12E91/image_4.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Latest-Orchard-Forum-Mock-ups_12E91/image_thumb_1.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/discussions/is-orchard-better-than-drupal&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A list of Posts under a thread&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Latest-Orchard-Forum-Mock-ups_12E91/image_6.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Latest-Orchard-Forum-Mock-ups_12E91/image_thumb_2.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;So how do you mark a Thread as Sticky or Closed?&lt;/h3&gt;
&lt;p&gt;You need one of the two permissions &lt;strong&gt;ManageStickyThread&lt;/strong&gt; or &lt;strong&gt;ManageOpenCloseThread –&lt;/strong&gt; If you have one of these permissions then when you Create/Edit a thread then you will be able to see these options.&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Default/Windows-Live-Writer/Latest-Orchard-Forum-Mock-ups_12E91/image_8.png"&gt;&lt;img src="/Media/Default/Windows-Live-Writer/Latest-Orchard-Forum-Mock-ups_12E91/image_thumb_3.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Is Closed&lt;/strong&gt; marker stops replies to Posts within the individual Thread&lt;br /&gt;
The &lt;strong&gt;Is Sticky&lt;/strong&gt; marker but that thread at the top of the list of threads.&lt;/p&gt;
&lt;h3&gt;Where am I headed next?&lt;/h3&gt;
&lt;p&gt;1. Flag a post/thread for moderation – this includes a admin screen.&lt;br /&gt;
2. Move a thread to a different Forum&lt;/p&gt;
&lt;h3&gt;What am I thinking about?&lt;/h3&gt;
&lt;p&gt;1. Adding a category to a forum, so you can list Forums by category.&lt;br /&gt;
2. Easier method to reply to a post&lt;br /&gt;
3. Notes as to why a moderator would ‘Close’ or take action i.e. move thread – more information back to user.&lt;/p&gt;
&lt;p&gt;Let me know what you think – download the code and play. &lt;a href="http://orchardforums.codeplex.com/" title="http://orchardforums.codeplex.com/"&gt;http://orchardforums.codeplex.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 16:57:07 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/latest-orchard-forum-mock-ups</guid>
    </item>
    <item>
      <title>Orchard Forums.. Basic Functionality</title>
      <link>http://nickmayne.com/memorystream/orchard-forums-basic-functionality</link>
      <description>&lt;![CDATA[&lt;p&gt;Forums seem to be a hot topic on the Orchard discussion boards so I thought why not take a crack at it?&lt;/p&gt;
&lt;p&gt;So what have I implemented so far? Well….&lt;/p&gt;
&lt;p&gt;1. Creation of a Forum.&lt;br /&gt;
2. Creation of a Thread.&lt;br /&gt;
3. Reply to a Thread – i.e. creation of a Post&lt;br /&gt;
4. Reply to a Post – i.e. threaded posts.&lt;br /&gt;
5. Basic security&lt;/p&gt;
&lt;p&gt;So here are some screenies of what I have working… this is early days and comments and feedback most definitely wanted &lt;img src="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/wlEmoticon-smile_2.png" alt="Smile" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Create Forum&lt;/strong&gt;&lt;br /&gt;
Clicking on ‘Forum’ With bring you to a create Forum page – Here you can specify a Title, Body (description of forum) and everything else… You could compare this to setting up a blog&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_4.png"&gt;&lt;img src="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_thumb_1.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Create Thread&lt;/strong&gt;&lt;br /&gt;
Now lets create a Thread&lt;br /&gt;
Navigate to your Forum (I clicked ‘show on main menu’ to make my life a little easier on the previous step)&lt;br /&gt;
&lt;a href="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_6.png"&gt;&lt;img src="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_thumb_2.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Fill out your stuff for your Thread..&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_8.png"&gt;&lt;img src="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_thumb_3.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I asked a simple question ‘Who' own’s the moon?’&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_10.png"&gt;&lt;img src="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_thumb_4.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On the main forum page… you can now see the thread appear&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_19.png"&gt;&lt;img src="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_thumb_8.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you navigate to &lt;a href="http://localhost:30320/OrchardLocal/forums" title="http://localhost:30320/OrchardLocal/forums"&gt;http://localhost:30320/OrchardLocal/forums&lt;/a&gt; then you will be able to see a list of all forums with Thread and Post counts updated..&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_21.png"&gt;&lt;img src="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_thumb_9.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Reply to a Thread&lt;/strong&gt;&lt;br /&gt;
Now lets reply to this, ‘Click the reply button’&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_12.png"&gt;&lt;img src="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_thumb_5.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Fill out an answer… and click ‘Save’&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_14.png"&gt;&lt;img src="/Media/Windows-Live-Writer/Orchard-Forums.-The-Start_B3E9/image_thumb_6.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see this is now attached to the Thread.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So I know this is just basic functionality but its a start… To code is located on Codeplex here. &lt;a href="http://orchardforums.codeplex.com/" title="http://orchardforums.codeplex.com/"&gt;http://orchardforums.codeplex.com/&lt;/a&gt; Download and have a play&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 16:56:20 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/orchard-forums-basic-functionality</guid>
    </item>
    <item>
      <title>Scope based permissions for OpenId, Microsoft Connect and Facebook in Orchard CMS</title>
      <link>http://nickmayne.com/memorystream/scope-based-permissions-for-openid-microsoft-connect-and-facebook-in-orchard-cms</link>
      <description>&lt;![CDATA[&lt;p&gt;Recently I have been updating my open authentication module to deal with a more granular approach to scope based permissions and how the admin user can set these up.&lt;/p&gt;
&lt;p&gt;When enabling a Feature, the permissions attached to this feature will be inserted in to the database with default ones enabled.&lt;/p&gt;
&lt;p&gt;Here is a screenshot of how it looks so far…&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.themayneissue.com/Media/Windows-Live-Writer/Granular-Permissions-within_A4A5/image_2.png"&gt;&lt;img src="http://www.themayneissue.com/Media/Windows-Live-Writer/Granular-Permissions-within_A4A5/image_thumb.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope this will help people in the future.&lt;/p&gt;
&lt;p&gt;Facebook Permissions - &lt;a href="http://developers.facebook.com/docs/authentication/permissions/" title="http://developers.facebook.com/docs/authentication/permissions/"&gt;http://developers.facebook.com/docs/authentication/permissions/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Microsoft Connect Scopes - &lt;a href="http://msdn.microsoft.com/en-us/library/ff749529.aspx" title="http://msdn.microsoft.com/en-us/library/ff749529.aspx"&gt;http://msdn.microsoft.com/en-us/library/ff749529.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:18:30 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/scope-based-permissions-for-openid-microsoft-connect-and-facebook-in-orchard-cms</guid>
    </item>
    <item>
      <title>Sneak Peek Orchard CMS playing nicely with my Social and Open Authentication modules</title>
      <link>http://nickmayne.com/memorystream/sneak-peek-orchard-cms-playing-nicely-with-my-social-and-open-authentication-modules</link>
      <description>&lt;![CDATA[&lt;p&gt;Okay so for a while I have been working on my Open Authentication module which I am sure a lot of you are sick of hearing about… But now I have started working on a Social module that utilises my Open auth mod. Here are some screen shots that might get some creative juices flowing!!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.themayneissue.com/Media/Windows-Live-Writer/Sneak-Peek-Orchard-CMS-playing-nicely-wi_117C7/image_2.png"&gt;&lt;img src="http://www.themayneissue.com/Media/Windows-Live-Writer/Sneak-Peek-Orchard-CMS-playing-nicely-wi_117C7/image_thumb.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My Social module so far has added three widgets..&lt;/p&gt;
&lt;p&gt;1. A Twitter Timeline widget&lt;br /&gt;
2. A Twitter Status Update widget&lt;br /&gt;
3. Microsoft Connect Contact List widget&lt;/p&gt;
&lt;p&gt;Once added to necessary zones, and using my Open authentication module to associate my external accounts to my orchard account.. lets see what happens!!&lt;/p&gt;
&lt;p&gt;1. A view logged out of the home page which what looks to be a blog? and a twitter timeline….&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.themayneissue.com/Media/Windows-Live-Writer/Sneak-Peek-Orchard-CMS-playing-nicely-wi_117C7/image_4.png"&gt;&lt;img src="http://www.themayneissue.com/Media/Windows-Live-Writer/Sneak-Peek-Orchard-CMS-playing-nicely-wi_117C7/image_thumb_1.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So lets click on that fancy ‘Microsoft Connect’ logon button&lt;/p&gt;
&lt;p&gt;2. After typing my password and email in…. here is the results…&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.themayneissue.com/Media/Windows-Live-Writer/Sneak-Peek-Orchard-CMS-playing-nicely-wi_117C7/image_6.png"&gt;&lt;img src="http://www.themayneissue.com/Media/Windows-Live-Writer/Sneak-Peek-Orchard-CMS-playing-nicely-wi_117C7/image_thumb_2.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You have the Twitter status update on the top right… you also have the Microsoft Connect contact list down the bottom…&lt;/p&gt;
&lt;p&gt;So far… not far for a Sunday right?&lt;/p&gt;
&lt;p&gt;Lets me have you thoughts people!??&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:17:30 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/sneak-peek-orchard-cms-playing-nicely-with-my-social-and-open-authentication-modules</guid>
    </item>
    <item>
      <title>Get your Orchard site up and running with Microsoft Connect</title>
      <link>http://nickmayne.com/memorystream/get-your-orchard-site-up-and-running-with-microsoft-connect</link>
      <description>&lt;![CDATA[&lt;p&gt;So you want to install Microsoft connect and have Live Id running on your site. Now you can..&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install the latest NGM.OpenAuthentication module in to Orchard.&lt;/li&gt;
&lt;li&gt;Enable OAuth from the Site Settings section.&lt;/li&gt;
&lt;li&gt;Pop over to Microsoft and get your client Id and secret key http://msdn.microsoft.com/en-us/library/bb676626.aspx – entered this in to the site sections section, this will be visible after step 2.&lt;/li&gt;
&lt;li&gt;Let get the connect button into your site.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Load up the Layout.cshtml file.&lt;/p&gt;
&lt;p&gt;Enter this in to the file WorkContext.Layout.Footer.Add(New.PartsLiveIdLogOn(), &amp;quot;15&amp;quot;); // Login&lt;/p&gt;
&lt;p&gt;That's it, load up your site Smile&lt;/p&gt;
&lt;p&gt;Click Connect..&lt;/p&gt;
&lt;p&gt;now sign in, this will redirect you back to your site…&lt;/p&gt;
&lt;p&gt;Now if you have already connected your account this will sign you in… else enter your details and sign in, this will associate your account to your Live Id account.&lt;/p&gt;
&lt;p&gt;If you have no account and you choose to register, then your account will still get assigned to your local account.&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:15:53 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/get-your-orchard-site-up-and-running-with-microsoft-connect</guid>
    </item>
    <item>
      <title>Retrieving user information from Open Id using Open Authentication Module for Orchard CMS</title>
      <link>http://nickmayne.com/memorystream/retrieving-user-information-from-open-id-using-open-authentication-module-for-orchard-cms</link>
      <description>&lt;![CDATA[&lt;p&gt;Note : The Open authentication module is a work in progress this may change, though I thought I would blog about it because I thought it was cool. Also all code is on Dev branch at the moment.&lt;/p&gt;
&lt;p&gt;So.. picture this….  Your users are authenticating in to your system with all their profile details held across multiple open id providers, and you have just implemented an User Profile module where your users can insert data about themselves. Wouldn't it be nice that when users register for the first time and authenticate every subsequent time thereafter, that your profile module could take the details held by individual providers and pass them on to your profiles module? Well now the open authentication module provides an interface to do this (Open ID only at the moment at it has been  kind of a spike)&lt;/p&gt;
&lt;p&gt;So here are the step to produce the results once I check the code in&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Make sure you have a reference to the NGM.OpenAuthentication module.&lt;/li&gt;
&lt;li&gt;Next thing to do is to create a class that implements IClaimsHandler as so.. this class should exist in any module that needs claims/user information from the open id provider.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;using System;
using NGM.OpenAuthentication.Core;


namespace NGM.Profiles.Core {
    public class UserProfileClaims : IClaimsHandler {
        public void Creating() {
            Console.WriteLine(&amp;quot;Creating&amp;quot;);
        }



    &amp;lt;span class=&amp;quot;kwrd&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;kwrd&amp;quot;&amp;gt;void&amp;lt;/span&amp;gt; Created(dynamic claims) {
        Console.WriteLine(&amp;lt;span class=&amp;quot;str&amp;quot;&amp;gt;&amp;quot;Created&amp;quot;&amp;lt;/span&amp;gt;);
        Console.WriteLine(claims.Contact.Email);
    }
}


}
&lt;/code&gt;&lt;/pre&gt;
&lt;ol start="3"&gt;
&lt;li&gt;&lt;p&gt;Make sure your module is enabled. (if your not sure on that see this post http://www.orchardproject.net/docs/Enabling-and-disabling-features.ashx)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go sign in for example thru Google using the open authentication mechanism built in to the Open Authentication module.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On successful authentication two methods will be called.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Before doing anything with claims ‘Creating’ is called,&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once the claims have been built you can then retrieve them thru the implemented Created method.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I have used the dynamic keyword to build up my objects as I have been experimenting…. An example of the code building up the claims is below :-&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;            dynamic claims = new ExpandoObject();
            claims.BirthDate = new ExpandoObject();
            claims.BirthDate.DayOfMonth = fetchResponse.GetAttributeValue(WellKnownAttributes.BirthDate.DayOfMonth);
            claims.BirthDate.Month = fetchResponse.GetAttributeValue(WellKnownAttributes.BirthDate.Month);
            claims.BirthDate.WholeBirthDate = fetchResponse.GetAttributeValue(WellKnownAttributes.BirthDate.WholeBirthDate);
            claims.BirthDate.Year = fetchResponse.GetAttributeValue(WellKnownAttributes.BirthDate.Year);


        claims.Company = &amp;lt;span class=&amp;quot;kwrd&amp;quot;&amp;gt;new&amp;lt;/span&amp;gt; ExpandoObject();
        claims.Company.CompanyName = fetchResponse.GetAttributeValue(WellKnownAttributes.Company.CompanyName);
        claims.Company.JobTitle = fetchResponse.GetAttributeValue(WellKnownAttributes.Company.JobTitle);

        claims.Contact = &amp;lt;span class=&amp;quot;kwrd&amp;quot;&amp;gt;new&amp;lt;/span&amp;gt; ExpandoObject();
        claims.Contact.Email = fetchResponse.GetAttributeValue(WellKnownAttributes.Contact.Email);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I'm not sure whether I will continue with the dynamic key word as it may be difficult for module developers to use. Thoughts?&lt;/p&gt;
&lt;p&gt;Anyways… That's how to get Open Id claims out of the Open Authentication module and so I thought I would share it with you…&lt;/p&gt;
&lt;p&gt;Feedback would be awesome Smile (I will check this code in tomorrow for people to play with)&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:14:36 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/retrieving-user-information-from-open-id-using-open-authentication-module-for-orchard-cms</guid>
    </item>
    <item>
      <title>Linq2Twitter, Open Authentication module and Orchard CMS</title>
      <link>http://nickmayne.com/memorystream/linq2twitter-open-authentication-module-and-orchard-c</link>
      <description>&lt;![CDATA[&lt;p&gt;Note : The Open authentication module is a work in progress this may change, though I thought I would blog about it because I thought it was cool &lt;img src="/Media/Windows-Live-Writer/6e38f24cd334_1114C/wlEmoticon-smile_2.png" alt="Smile" /&gt; Also all code is on Dev branch at the moment.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://linqtotwitter.codeplex.com/"&gt;Linq2Twitter&lt;/a&gt; is a really cool project that allows you to easily interact with twitter, so how do you authenticate with this module without having to worry about authentication? (bit weird huh) In comes the &lt;a href="http://orchardopenauth.codeplex.com/"&gt;OpenAuthentication&lt;/a&gt; module for Orchard CMS.&lt;/p&gt;
&lt;p&gt;First you need to have a twitter association set up in Orchard, thus because IUser is required.&lt;/p&gt;
&lt;p&gt;1. First set up Twitter association..&lt;/p&gt;
&lt;p&gt;Click the ‘Associated Accounts’ under the Users section on the admin page. Next click Add Account&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/6e38f24cd334_1114C/image_2.png"&gt;&lt;img src="/Media/Windows-Live-Writer/6e38f24cd334_1114C/image_thumb.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then select ‘Twitter’ (yes the pic sucks at the moment)&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/6e38f24cd334_1114C/image_4.png"&gt;&lt;img src="/Media/Windows-Live-Writer/6e38f24cd334_1114C/image_thumb_1.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This will redirect you to the twitter page where you can select ‘allow’ or ‘deny’&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/6e38f24cd334_1114C/image_6.png"&gt;&lt;img src="/Media/Windows-Live-Writer/6e38f24cd334_1114C/image_thumb_2.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Select ‘Allow’ because you know my module is awesome. This will return you back to the orchard Admin page.&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/6e38f24cd334_1114C/image_8.png"&gt;&lt;img src="/Media/Windows-Live-Writer/6e38f24cd334_1114C/image_thumb_3.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Yes the account is not displaying correctly. but that will be worked out…  Someone please log a bug &lt;img src="/Media/Windows-Live-Writer/6e38f24cd334_1114C/wlEmoticon-smile_2.png" alt="Smile" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Account Set up&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;2. Next thing, over to Linq2Twitter. The Open Authentication module has an interface called IOAuthTwitterAuthorizer. This will allow you to get the authorizer for a particular user.&lt;/p&gt;
&lt;p&gt;The key to getting the authorizer is to use the GetAuthorizer(&lt;em&gt;User Here&lt;/em&gt;) method where you pass thru the IUser (hence why you need the user setup in orchard).&lt;/p&gt;
&lt;p&gt;I have done a code sample below. Easy right??&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;using System;
using System.Linq;
using System.Web.Mvc;
using LinqToTwitter;
using NGM.OpenAuthentication.Core.OAuth;
using Orchard;


namespace NGM.Twitter.Controllers {
 public class HomeController: Controller {
  private readonly IOAuthTwitterAuthorizer _twitterAuthorizer;
  private readonly IOrchardServices _orchardServices;

  public HomeController(IOAuthTwitterAuthorizer twitterAuthorizer, IOrchardServices orchardServices) {
   _twitterAuthorizer = twitterAuthorizer;
   _orchardServices = orchardServices;
  }

  ViewResult RetrieveTweets() {
   var twitterCtx = new TwitterContext(_twitterAuthorizer.GetAuthorizer(_orchardServices.WorkContext.CurrentUser));

   var tweets =
    from tweet in twitterCtx.Status
   where tweet.Type == StatusType.Friends
   select tweet;

   tweets.ToList().ForEach(
    tweet = &amp;amp; gt; Console.WriteLine(
     &amp;quot;Friend: {0}\nTweet: {1}\n&amp;quot;,
     tweet.User.Name,
     tweet.Text));

   return null;
  }
 }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hope this help people&lt;/p&gt;
&lt;p&gt;Codeplex project : &lt;a href="http://orchardopenauth.codeplex.com/" title="http://orchardopenauth.codeplex.com/"&gt;http://orchardopenauth.codeplex.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;p.s. don't forget to enable the Open Authentication module!!!&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 16:53:11 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/linq2twitter-open-authentication-module-and-orchard-c</guid>
    </item>
    <item>
      <title>BlogML module v0.6 Release for Orchard v1.0</title>
      <link>http://nickmayne.com/memorystream/blogml-module-v0_6-release-for-orchard-v1_0</link>
      <description>&lt;![CDATA[&lt;p&gt;Last night I released an update to my BlogML module for Orchard. This module allows you to import and export blogs from one site to another using the BlogML schema.&lt;/p&gt;
&lt;p&gt;So What are the new features?&lt;/p&gt;
&lt;p&gt;1. Ability to insert a URL such as &lt;a href="http://localhost:30320/OrchardLocal/Media/filetoimport.xml" title="http://localhost:30320/OrchardLocal/Media/filetoimport.xml"&gt;http://localhost:30320/OrchardLocal/Media/filetoimport.xml&lt;/a&gt; and the module will then stream that file, thus allowing you to have uploaded that file to your site already. This should help to improve on the Timeout issues and size problems some people are getting.&lt;/p&gt;
&lt;p&gt;2. Ability to import into existing blog. A blog but be in existence before hand for this to work &lt;img src="/Media/Windows-Live-Writer/BlogML-module-v0.6-Release-for-Orchard.0_A178/wlEmoticon-smile_2.png" alt="Smile" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="/Media/Windows-Live-Writer/BlogML-module-v0.6-Release-for-Orchard.0_A178/image_2.png"&gt;&lt;img src="/Media/Windows-Live-Writer/BlogML-module-v0.6-Release-for-Orchard.0_A178/image_thumb.png" alt="image" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope that helps people who have been having problems.&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 16:48:43 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/blogml-module-v0_6-release-for-orchard-v1_0</guid>
    </item>
    <item>
      <title>Starting work on OpenAuth module for Orchard CMS</title>
      <link>http://nickmayne.com/memorystream/starting-work-on-openauth-module-for-orchard-cms</link>
      <description>&lt;![CDATA[&lt;p&gt;So I have thrown the Idea back and forth, and after deciding I wasn't going to do any work on Open ID for Orchard, I have changed my mind! So I have set up a new codeplex project called orchardopenauth (http://orchardopenauth.codeplex.com/).&lt;/p&gt;
&lt;p&gt;The first goal is to get an extensible Open ID implementation working inside of Orchard without having to change any of the Orchard base code.&lt;/p&gt;
&lt;p&gt;If anyone would like in.. give me a shout – Either by email or twitter (@NicholasMayne)&lt;/p&gt;
&lt;p&gt;Why OpenAuth? Why NOT OpenID?
Open ID is small part to a very large piece of the puzzle. I want this module to be more than just about Open ID, eventually I see a full implementation of the DotNetOpenAuth project within the Orchard Framework, though these are early days and I have only just started.&lt;/p&gt;
&lt;p&gt;Any ideas!.. or feedback, please let me know!&lt;/p&gt;
]]&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:12:02 GMT</pubDate>
      <guid isPermaLink="true">http://nickmayne.com/memorystream/starting-work-on-openauth-module-for-orchard-cms</guid>
    </item>
  </channel>
</rss>