<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://shazwazza.com/rss/xslt"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Shazwazza</title>
    <link>https://shazwazza.com/</link>
    <description>My blog which is pretty much just all about coding</description>
    <generator>Articulate, blogging built on Umbraco</generator>
    <image>
      <url>/media/0libq25y/frog.png?rmode=max&amp;v=1da0e911f4e6890</url>
      <title>Shazwazza</title>
      <link>https://shazwazza.com/</link>
    </image>
    <item>
      <guid isPermaLink="false">1296</guid>
      <link>https://shazwazza.com/post/auto-upgrade-your-nuget-packages-with-azure-pipelines-or-github-actions/</link>
      <category>ASP.Net</category>
      <category>Umbraco</category>
      <title>Auto upgrade your Nuget packages with Azure Pipelines or GitHub Actions</title>
      <description>&lt;p&gt;Before we start I just want to preface this with some  &lt;strong&gt;warnings &lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This works for me, it might not work for you&lt;/li&gt;
&lt;li&gt;To get this working for you, you may need to tweak some of the code referenced&lt;/li&gt;
&lt;li&gt;This is not under any support or warranty by anyone&lt;/li&gt;
&lt;li&gt;Running Nuget.exe update command outside of Visual Studio will overwrite your files so there is a manual review process (more info below)&lt;/li&gt;
&lt;li&gt;This is only for ASP.NET Framework using &lt;em&gt;packages.config&lt;/em&gt; – Yes I know that is super old and I should get with the times, but this has been an ongoing behind the scenes project of mine for a long time. When I need this for Package Reference projects, ASP.NET Core/5, I’ll update it but there’s nothing stopping you from tweaking this to work for you&lt;/li&gt;
&lt;li&gt;This only works for a specified csproj, not an entire sln – it could work for that but I’ve not tested, there would be a few tweaks to make that work&lt;/li&gt;
&lt;li&gt;&lt;span style="text-decoration: line-through;"&gt;This does not yet work for GitHub actions but the concepts are all here and could probably very easily be converted&lt;/span&gt; &lt;strong&gt;UPDATE:&lt;/strong&gt; This works now!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now that’s out of the way …&lt;/p&gt;
&lt;h2&gt;How do I do it?&lt;/h2&gt;
&lt;p&gt;With a lot of PowerShell :) This also uses a few methods from the &lt;a rel="noopener" href="https://github.com/microsoft/PowerShellForGitHub" target="_blank"&gt;PowerShellForGitHub&lt;/a&gt; project.&lt;/p&gt;
&lt;p&gt;The process is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Run a pipeline/action on a schedule (i.e. each day)&lt;/li&gt;
&lt;li&gt;This checks against your source code for the installed version for a particular package&lt;/li&gt;
&lt;li&gt;Then it checks with Nuget (using your Nuget.config file) to see what the latest stable version is&lt;/li&gt;
&lt;li&gt;If there’s a newer version:&lt;/li&gt;
&lt;li&gt;Create a new branch&lt;/li&gt;
&lt;li&gt;Run a Nuget update against your project&lt;/li&gt;
&lt;li&gt;Build the project&lt;/li&gt;
&lt;li&gt;Commit the changes&lt;/li&gt;
&lt;li&gt;Push the changes&lt;/li&gt;
&lt;li&gt;Create a PR for review&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Azure Pipelines/GitHub Actions YAML&lt;/h2&gt;
&lt;p&gt;The only part of the YAML that needs editing is the variables, here's what they mean:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ProjectFile = The relative path to your csproj that you want to upgrade&lt;/li&gt;
&lt;li&gt;PackageFile = The relative path to your packages.config file for this project&lt;/li&gt;
&lt;li&gt;PackageName = The Nuget package name you want upgraded&lt;/li&gt;
&lt;li&gt;GitBotUser = The name used for the Git commits&lt;/li&gt;
&lt;li&gt;GitBotEmail = The email used for the Git commits&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For Azure Pipelines, these are also required:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GitHubOwner = The repository owner (i.e. &lt;a href="https://github.com/Shazwazza/Articulate" title="https://github.com/Shazwazza/Articulate"&gt;https://github.com/&lt;strong&gt;Shazwazza&lt;/strong&gt;/Articulate&lt;/a&gt; )&lt;/li&gt;
&lt;li&gt;GitHubRepository = The repository name (i.e. &lt;a href="https://github.com/Shazwazza/Articulate" title="https://github.com/Shazwazza/Articulate"&gt;https://github.com/Shazwazza/&lt;strong&gt;Articulate&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; &lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;There is one Secret setting you need to create in Azure Pipelines: &lt;em&gt;GitHubAccessToken &lt;/em&gt;which is a GitHub PAT that you need to create that has access to this repository.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then there are some variables to assist with testing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DisableUpgradeStep = If true will just check if there’s an upgrade available and exit&lt;/li&gt;
&lt;li&gt;DisableCommit = If true will run the upgrade and will exit after that (no commit, push or PR)&lt;/li&gt;
&lt;li&gt;DisablePush = If true will run the upgrade + commit and will exit after that (no push or PR)&lt;/li&gt;
&lt;li&gt;DisablePullRequest = If true will run the upgrade + commit + push and will exit after that (no PR)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each step in the yaml build more or less either calls Git commands or PowerShell functions. The PowerShell functions are loaded as part of a PowerShell Module which is committed to the repository. This module’s functions are auto-loaded by PowerShell because the first step configures the PowerShell environment variable &lt;em&gt;PSModulePath&lt;/em&gt; to include the custom path. Once that is in place, all functions exposed by the module are auto-loaded.&lt;/p&gt;
&lt;p&gt;In these examples you’ll see that I’m referencing Umbraco Cloud names and that’s because I’m using this on Umbraco Cloud for my own website and the examples are for the &lt;em&gt;UmbracoCms&lt;/em&gt; package. But this should in theory work for all packages!&lt;/p&gt;
&lt;h2&gt;Show me the code&lt;/h2&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://github.com/Shazwazza/NugetAutoUpgrade/tree/main/Examples/NET_Framework/WebApplication" target="_blank"&gt;The code for all of this is here&lt;/a&gt; in a new GitHub repo and here’s how you use it:&lt;/p&gt;
&lt;p&gt;You can copy the folder structure in the repository as-is. Here's an example of what my site's repository folder structure is to make this work (everything except the src folder is in the GitHub repo above):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[root]
&lt;ul&gt;
&lt;li&gt;auto-upgrader.devops.yml &lt;em&gt;(If you are using Azure Pipelines)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;.github
&lt;ul&gt;
&lt;li&gt;workflows
&lt;ul&gt;
&lt;li&gt;auto-upgrader.gh.yml &lt;em&gt;(If you are using GitHub Actions)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;build
&lt;ul&gt;
&lt;li&gt;PowershellModules
&lt;ul&gt;
&lt;li&gt;AutoUpgradeFunctions.psd1&lt;/li&gt;
&lt;li&gt;AutoUpgradeFunctions.psm1&lt;/li&gt;
&lt;li&gt;AutoUpgradeFunctions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;src
&lt;ul&gt;
&lt;li&gt;Shazwazza.Web
&lt;ul&gt;
&lt;li&gt;Shazwazza.Web.csproj&lt;/li&gt;
&lt;li&gt;packages.config&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of the steps have descriptive display names and it should be reasonably self documenting.&lt;/p&gt;
&lt;p&gt;The end result is a PR, here’s one that was generated by this process:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://shazwazza.com/media/8d8d9550b2c26c6/image.png?width=600&amp;amp;height=353&amp;amp;mode=max" alt=""&gt;&lt;/p&gt;
&lt;h2&gt;Nuget overwrites&lt;/h2&gt;
&lt;p&gt;Nuget.exe works differently than Nuget within Visual Studio’s Package Manager Console. All of those special commands like Install-Package, Update-Package, etc… are all PowerShell module commands built into Visual Studio and they are able to work with the context of Visual Studio. This allows those commands to try to be a little smarter when running Nuget updates and also allows the legacy Nuget features like running PowerShell scripts on install/update to run. This script just uses Nuget.exe and it’s less smart especially for these legacy .NET Framework projects. As such, it will just overwrite all files in most cases (it does detect file changes it seems but isn’t always accurate).&lt;/p&gt;
&lt;p&gt;With that  &lt;strong&gt;warning &lt;/strong&gt;it is very important to make sure you review the changed files in the PR and revert or adjust any changes you need before applying the PR.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;You’ll see a note in the PowerShell script about Nuget overwrites. There are other options that can be used like "Ignore" and "IgnoreAll" but all my tests have showed that for some reason this setting will end up deleting a whole bunch of files so the default overwrite setting is used.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Next steps&lt;/h2&gt;
&lt;p&gt;Get out there and try it! Would love some feedback on this if/when you get a change to test it.&lt;/p&gt;
&lt;div class="post"&gt;
&lt;div class="body"&gt;
&lt;div id="4866d04c-80a7-43ab-a84e-d2ee7756afb6" class="postBody"&gt;
&lt;p&gt;&lt;em&gt;PackageReference&lt;/em&gt; support with .NET Framework projects could also be done (but IMO this is low priority) along with being able to upgrade the entire SLN instead of just the csproj.&lt;/p&gt;
&lt;p&gt;Then perhaps some attempts at getting a NET Core/5 version of this running. In theory that will be easier since it will mostly just be &lt;em&gt;dotnet&lt;/em&gt; commands.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:10:22 Z</pubDate>
      <a10:updated>2023-03-23T15:10:22Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1231</guid>
      <link>https://shazwazza.com/post/benchmarking-performance-of-your-code-between-release-versions/</link>
      <category>ASP.Net</category>
      <title>Benchmarking performance of your code between release versions</title>
      <description>&lt;p&gt;A while ago in 2016 I posted a &lt;a rel="noopener" href="https://github.com/dotnet/BenchmarkDotNet/issues/290" target="_blank"&gt;question&lt;/a&gt; on the &lt;a rel="noopener" href="https://github.com/dotnet/BenchmarkDotNet" target="_blank"&gt;BenchmarkDotNet&lt;/a&gt; repository about an official way to run benchmarks between Nuget releases. In 2018 I managed to find some time and with the with the help of &lt;a rel="noopener" href="https://github.com/adamsitnik" target="_blank"&gt;Adam Sitnik&lt;/a&gt; (one of the project’s maintainers), was able to &lt;a rel="noopener" href="https://github.com/dotnet/BenchmarkDotNet/pull/922" target="_blank"&gt;make that work&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;I won’t go into detail about what BenchmarkDotNet is, but it’s a brilliant way to accurately run benchmarks against your code to see how it performs, how much memory is being used, etc…&lt;/p&gt;
&lt;p&gt;With this new feature you can now easily see how your code changes effect performance between your releases.&lt;/p&gt;
&lt;h2&gt;Show me the code&lt;/h2&gt;
&lt;p&gt;Making this work is quite easy and there’s a &lt;a rel="noopener" href="https://github.com/dotnet/BenchmarkDotNet/blob/master/samples/BenchmarkDotNet.Samples/IntroNuGet.cs" target="_blank"&gt;quick start code snippet&lt;/a&gt; in the repo already. For the example below I’ll use &lt;a rel="noopener" href="https://sixlabors.com/projects/imagesharp/" target="_blank"&gt;ImageSharp&lt;/a&gt; as the library to be tested and we’ll see how well &lt;a rel="noopener" href="https://twitter.com/James_M_South" target="_blank"&gt;James&lt;/a&gt; and his team is doing with regards to improving it’s JPEG decoding performance.&lt;/p&gt;
&lt;pre class="lang-csharp"&gt;&lt;code&gt;
[Config(typeof(Config))]
public class ImageTests
{
    private static readonly string _filePath = @"C:\temp\test.jpg";

    private class Config : ManualConfig
    {
        public Config()
        {
            var baseJob = Job.MediumRun.With(CsProjCoreToolchain.Current.Value);
            Add(baseJob.WithNuGet("SixLabors.ImageSharp", "1.0.0-beta0006").WithId("1.0.0-beta0006"));
            Add(baseJob.WithNuGet("SixLabors.ImageSharp", "1.0.0-beta0005").WithId("1.0.0-beta0005"));
            Add(baseJob.WithNuGet("SixLabors.ImageSharp", "1.0.0-beta0004").WithId("1.0.0-beta0004"));
        }
    }

    [Benchmark]
    public Size LoadJpg()
    {
        using (var img = Image.Load(_filePath))
        {
            var size = img.Size();
            return size;
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The code above should seem pretty straightforward. It’s just setting up 3 BenchmarkDotNet jobs, each using a different version of the SixLabors.ImageSharp Nuget package. Then the actual benchmark test is loading in a JPEG extracting it’s size and returning it.&lt;/p&gt;
&lt;p&gt;Running the benchmark is like running any other BenchmarkDotNet test, for example in a console app:&lt;/p&gt;
&lt;pre class="lang-csharp"&gt;&lt;code&gt;
class Program
{
    static void Main(string[] args)
    {   
        var summary = BenchmarkRunner.Run();
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;The results&lt;/h2&gt;
&lt;table border="0"&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Job&lt;/th&gt;
&lt;th&gt;NuGetReferences&lt;/th&gt;
&lt;th&gt;Mean&lt;/th&gt;
&lt;th&gt;Error&lt;/th&gt;
&lt;th&gt;StdDev&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;LoadJpg&lt;/td&gt;
&lt;td&gt;1.0.0-beta0004&lt;/td&gt;
&lt;td&gt;SixLabors.ImageSharp 1.0.0-beta0004&lt;/td&gt;
&lt;td&gt;297.5 ms&lt;/td&gt;
&lt;td&gt;142.8 ms&lt;/td&gt;
&lt;td&gt;7.827 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LoadJpg&lt;/td&gt;
&lt;td&gt;1.0.0-beta0005&lt;/td&gt;
&lt;td&gt;SixLabors.ImageSharp 1.0.0-beta0005&lt;/td&gt;
&lt;td&gt;202.9 ms&lt;/td&gt;
&lt;td&gt;466.6 ms&lt;/td&gt;
&lt;td&gt;25.577 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LoadJpg&lt;/td&gt;
&lt;td&gt;1.0.0-beta0006&lt;/td&gt;
&lt;td&gt;SixLabors.ImageSharp 1.0.0-beta0006&lt;/td&gt;
&lt;td&gt;148.8 ms&lt;/td&gt;
&lt;td&gt;107.8 ms&lt;/td&gt;
&lt;td&gt;5.910 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Looks good! from the beta0004 release to the beta0006 release there’s almost twice the performance boost.&lt;/p&gt;
&lt;h2&gt;API Surface Area&lt;/h2&gt;
&lt;p&gt;There is one caveat though… In order to run these tests between versions of your library, the same API surface area will need to exist otherwise you’ll get exceptions when running the benchmarks. This is the reason why versions beta0001 –&amp;gt; beta0003 are not included in the jobs listed above. Its because in the older versions either the APIs were different or the namespaces were different.&lt;/p&gt;
&lt;p&gt;It is possible to work around this but you’d need to use some ugly reflection to do it and then you need to be careful that you are not testing the reflection performance hit either.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Now you should have a pretty easy way to know how the performance of your library is changing between versions. Happy coding!&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:09:17 Z</pubDate>
      <a10:updated>2023-03-23T15:09:17Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1191</guid>
      <link>https://shazwazza.com/post/aspnet-5-re-learning-a-few-things-part-2/</link>
      <category>ASP.Net</category>
      <title>ASP.Net 5 Re-learning a few things (part 2)</title>
      <description>&lt;p&gt;This is part 2 of a series of posts about some fundamental changes in ASP.Net 5 that we’ll need to re-learn (or un-learn!)&lt;/p&gt; &lt;p&gt;Part 1: &lt;a title="http://shazwazza.com/post/aspnet-5-re-learning-a-few-things-part-1/" href="http://shazwazza.com/post/aspnet-5-re-learning-a-few-things-part-1/"&gt;http://shazwazza.com/post/aspnet-5-re-learning-a-few-things-part-1/&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;System.Web&lt;/h2&gt; &lt;p&gt;This probably isn’t new news to most people since it’s really one of the fundamental shifts for ASP.Net 5 – There won’t be a System.Web DLL. Everything that you’ll install in your website will come as different, smaller, separate libraries. For example, if you want to serve static files, you’d reference the &lt;em&gt;Microsoft.AspNet.StaticFiles&lt;/em&gt; package, if you want to use MVC, you’d include the &lt;em&gt;Microsoft.AspNet.Mvc &lt;/em&gt;package&lt;em&gt;.&lt;/em&gt; &lt;/p&gt; &lt;p&gt;ASP.Net 5: “&lt;a href="http://www.asp.net/vnext/overview/aspnet-vnext/aspnet-5-overview" target="_blank"&gt;consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions&lt;/a&gt;”&lt;/p&gt; &lt;h2&gt;Web Forms&lt;/h2&gt; &lt;p&gt;Gone! YAY! :-)&lt;/p&gt; &lt;p&gt;Web Forms will still be a part of .Net as part of the main framework in System.Web, just not part of ASP.Net 5. &lt;/p&gt; &lt;h2&gt;HttpModules &lt;/h2&gt; &lt;p&gt;An HttpModule simply doesn’t exist in Asp.Net 5, but of course there is a new/better way to achieve this functionality, it’s called Middleware. In an HttpModule, you had to execute code based on the various &lt;a href="http://msdn.microsoft.com/en-us/library/bb470252.aspx" target="_blank"&gt;stages&lt;/a&gt; of a request, things such as &lt;em&gt;AuthenticateRequest, AuthorizeRequest, PostResolveRequestCache&lt;/em&gt;, and other slightly confusingly named events. This is no longer the case with Middleware, things just make sense now … everything is simply a linear execution of your code. You can have multiple middleware’s defined to execute in your application and each one is registered explicitly in your Startup.cs file. As a developer, you are in full control of what get’s executed and in what order instead of not knowing which HttpModules are executing and not really in control of their order of execution. Middleware can simply modify a request and continue calling the next one in the chain, or it can just terminate the pipeline and return a result. &lt;/p&gt; &lt;p&gt;There’s loads of examples in the source for middleware, ranging from the &lt;a href="https://github.com/aspnet/StaticFiles/blob/dev/src/Microsoft.AspNet.StaticFiles/StaticFileMiddleware.cs" target="_blank"&gt;static file middleware&lt;/a&gt; to &lt;a href="https://github.com/aspnet/Security/blob/master/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationMiddleware.cs" target="_blank"&gt;cookie authentication middleware&lt;/a&gt;,&amp;nbsp; etc…&lt;/p&gt; &lt;p&gt;And &lt;a href="http://whereslou.com/2014/05/28/asp-net-moving-parts-ibuilder/" target="_blank"&gt;here’s a good article&lt;/a&gt; that explains middeware registration and the flow of control.&lt;/p&gt; &lt;h2&gt;HttpHandlers&lt;/h2&gt; &lt;p&gt;HttpHandlers are also a thing of the past. All they really were was a request handler that was based on a specific request path. MVC (which now also includes WebApi) has got this covered. If you really wanted, you could create middleware for this type of functionality as well but unless you require something extraordinarily complex that MVC cannot do (and it can do a lot!), I’d recommend just sticking with MVC.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:15 Z</pubDate>
      <a10:updated>2023-03-23T15:08:15Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1208</guid>
      <link>https://shazwazza.com/post/asmx-soap-webservices-with-abstract-models-without-using-xmlinclude/</link>
      <category>ASP.Net</category>
      <title>ASMX SOAP Webservices with abstract models without using XmlInclude</title>
      <description>&lt;p&gt;I’m hoping this post might be useful to some folks out there that might be stuck using old ASMX/SOAP webservices in ASP.Net. If you’ve tried to return an abstract or superclass from an ASMX webservice without using XmlInclude or SoapInclude, you’ll get an error like:&lt;/p&gt;&lt;pre&gt;System.InvalidOperationException: There was an error generating the XML document. ---&amp;gt; System.InvalidOperationException: The type MyAwesomeClass was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write6_Item(String n, String ns, Item o, Boolean isNullable, Boolean needType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write10_Item(Object o)
   at Microsoft.Xml.Serialization.GeneratedAssembly.ItemSerializer.Serialize(Object objectToSerialize, XmlSerializationWriter writer)
   at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
   at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces)
   at System.Web.Services.Protocols.XmlReturnWriter.Write(HttpResponse response, Stream outputStream, Object returnValue)
   at System.Web.Services.Protocols.HttpServerProtocol.WriteReturns(Object[] returnValues, Stream outputStream)
   at System.Web.Services.Protocols.WebServiceHandler.WriteReturns(Object[] returnValues)
   at System.Web.Services.Protocols.WebServiceHandler.Invoke()&lt;/pre&gt;
&lt;p&gt;The normal way to work around this is to attribute your ASMX class with &lt;em&gt;[XmlInclude(typeof(MyAwesomeClass)] &lt;/em&gt;and repeat this for every subclass that you might be returning. This essentially tells the SOAP handler what types it should expect to serialize so it can ‘warm’ up a list of XmlSerializers. &lt;/p&gt;
&lt;p&gt;The problem with this is that you need to know about all of these types up-front, but what if you have a plugin system where other developers can define their own types? There would be no way of knowing up-front what types to register so this approach will not work.&lt;/p&gt;
&lt;h2&gt;IXmlSerializer to the rescue&lt;/h2&gt;
&lt;p&gt;To work around this problem you can define a wrapper class for your abstract/superclass.&amp;nbsp; Working with &lt;em&gt;IXmlSerializer&lt;/em&gt; is pretty annoying and I highly recommend &lt;a href="http://www.codeproject.com/Articles/43237/How-to-Implement-IXmlSerializable-Correctly" target="_blank"&gt;this great article&lt;/a&gt; if you are going to use it since one mistake can cause all sorts of problems&lt;/p&gt;
&lt;p&gt;The following class should work for any object. Also note the usage of the static dictionary to store references to created XmlSerializer instances since these are expensive to create per type.&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; SerializedObjectWrapper : IXmlSerializable
{
    &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
    &lt;span class="rem"&gt;/// The underlying Object reference that is being returned&lt;/span&gt;
    &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt; Object { get; set; }

    &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
    &lt;span class="rem"&gt;/// This is used because creating XmlSerializers are expensive&lt;/span&gt;
    &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; ConcurrentDictionary&amp;lt;Type, XmlSerializer&amp;gt; TypeSerializers 
        = &lt;span class="kwrd"&gt;new&lt;/span&gt; ConcurrentDictionary&amp;lt;Type, XmlSerializer&amp;gt;();

    &lt;span class="kwrd"&gt;public&lt;/span&gt; XmlSchema GetSchema()
    {
        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;null&lt;/span&gt;;
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ReadXml(XmlReader reader)
    {
        reader.MoveToContent();

        &lt;span class="rem"&gt;//Get the Item type attribute&lt;/span&gt;
        var itemType = reader.GetAttribute(&lt;span class="str"&gt;"ItemType"&lt;/span&gt;);
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (itemType == &lt;span class="kwrd"&gt;null&lt;/span&gt;) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; InvalidOperationException(&lt;span class="str"&gt;"ItemType attribute cannot be null"&lt;/span&gt;);
            
        &lt;span class="rem"&gt;//Ensure the type is found in the app domain&lt;/span&gt;
        var itemTypeType = Type.GetType(itemType);
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (itemTypeType == &lt;span class="kwrd"&gt;null&lt;/span&gt;) &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; InvalidOperationException(&lt;span class="str"&gt;"Could not find the type "&lt;/span&gt; + itemType);

        var isEmptyElement = reader.IsEmptyElement;
                    
        reader.ReadStartElement();

        &lt;span class="kwrd"&gt;if&lt;/span&gt; (isEmptyElement == &lt;span class="kwrd"&gt;false&lt;/span&gt;)
        {
            var serializer = TypeSerializers.GetOrAdd(itemTypeType, t =&amp;gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; XmlSerializer(t));
            Object = serializer.Deserialize(reader);
            reader.ReadEndElement();
        }
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; WriteXml(XmlWriter writer)
    {
        var itemType = Object.GetType();
        var serializer = TypeSerializers.GetOrAdd(itemType, t =&amp;gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; XmlSerializer(t));
            
        &lt;span class="rem"&gt;//writes the object type so we can use that to deserialize later&lt;/span&gt;
        writer.WriteAttributeString(&lt;span class="str"&gt;"ItemType"&lt;/span&gt;, 
            itemType.AssemblyQualifiedName ?? Object.GetType().ToString());

        serializer.Serialize(writer, Object);
    }
}&lt;/pre&gt;
&lt;p&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/p&gt;
&lt;h2&gt;Usage&lt;/h2&gt;
&lt;p&gt;Here’s an example of the usage of the &lt;em&gt;SerializedObjectWrapper&lt;/em&gt; class along with the example that would cause the above mentioned exception so you can see the difference:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;abstract&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MyAbstractClass
{
}

&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MyAwesomeClass : MyAbstractClass
{
}

&lt;span class="rem"&gt;//WONT WORK&lt;/span&gt;
[WebMethod]
&lt;span class="kwrd"&gt;public&lt;/span&gt; MyAbstractClass GetStuff()
{
    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; MyAwesomeClass();
}

&lt;span class="rem"&gt;//WILL WORK&lt;/span&gt;
[WebMethod]
&lt;span class="kwrd"&gt;public&lt;/span&gt; SerializedObjectWrapper GetStuff()
{
    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; SerializedObjectWrapper
    {
        Object = &lt;span class="kwrd"&gt;new&lt;/span&gt; MyAwesomeClass()
    };
}&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I know most people aren’t using AMSX web services anymore but in case your stuck on an old project or have inherited one, this might be of use :)&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:15 Z</pubDate>
      <a10:updated>2023-03-23T15:08:15Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1260</guid>
      <link>https://shazwazza.com/post/aspnet-identity-for-umbraco-members/</link>
      <category>ASP.Net</category>
      <category>Umbraco</category>
      <title>ASP.Net Identity for Umbraco Members</title>
      <description>&lt;p&gt;I’ve released version 1.0 of &lt;em&gt;UmbracoIdentity&lt;/em&gt; which allows for &lt;a rel="noopener" href="http://www.asp.net/identity" target="_blank"&gt;ASP.Net Identity&lt;/a&gt; to be used with Umbraco for &lt;strong&gt;front-end&lt;/strong&gt; members. I’ve tried to write enough documentation for you to get started, all of the code and docs are here: &lt;a href="https://github.com/Shandem/UmbracoIdentity" title="https://github.com/Shandem/UmbracoIdentity"&gt;https://github.com/Shandem/UmbracoIdentity&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It’s worth noting that this is not something that ‘everyone’ should just jump in with and start using. If you are not familiar with OWIN or ASP.Net Identity than none of this will really make any sense, I’ve added a bit of a disclaimer to the docs about this here: &lt;a href="https://github.com/Shandem/UmbracoIdentity#owin-setup" title="https://github.com/Shandem/UmbracoIdentity#owin-setup"&gt;https://github.com/Shandem/UmbracoIdentity#owin-setup&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are some &lt;a rel="noopener" href="https://github.com/Shandem/UmbracoIdentity/wiki/Known-Issues" target="_blank"&gt;known issues and limitations&lt;/a&gt; that you should be aware of, and this will also not work currently with back office users (that will come eventually too though).&lt;/p&gt;
&lt;p&gt;This package can be highly customized, it comes with many .cshtml views and c# classes that you can customize as you see fit – very similar to the Visual Studio 2013 Web Application templates that support ASP.Net Identity.&lt;/p&gt;
&lt;h2&gt;What about Asp.Net Membership with Umbraco?&lt;/h2&gt;
&lt;p&gt;The way that I’ve created this is to be 100% compatible with the current Membership structure in Umbraco. This means that this is not using EntityFramework to access data, it uses the Umbraco member services and providers using custom ASP.Net Identity user stores. This also means that the password formats are based on the current password formats of the membership provider. When the Nuget package is installed it will actually swap out the membership provider for a custom type: &lt;em&gt;UmbracoIdentity.IdentityEnabledMembersMembershipProvider. &lt;/em&gt;This is required so that the password security can still be handled by the membership provider logic.&lt;/p&gt;
&lt;p&gt;There is a &lt;a rel="noopener" href="https://github.com/Shandem/UmbracoIdentity/wiki/Known-Issues#passwords" target="_blank"&gt;note about passwords here&lt;/a&gt;, ASP.Net Identity normally will format and salt passwords different (slightly better) than how the membership providers current work, but if you need that functionality you’d have to implement your own &lt;em&gt;IPasswordHasher&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;It is absolutely essential you read &lt;/span&gt;&lt;/strong&gt;&lt;a rel="noopener" href="https://github.com/Shandem/UmbracoIdentity" target="_blank"&gt;&lt;strong&gt;the documentation&lt;/strong&gt;&lt;/a&gt; before installing. Once you’ve done that, you can use Nuget:&lt;/p&gt;
&lt;div class="nuget-badge"&gt;
&lt;p&gt;PM&amp;gt; Install-Package UmbracoIdentity&lt;/p&gt;
&lt;/div&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:15 Z</pubDate>
      <a10:updated>2023-03-23T15:08:15Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1278</guid>
      <link>https://shazwazza.com/post/configuring-aspnet-identity-oauth-login-providers-for-multi-tenancy/</link>
      <category>ASP.Net</category>
      <title>Configuring ASP.Net Identity OAuth login providers for multi-tenancy</title>
      <description>&lt;p&gt;Say for example you have a CMS :) You want to give full control to the developer to manage how their front-end members with authenticate, which could of course include ASP.Net Identity OAuth login providers. At the same time you want to easily allow your CMS to be configured so that ASP.Net Identity OAuth providers can be used for logging into the back office.&amp;nbsp; In this scenario, the same OAuth provider might be used for both front-end and back-office authentication but authenticated under 2 different OAuth accounts. Another example might be if you have multi-tenancy set up for your front-end site and perhaps you want to use the same OAuth login provider but have members authenticate with different OAuth accounts for different domain names. &lt;/p&gt; &lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;  &lt;h2&gt;The defaults&lt;/h2&gt; &lt;p&gt;As an example, lets assume that front-end members are configured to authenticate with the ASP.Net Identity Google OAuth2 provider. This is easily done by just following one of the many tutorials out there. Your startup code might look like:&lt;/p&gt;&lt;pre class="csharpcode"&gt;app.UseCookieAuthentication(&lt;span class="kwrd"&gt;new&lt;/span&gt; CookieAuthenticationOptions ....

app.UseExternalSignInCookie();

app.UseGoogleAuthentication(
              clientId: &lt;span class="str"&gt;"123456789..."&lt;/span&gt;,
              clientSecret: &lt;span class="str"&gt;"987654321...."&lt;/span&gt;);&lt;/pre&gt;
&lt;p&gt;Great, but I need 2 (or more) Google OAuth2 providers, so what now? I can’t just add 2 declarations of:&lt;/p&gt;&lt;pre class="csharpcode"&gt;app.UseGoogleAuthentication(
              clientId: &lt;span class="str"&gt;"123456789..."&lt;/span&gt;,
              clientSecret: &lt;span class="str"&gt;"987654321...."&lt;/span&gt;);

app.UseGoogleAuthentication(
              clientId: &lt;span class="str"&gt;"abcdef..."&lt;/span&gt;,
              clientSecret: &lt;span class="str"&gt;"zyxwv...."&lt;/span&gt;);&lt;/pre&gt;
&lt;p&gt;you’ll quickly realize that doesn’t work and only one provider instance will actually be used. This is because of the default underlying settings that get used to instantiate the Google provider. Let’s have a look at what the default options are in this case. The above code is equivalent to this:&lt;/p&gt;&lt;pre class="csharpcode"&gt;app.UseGoogleAuthentication(&lt;span class="kwrd"&gt;new&lt;/span&gt; GoogleOAuth2AuthenticationOptions
{
    AuthenticationType = &lt;span class="str"&gt;"Google"&lt;/span&gt;,
    ClientId = &lt;span class="str"&gt;"123456789..."&lt;/span&gt;,
    ClientSecret = &lt;span class="str"&gt;"987654321...."&lt;/span&gt;,
    Caption = &lt;span class="str"&gt;"Google"&lt;/span&gt;,
    CallbackPath = &lt;span class="kwrd"&gt;new&lt;/span&gt; PathString(&lt;span class="str"&gt;"/signin-google"&lt;/span&gt;),
    AuthenticationMode = AuthenticationMode.Passive,
    SignInAsAuthenticationType = app.GetDefaultSignInAsAuthenticationType(),
    BackchannelTimeout = TimeSpan.FromSeconds(60),
    BackchannelHttpHandler = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.Net.Http.WebRequestHandler(),
    BackchannelCertificateValidator = &lt;span class="kwrd"&gt;null&lt;/span&gt;,
    Provider = &lt;span class="kwrd"&gt;new&lt;/span&gt; GoogleOAuth2AuthenticationProvider()
});&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;h2&gt;The AuthenticationType&lt;/h2&gt;
&lt;p&gt;One very important aspect of the default settings is the &lt;em&gt;AuthenticationType&lt;/em&gt;. This is a &lt;strong&gt;unique &lt;/strong&gt;identifier for the provider instance and this is one of the reasons why if you have 2 x &lt;em&gt;UseGoogleAuthentication&lt;/em&gt; declarations with the defaults only one will ever be used.&lt;/p&gt;
&lt;p&gt;Knowing this, it’s clear that each declaration of &lt;em&gt;UseGoogleAuthentication&lt;/em&gt; needs to specify custom options and have the &lt;em&gt;AuthenticationType&lt;/em&gt; unique amongst them. So we might end up with something like:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;//keep defaults for front-end&lt;/span&gt;
app.UseGoogleAuthentication(
    clientId: &lt;span class="str"&gt;"123456789..."&lt;/span&gt;,
    clientSecret: &lt;span class="str"&gt;"987654321...."&lt;/span&gt;);

&lt;span class="rem"&gt;//custom options for back-office&lt;/span&gt;
app.UseGoogleAuthentication(&lt;span class="kwrd"&gt;new&lt;/span&gt; GoogleOAuth2AuthenticationOptions
{
    AuthenticationType = &lt;span class="str"&gt;"GoogleBackOffice"&lt;/span&gt;,
    ClientId = &lt;span class="str"&gt;"abcdef..."&lt;/span&gt;,
    ClientSecret = &lt;span class="str"&gt;"zyxwv...."&lt;/span&gt;    
});&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;If you test this now, you’ll find out that only the first declaration is actually working even when you explicitly tell &lt;em&gt;IOwinContext.Authentication.Challenge&lt;/em&gt; to use the “GoogleBackOffice” provider.&lt;/p&gt;
&lt;h2&gt;The CallbackPath&lt;/h2&gt;
&lt;p&gt;The reason that the default (first) declaration is the one that activates is because the response from Google is sending the request to the path: “/signin-google”, which is the default. The &lt;em&gt;GoogleAuthenticationMiddleware &lt;/em&gt;will delegate to the &lt;em&gt;GoogleAuthenticationHandler &lt;/em&gt;for each request and inspect the request to see if it should execute. For this logic it checks: &lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (Options.CallbackPath.HasValue &amp;amp;&amp;amp; Options.CallbackPath == Request.Path)
{
     &lt;span class="rem"&gt;//If the path matches, auth the request...&lt;/span&gt;
}&lt;/pre&gt;
&lt;p&gt;Since the &lt;em&gt;CallbackPath&lt;/em&gt; will be the same by default on both above declarations, the first one that is registered will match and the other registered authenticators will be ignored. To fix this we’ll need to update the path that Google sends back and then update the second declaration to match that path. &lt;/p&gt;
&lt;p&gt;To tell Google to send the request back on a different path, in your Google Developers Console change the REDIRECT URIS value for the second provider:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://shazwazza.com/media/articulate/windows-live-writer-connet-identity-oauth-login-providers-f_a1ef-image_thumb_2.png"&gt;&lt;img title="image_thumb" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image_thumb" src="http://shazwazza.com/media/articulate/windows-live-writer-connet-identity-oauth-login-providers-f_a1ef-image_thumb_thumb.png" width="244" height="216"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then we need to update the 2nd declaration with the custom &lt;em&gt;CallbackPath&lt;/em&gt; so that it matches and activates properly:&lt;/p&gt;&lt;pre class="csharpcode"&gt;app.UseGoogleAuthentication(&lt;span class="kwrd"&gt;new&lt;/span&gt; GoogleOAuth2AuthenticationOptions
{
    AuthenticationType = &lt;span class="str"&gt;"GoogleBackOffice"&lt;/span&gt;,
    ClientId = &lt;span class="str"&gt;"abcdef..."&lt;/span&gt;,
    ClientSecret = &lt;span class="str"&gt;"zyxwv...."&lt;/span&gt;,
    CallbackPath = &lt;span class="kwrd"&gt;new&lt;/span&gt; PathString(&lt;span class="str"&gt;"/custom-signin-google"&lt;/span&gt;)
});&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;Hooray, now it should work!&lt;/p&gt;
&lt;p&gt;This concept is the same for most external login providers. For example for the Facebook one the default value is “/signin-facebook”, you’d need to configure Facebook’s “Valid OAuth redirect URIs” property with the correct callback path in Facebook’s developer portal:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://shazwazza.com/media/articulate/windows-live-writer-connet-identity-oauth-login-providers-f_a1ef-image_thumb1_2.png"&gt;&lt;img title="image_thumb1" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image_thumb1" src="http://shazwazza.com/media/articulate/windows-live-writer-connet-identity-oauth-login-providers-f_a1ef-image_thumb1_thumb.png" width="184" height="244"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;What is SignInAsAuthenticationType?&lt;/h2&gt;
&lt;p&gt;The last thing to point out is that by default the &lt;em&gt;SignInAsAuthenticationType &lt;/em&gt;for each provider will resolve to: &lt;em&gt;app.GetDefaultSignInAsAuthenticationType()&lt;/em&gt;, which by default is: &lt;em&gt;DefaultAuthenticationTypes.ExternalCookie&lt;/em&gt;&amp;nbsp; = “ExternalCookie”. Each OAuth provider is linked to another middleware that is responsible for actually issuing a user’s ClaimsIdentity, so by default this will be “ExternalCookie”. In some cases you won’t want the default external cookie authentication middleware to assign the ClaimsIdentity for your OAuth provider, you might need to issue a different ClaimsIdentity or just have more granular control over what happens with the callback for each OAuth provider. In this case you’ll need to specify another custom cookie authentication declaration, for example:&lt;/p&gt;&lt;pre class="csharpcode"&gt;app.UseCookieAuthentication(&lt;span class="kwrd"&gt;new&lt;/span&gt; CookieAuthenticationOptions
{
    AuthenticationType = &lt;span class="str"&gt;"CustomExternal"&lt;/span&gt;,
    AuthenticationMode = AuthenticationMode.Passive,
    CookieName = &lt;span class="str"&gt;"MyAwesomeCookie"&lt;/span&gt;,
    ExpireTimeSpan = TimeSpan.FromMinutes(5),
    &lt;span class="rem"&gt;//Additional custom cookie options....&lt;/span&gt;
});&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;And then you can link that up to your OAuth declaration like:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;//custom options for back-office&lt;/span&gt;
app.UseGoogleAuthentication(&lt;span class="kwrd"&gt;new&lt;/span&gt; GoogleOAuth2AuthenticationOptions
{
    AuthenticationType = &lt;span class="str"&gt;"GoogleBackOffice"&lt;/span&gt;,
    ClientId = &lt;span class="str"&gt;"abcdef..."&lt;/span&gt;,
    ClientSecret = &lt;span class="str"&gt;"zyxwv...."&lt;/span&gt;,
    SignInAsAuthenticationType = &lt;span class="str"&gt;"CustomExternal"&lt;/span&gt;
});&lt;/pre&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:15 Z</pubDate>
      <a10:updated>2023-03-23T15:08:15Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1293</guid>
      <link>https://shazwazza.com/post/aspnet-5-re-learning-a-few-things-part-1/</link>
      <category>ASP.Net</category>
      <title>ASP.Net 5 - Re-learning a few things (part 1)</title>
      <description>&lt;p&gt;&lt;a href="http://www.asp.net/vnext/overview/aspnet-vnext/aspnet-5-overview" target="_blank"&gt;ASP.Net 5&lt;/a&gt; (aka vNext) is now in Beta and the &lt;a href="http://www.visualstudio.com/en-us/news/vs2015-preview-vs" target="_blank"&gt;Visual Studio 2015 preview&lt;/a&gt; is now out! So, &lt;a href="http://www.asp.net/vnext/overview/aspnet-vnext/aspnet-5-overview" target="_blank"&gt;what is this new ASP.Net&lt;/a&gt;? The 2 biggest features is that it’s &lt;a href="https://github.com/aspnet" target="_blank"&gt;totally open source&lt;/a&gt; and it will support a cross platform runtime = great!! But it’s worth knowing that this is more or less a rebuild of ASP.Net and there’s quite a few things that we’ve become accustomed to that will now be totally different.&lt;/p&gt; &lt;h2&gt;Configuration files&lt;/h2&gt; &lt;p&gt;You know all of that junk in the web.config and perhaps in a bunch of other *.config files? Well that is gone! I think this is wonderful news because creating those configuration sections was a huge pain. Even better news is how easy creating custom configuration inputs will be in&amp;nbsp; ASP.Net 5 using the new &lt;u&gt;&lt;em&gt;&lt;a href="https://github.com/aspnet/Configuration/blob/dev/src/Microsoft.Framework.ConfigurationModel/IConfiguration.cs" target="_blank"&gt;IConfiguration&lt;/a&gt; &lt;/em&gt;&lt;/u&gt;and &lt;em&gt;ConfigurationModel &lt;/em&gt;sources&lt;em&gt;. &lt;/em&gt;OOTB Microsoft is releasing support for JSON, XML and INI files for configuration but of course you can easily create your own.&amp;nbsp; The repository for the configuration bits is &lt;a href="https://github.com/aspnet/Configuration" target="_blank"&gt;here&lt;/a&gt; and a nice tutorial can be found &lt;a href="http://whereslou.com/2014/05/23/asp-net-vnext-moving-parts-iconfiguration/" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;So what about configuration transforms?? That is also a thing of the past. In ASP.Net 5, “configuration” will mostly be done with code found in your Startup.cs file, anything that you want to enable in your application is done in this class. Any package that is installed in your app, you will need to opt-in to use it in your Startup.cs file. In some cases however, a configuration file might need to be updated/transformed… this could be due to an upgrade of a package. The good news is that the configuration sources in ASP.Net 5 are writable (&lt;em&gt;&lt;a href="https://github.com/aspnet/Configuration/blob/dev/src/Microsoft.Framework.ConfigurationModel/Sources/IConfigurationSource.cs#L15" target="_blank"&gt;IConfigurationSource&lt;/a&gt;&lt;/em&gt;) which means during startup or first access to your config, you could detect what needs to be updated to support your new version, make the updates in code and commit (&lt;em&gt;&lt;a href="https://github.com/aspnet/Configuration/blob/dev/src/Microsoft.Framework.ConfigurationModel/Sources/ICommitableConfigurationSource.cs" target="_blank"&gt;ICommitableConfigurationSource&lt;/a&gt;&lt;/em&gt;) the changes.&lt;/p&gt; &lt;p&gt;Wait… isn’t that going to restart the app domain??&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;font size="2"&gt;NOTE: If you are using IIS, there can still be a web.config which can be used to configure IIS settings under the system.webserver section.&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; &lt;h2&gt;AppDomain restarts&lt;/h2&gt; &lt;p&gt;This is something that we’ve all become familiar with… you want to restart your app, just bump/touch the web.config and your app domain is restarted. This is something we’ll all have to un-learn. In ASP.Net 5 auto app domain restarts don’t happen. First, there is no web.config (or global.asax for that matter) so there are no files to bump/touch. Next, a big reason why auto app domain restarts can’t occur is because ASP.Net 5 will be able to be run on various different web servers which don’t really know about what it means to restart an app domain. For example if you’ve been playing around with vNext before you had a chance to use VS 2015, you might be familiar with the command line &lt;em&gt;“k web” &lt;/em&gt;&lt;a href="https://github.com/aspnet/Home#running-the-samples" target="_blank"&gt;(see docs for details)&lt;/a&gt;. This command will start up a simple web server: &lt;em&gt;Microsoft.AspNet.Server.WebListener&lt;/em&gt; which will serve web requests. In order for app domain restarts to occur, it would need to know how to restart itself after it’s been shutdown which isn’t exactly possible with a simple command line process. Instead if you made any changes to your code and wanted to restart your app, you’d kill the process (ctrl + c) and just call &lt;em&gt;k web&lt;/em&gt; again. Another thing to be aware of is that when you kill a process like this, your app domain does not gracefully shutdown/unwind, it’s simply terminated.&lt;/p&gt; &lt;p&gt;But not to worry! If you have a web app that requires restarting (i.e. maybe it installs plugins, etc…) and needs to gracefully unwind, it’s still possible and actually much more pleasant since you’ll be in full control of how/when it happens. In order for this to work you’ll need to be running a web server that knows how to start itself back up again - like IIS! The way to gracefully shutdown your app domain is by using: &lt;a href="https://github.com/aspnet/KRuntime/blob/dev/src/Microsoft.Framework.Runtime.Interfaces/IApplicationShutdown.cs" target="_blank"&gt;&lt;em&gt;IApplicationShutdown&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;when you want to gracefully shutdown your app. You could even use that in combination with an &lt;a href="https://github.com/aspnet/KRuntime/blob/dev/src/Microsoft.Framework.Runtime.Interfaces/IFileWatcher.cs" target="_blank"&gt;&lt;em&gt;IFileWatcher&lt;/em&gt;&lt;/a&gt; and your own configuration files&lt;em&gt;&amp;nbsp;&lt;/em&gt;… if you really wanted to mimic an app domain restart by bumping/touching a file.&lt;/p&gt; &lt;h2&gt;Deployments, bin folder and App_Code&lt;/h2&gt; &lt;p&gt;Speaking of app domain restarts, how will ASP.Net 5 work when I put a new assembly in the /bin folder or add a new class to App_Code?? These are a couple more things that need to be un-learned. There really isn’t a /bin folder anymore (well, there is but it only contains one very special assembly if you are running IIS) and there isn’t any App_Code folder.&amp;nbsp; So where does all of this go? &lt;/p&gt; &lt;p&gt;When you publish a web project in VS 2015 (which uses &lt;em&gt;kpm pack) &lt;/em&gt;you end up with a very different looking deployment structure. There’s two folder: &lt;em&gt;approot&lt;/em&gt; and &lt;em&gt;wwwroot&lt;/em&gt;. &lt;/p&gt; &lt;p&gt;&lt;em&gt;wwwroot &lt;/em&gt;– is the content of your website, nothing more. Even things like configuration files don’t exist here, it’s just content that your webserver can serve. &lt;/p&gt; &lt;p&gt;&lt;em&gt;approot&lt;/em&gt; – this is the brains of your website. It includes all of the binaries, config files, source code, etc… that is used to run your website.&lt;/p&gt; &lt;p&gt;&lt;a href="http://weblogs.asp.net/imranbaloch/aspnet-vnext-folder-structure" target="_blank"&gt;Here’s a blog post that describes the deployed file structure&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Did you say source code?? Yup! By default kpm pack will deploy your site with all of it’s packages and the source code for all of your projects. The &lt;a href="http://msdn.microsoft.com/en-au/vstudio/roslyn.aspx" target="_blank"&gt;Roslyn compiler&lt;/a&gt; will take care of everything for you when your site needs to start serving requests. You can of course opt-out of this and have your site deployed as a compiled package.&lt;/p&gt; &lt;p&gt;Did you say Package?? Yup, as in Nuget package! Instead of a /bin folder full of assemblies, all of your dependencies will actually be Nuget references and stored in &lt;em&gt;approot/packages &lt;/em&gt;and if you choose to deploy your website without source, it will be compiled into a Nuget package and deployed in the packages folder as well.&lt;/p&gt; &lt;h2&gt;More to come….&lt;/h2&gt; &lt;p&gt;So there’s a a few of the things that are pretty different in ASP.Net 5, there’s still more to come and hopefully I’ll find some time to write them all up!&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:15 Z</pubDate>
      <a10:updated>2023-03-23T15:08:15Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1324</guid>
      <link>https://shazwazza.com/post/clientdependency-18-released/</link>
      <category>Client Dependency</category>
      <title>ClientDependency 1.8 released</title>
      <description>&lt;p&gt;It’s taken me forever to get this release out purely due to not having enough time, but here it finally is. This update now multi-targets framework versions:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Core project now targets both .Net 4 and 4.5  &lt;li&gt;MVC project is now targets both .Net 4 and 4.5 for MVC 4 and .Net 4.5 for MVC 5&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;There are also a couple of minor bug fixes:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a title="https://github.com/Shandem/ClientDependency/issues/33" href="https://github.com/Shandem/ClientDependency/issues/33"&gt;https://github.com/Shandem/ClientDependency/issues/33&lt;/a&gt;  &lt;li&gt;&lt;a title="https://github.com/Shandem/ClientDependency/issues/34" href="https://github.com/Shandem/ClientDependency/issues/34"&gt;https://github.com/Shandem/ClientDependency/issues/34&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The update to the CDF .Less project is the update to use the latest .Less 1.4.0.0 version.&lt;/p&gt; &lt;p&gt;To install the CDF core:&lt;/p&gt; &lt;style&gt;
.nuget-badge code {
background-color: #202020;
border: 4px solid silver;
border-bottom-left-radius: 5px 5px;
border-bottom-right-radius: 5px 5px;
border-top-left-radius: 5px 5px;
border-top-right-radius: 5px 5px;
color: #e2e2e2;
display: block;
font: normal normal normal 1.5em/normal 'andale mono', 'lucida console', monospace;
line-height: 1.5em;
overflow: auto;
padding: 15px;
}
&lt;/style&gt;  &lt;div class="nuget-badge"&gt; &lt;p&gt;&lt;code&gt;PM&amp;gt; Install-Package ClientDependency&lt;/code&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;To install CDF for MVC (less than v5):&lt;/p&gt; &lt;div class="nuget-badge"&gt; &lt;p&gt;&lt;code&gt;PM&amp;gt; Install-Package ClientDependency-MVC &lt;/code&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;If you are using MVC 5 then you’ll need to use the MVC 5 specific version:&lt;/p&gt; &lt;div class="nuget-badge"&gt; &lt;p&gt;&lt;code&gt;PM&amp;gt; Install-Package ClientDependency-MVC5 &lt;/code&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;To install the .Less update:&lt;/p&gt; &lt;div class="nuget-badge"&gt; &lt;p&gt;&lt;code&gt;PM&amp;gt; Install-Package ClientDependency-Less &lt;/code&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;Remember CDF also supports TypeScript, CoffeeScript and SASS!&lt;/p&gt; &lt;div class="nuget-badge"&gt; &lt;p&gt;&lt;code&gt;PM&amp;gt; Install-Package ClientDependency-TypeScript &lt;/code&gt;&lt;/p&gt;&lt;/div&gt; &lt;div class="nuget-badge"&gt; &lt;p&gt;&lt;code&gt;PM&amp;gt; Install-Package ClientDependency-CoffeeScript &lt;/code&gt;&lt;/p&gt;&lt;/div&gt; &lt;div class="nuget-badge"&gt; &lt;p&gt;&lt;code&gt;PM&amp;gt; Install-Package ClientDependency-SASS &lt;/code&gt;&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:15 Z</pubDate>
      <a10:updated>2023-03-23T15:08:15Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1298</guid>
      <link>https://shazwazza.com/post/examine-rc2-posted/</link>
      <category>Examine</category>
      <title>Examine RC2 posted</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;I’ve just released Examine RC2 into the while, you can &lt;a href="http://examine.codeplex.com/releases/view/43765" target="_blank"&gt;&lt;font size="6"&gt;download&lt;/font&gt;&lt;/a&gt; it from our &lt;a href="http://examine.codeplex.com" target="_blank"&gt;CodePlex&lt;/a&gt; site.  &lt;p&gt;RC2 fixes a bug in RC1 which wasn’t indexing user fields, only attribute fields.&lt;/p&gt; &lt;p&gt;There’s a few breaking changes with RC2:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;IQuery.MultipleFields has been removed. Use IQuery.GroupedAnd, IQuery.GroupedOr, IQuery.GroupedNot or IQuery.GroupedFlexible to define how multiple fields are added  &lt;li&gt;ISearchCriteria.RawQuery added which allows you to pass a raw query string to the underlying provider  &lt;li&gt;ISearcher.Search returns a new interface ISearchResults (which inherits IEnumerable&amp;lt;SearchResult&amp;gt;)  &lt;li&gt;New interface ISearchResults which exposes a Skip to support paging and TotalItemCount &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Will be working on more documentation to explain some of the newly added and obscure features shortly :P.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1315</guid>
      <link>https://shazwazza.com/post/why-snapshot/</link>
      <category>Umbraco</category>
      <title>Why Snapshot?</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;In my &lt;a href="http://farmcode.org/post/2010/05/18/Introducing-Snapshot.aspx" target="_blank"&gt;previous post&lt;/a&gt; I introduced a new tool we’re working on here at TheFARM called Snapshot which is a content export engine for Umbraco.  &lt;p&gt;When doing that post I knew that I was going to have to write this one anyway, people were inevitably going to ask “But why?”&lt;/p&gt; &lt;p&gt;I was hoping to have time to do it before anyone did, but alas I was wrong :P.&lt;/p&gt; &lt;p&gt;Here’s a few scenarios which Snapshot aims to be useful in.&lt;/p&gt; &lt;h3&gt;The “We Don’t Need a CMS” client&lt;/h3&gt; &lt;p&gt;We’ve all had these, it’s “just a small site”, “we don’t change content”, etc. But in the back of your mind you &lt;em&gt;know&lt;/em&gt; they will change content and if it’s a static site you’ll have to get the devs to do it. Well with Snapshot you can create a CMS but the client doesn’t have to know.&lt;/p&gt; &lt;h3&gt;Shared hosting, virtual folders and medium trust&lt;/h3&gt; &lt;p&gt;Yes Umbraco can run in Shared Hosting, yes with 4.1 it can run in a virtual folder and medium trust. But 4.1 isn’t out yet. So you could look at the medium trust patch for 4.0.3, but you may not be comfortable with running a custom version of Umbraco, it does mean that upgrades are off the table.&lt;/p&gt; &lt;p&gt;Since Snapshot generates an ASP.NET site from within itself there’s no need to worry about Umbraco restrictions like that, it comes down to how you’ve coded your site.&lt;/p&gt; &lt;h3&gt;Database-less websites&lt;/h3&gt; &lt;p&gt;Not every website needs a database, but unfortunately Umbraco requires one even when you’re not editing content. You may not be aware but when you work with the Media API (either via the umbraco.library methods, or though the Media classes) you are going into the database. Yes there are projects which simulate a media cache you can even do this with &lt;a href="http://examine.codeplex.com" target="_blank"&gt;Examine&lt;/a&gt;. &lt;br&gt;But you’ll still have to have your web server talking to a database.&lt;/p&gt; &lt;p&gt;Snapshot doesn’t require a database form the web server. We’ve got built-in Media caching, a Media API and even replace the umbraco.library XSLT methods so that the Media interaction in an XSLT doesn’t require a database!&lt;/p&gt; &lt;h3&gt;Security&lt;/h3&gt; &lt;p&gt;Umbraco is reasonably secure, but wherever you have a login you have a vulnerability, it’s just the way of the web. A Snapshot site &lt;em&gt;has no login&lt;/em&gt;, &lt;em&gt;has no database&lt;/em&gt;, thus it is more secure (yes yes, famous last words :P). With Snapshot you can put your CMS inside your DMZ and never have it expose itself to the outside world. You can then get Snapshot to generate a site from the CMS and you just deployed the generated files.&lt;/p&gt; &lt;h3&gt;Speed&lt;/h3&gt; &lt;p&gt;As fast as Umbraco is (and the backed just &lt;a href="http://farmcode.org/post/2010/04/15/Umbraco-41-Benchmarks-Part-1.aspx" target="_blank"&gt;got&lt;/a&gt; &lt;a href="http://farmcode.org/post/2010/04/28/Umbraco-41-Benchmarks-Part-2-e28093-Back-Office-Database-Queries.aspx" target="_blank"&gt;faster&lt;/a&gt;) there’s always room for improvement. When writing Snapshot we came across several places which were not as good as they could have been within the Umbraco API. Take umbraco.library for example. You interact with static methods on the type in XSLT, but for every XSLT macro an instance of the class is created. This means that it can’t really have request-level caching of what you’re interacting with. &lt;br&gt;Or take NodeFactory, it doesn’t have caching of the node(s) you’ve tried to access; you get a new instance each time.&lt;/p&gt; &lt;p&gt;&lt;em&gt;Now I’m not having a go at Umbraco’s API on this, just pointing out some facts.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;In Snapshot we have much improved caching. Since we’re using Dependency Injection (via &lt;a href="http://code.google.com/p/autofac/" target="_blank"&gt;Autofac&lt;/a&gt;) we only create a single instance of our umbraco.library implementation, we also do the same for our ContentService (the NodeFactory replacement) and MediaService (media API replacement). &lt;br&gt;These have caching built into them as well, so you hardly ever create objects, you get back previously created ones.&lt;/p&gt; &lt;p&gt;In future posts we’ll look more into the new API’s and just how sexy they can be ;).&lt;/p&gt; &lt;h3&gt;Because we can&lt;/h3&gt; &lt;p&gt;Really, does there need to be any reason other than this! :P&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Hopefully this gives some insight into what we’re trying to achieve and shows you how it could be viable in your scenarios. Keep in mind this isn’t all you can do with Snapshot, it’s just some of the most common reasons &lt;strong&gt;why&lt;/strong&gt;.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1323</guid>
      <link>https://shazwazza.com/post/using-an-iphone-with-the-visual-studio-development-server-charles/</link>
      <category>Web Development</category>
      <title>Using an iPhone with the Visual Studio development server &amp; Charles</title>
      <description>&lt;p&gt;&lt;a href="http://encosia.com"&gt;Dave Ward&lt;/a&gt; did a good post recently on how to use the &lt;a href="http://encosia.com/2010/06/10/using-an-iphone-with-the-visual-studio-development-server/"&gt;Visual Studio development server from a mobile devise such as an iPhone&lt;/a&gt;. But there’s a problem for us here, we use &lt;a href="http://www.charlesproxy.com/"&gt;Charles&lt;/a&gt; which I have found to be a better than Fiddler (it’s also cross-platform so I can use it both on my Mac and Windows machines).&lt;/p&gt; &lt;p&gt;So after reading Dave’s post I decided to have a look at how to do it if you’re using Charles, and well it’s pretty darn simple.&lt;/p&gt; &lt;p&gt;I’d suggest that you read Dave’s post first as I’m going to assume that you have, I’m just going to point out what you need to do different for Charles.&lt;/p&gt; &lt;h2&gt;Charles Configuration&lt;/h2&gt; &lt;p&gt;The first thing you need to do is find out on what port Charles is running on, by default Charles is on port &lt;strong&gt;8888&lt;/strong&gt;, but you can find the settings under &lt;em&gt;Proxy &amp;gt; Proxy Settings&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="/image.axd?picture=charles-proxy-config.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="charles-proxy-config" border="0" alt="charles-proxy-config" src="/image.axd?picture=charles-proxy-config_thumb.png" width="573" height="531"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Next we need to configure the external access to the HTTP Proxy that Charles is running. This is something that Charles handles differently to Fiddler, it’s actually a lot more configurable as you can define individual IP’s or IP ranges for access.&lt;/p&gt; &lt;p&gt;To do this you need to navigate to &lt;em&gt;Proxy &amp;gt; Access Control Settings&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="/image.axd?picture=charles-access-control.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="charles-access-control" border="0" alt="charles-access-control" src="/image.axd?picture=charles-access-control_thumb.png" width="559" height="517"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Then you just need to click &lt;strong&gt;Add&lt;/strong&gt; and enter the IP (or range) which you want to allow access to. I’ve just allowed access to the IP of my iPhone, which is &lt;strong&gt;192.168.1.44&lt;/strong&gt;. &lt;/p&gt; &lt;h2&gt;&lt;/h2&gt;  &lt;h2&gt;Conclusion&lt;/h2&gt; &lt;p&gt;The rest of Dave’s post is all you need to get this working, you connect to your computer from your external device in just the same way.&lt;/p&gt; &lt;p&gt;Hopefully this helps you out if you’re not a Fiddler user but want to be able to use a mobile device with Visual Studio’s development server.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1276</guid>
      <link>https://shazwazza.com/post/more-on-umbraco-tinymce-and-flash/</link>
      <category>Umbraco</category>
      <title>More on Umbraco, TinyMCE and Flash</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;In a previous post &lt;a href="http://farmcode.org/post/2010/01/07/Umbraco-TinyMCE-Customization-for-Flash-Rich-Text.aspx" target="_blank"&gt;Shannon explained how to customise TinyMCE for what HTML elements Flash actually supports&lt;/a&gt;, and he finished off the post with showing how to cleanup line breaks.&lt;/p&gt;  &lt;p&gt;To do this he used an XSLT function called &lt;strong&gt;&lt;em&gt;normalize-space&lt;/em&gt;&lt;/strong&gt;, which is great &lt;em&gt;if you’re using XSLT!&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I was writing a service today which was using LINQ to XML to generate the XML for Flash, but that posed a problem, how do you deal with Flash wanting to do hard breaks on new line constants?&lt;/p&gt;  &lt;p&gt;Easy, &lt;a href="http://msdn.microsoft.com/en-us/library/system.string.replace.aspx" target="_blank"&gt;string.Replace&lt;/a&gt; to the rescue!&lt;/p&gt;  &lt;p&gt;Here’s a handy little extension method you can drop into your code libraries:&lt;/p&gt;  &lt;pre&gt;public static string NormalizeSpace(this string s) {
	if(s == null) throw new ArgumentNullException(&amp;quot;s&amp;quot;);
	return s.Replace(&amp;quot;\r\n&amp;quot;, string.Empty)
		.Replace(&amp;quot;\r&amp;quot;, string.Empty)
		.Replace(&amp;quot;\n&amp;quot;, string.Empty);
}&lt;/pre&gt;

&lt;p&gt;Nice and easy (and unsurprisingly logical!).&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1282</guid>
      <link>https://shazwazza.com/post/examine-s-fluent-search-api/</link>
      <category>Examine</category>
      <title>Examine’s fluent search API</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;As I mentioned in my last blog post we’ve done a lot of work to refactor Examine (and Umbraco Examine) to use a fluent search API rather than a string based search API.&lt;/p&gt;  &lt;p&gt;The primary reason for this was to do with how we were handling the string searching and opening up the Lucene.Net search API. In the initial preview version we would take the text which you entered as a search term and then produce a Lucene.Net search against &lt;em&gt;all the fields in your index&lt;/em&gt;. This is &lt;em&gt;ok&lt;/em&gt;, but it’s not great. The problem came when we wanted to implement a dynamic search query. There were several different search parameters, which were to check against different fields in the index.     &lt;br /&gt;It was sort of possible to achieve this, but you needed to understand the internals of Examine and you also needed to understand the Lucene query language, and also that you couldn’t use the AND/ OR/ NOT operators, you had to use +, – or blank.&lt;/p&gt;  &lt;p&gt;This is fine if you’re into search API’s, but really, how many people are actually like that? Ok, I must admit that I’m rather smitten with Lucene but I’m not exactly a good example of a normal person..&lt;/p&gt;  &lt;p&gt;So I set about addressing this problem, we needed to get a much simpler way in which your &lt;em&gt;average Joe&lt;/em&gt; could come and without knowing the underlying technology write complex and useful search queries.     &lt;br /&gt;For this we’ve build a set of interfaces which you require:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;ISearchCriteria &lt;/li&gt;    &lt;li&gt;IQuery &lt;/li&gt;    &lt;li&gt;IBooleanOperation &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;ISearchCriteria&lt;/h3&gt;  &lt;p&gt;The ISearchCriteria interface is the real workhorse of the API, it’s the first interface you start with, and it’s the last interface you deal with. In fact, ISearchCriteria implements IQuery, meaning that all the query operations start here.&lt;/p&gt;  &lt;p&gt;In addition to query operations there are several additional properties for such as the maximum number of results and the type of data being searched.&lt;/p&gt;  &lt;p&gt;Because ISearchCriteria is tightly coupled with the BaseSearchProvider implementation it is actually created via a factory pattern, like so:&lt;/p&gt;  &lt;pre&gt;ISearchCriteria searchCriteria = ExamineManager.Instance.SearchProviderCollection[&amp;quot;MySearcher&amp;quot;].CreateSearchCriteria(100, IndexType.Content);&lt;/pre&gt;

&lt;p&gt;What we’re doing here is requesting that our BaseSearchProvider creates an instance of an ISearchCriteria. It takes two parameters:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;int maxResults &lt;/li&gt;

  &lt;li&gt;Examine.IndexType indexType &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This data can/ should be then used by the search method to return what’s required.&lt;/p&gt;

&lt;h3&gt;IQuery&lt;/h3&gt;

&lt;p&gt;The IQuery interface is really the heart of the fluent API, it’s what you use to construct the search for your site. Since Examine is designed to be technology agnostic the methods which are exposed via IQuery are fairly generic. A lot of the concepts are borrowed from Lucene.Net, but they are fairly generic and should be viable for any searcher.&lt;/p&gt;

&lt;p&gt;The IQuery API exposes the following methods:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;IBooleanOperation Id(int id); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation NodeName(string nodeName); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation NodeName(IExamineValue nodeName); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation NodeTypeAlias(string nodeTypeAlias); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation NodeTypeAlias(IExamineValue nodeTypeAlias); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation ParentId(int id); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation Field(string fieldName, string fieldValue); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation Field(string fieldName, IExamineValue fieldValue); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation MultipleFields(IEnumerable&amp;lt;string&amp;gt; fieldNames, string fieldValue); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation MultipleFields(IEnumerable&amp;lt;string&amp;gt; fieldNames, IExamineValue fieldValue); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation Range(string fieldName, DateTime start, DateTime end); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation Range(string fieldName, DateTime start, DateTime end, bool includeLower, bool includeUpper); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation Range(string fieldName, int start, int end); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation Range(string fieldName, int start, int end, bool includeLower, bool includeUpper); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation Range(string fieldName, string start, string end); &lt;/li&gt;

  &lt;li&gt;IBooleanOperation Range(string fieldName, string start, string end, bool includeLower, bool includeUpper); &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you can see all the methods within the IQuery interface return an IBooleanOperator, this is how the fluent API works!&lt;/p&gt;

&lt;p&gt;Hopefully it’s fairly obvious what each of the methods are, but the one you’re most likely to use is Field. Field allows you to specify any field in your index, and then provide a word to lookup within that field.&lt;/p&gt;

&lt;h4&gt;IExamineValue&lt;/h4&gt;

&lt;p&gt;You’ve probably noticed the IExamineValue parameter which is passable to a lot of the different methods, methods which take a string, but what is IExamineValue? 
  &lt;br /&gt;Well obviously it’s some-what provider dependant, so I’ll talk about it as part of Umbraco Examine, as that’s what I think most initial uptakers will want.&lt;/p&gt;

&lt;p&gt;Because Lucene supports several different &lt;a href="http://lucene.apache.org/java/2_3_2/queryparsersyntax.html#Term Modifiers" target="_blank"&gt;term modifiers&lt;/a&gt; for text we decided it would be great to have those exposed in the API for people to leverage. For this we’ve got a series of string extension methods which reside in the namespace&lt;/p&gt;

&lt;pre&gt;UmbracoExamine.SearchCriteria&lt;/pre&gt;

&lt;p&gt;So once you add a using statement for that you’ll have the following extension methods:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;public static IExamineValue SingleCharacterWildcard(this string s) &lt;/li&gt;

  &lt;li&gt;public static IExamineValue MultipleCharacterWildcard(this string s) &lt;/li&gt;

  &lt;li&gt;public static IExamineValue Fuzzy(this string s) &lt;/li&gt;

  &lt;li&gt;public static IExamineValue Fuzzy(this string s, double fuzzieness) &lt;/li&gt;

  &lt;li&gt;public static IExamineValue Boost(this string s, double boost) &lt;/li&gt;

  &lt;li&gt;public static IExamineValue Proximity(this string s, double proximity) &lt;/li&gt;

  &lt;li&gt;public static IExamineValue Excape(this string s) &lt;/li&gt;

  &lt;li&gt;public static string Then(this IExamineValue vv, string s) &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these (with the exception of Then) return an IExamineValue (which UmbracoExamine internally handles), and it tells Lucene.Net how to handle the term modifier you required.&lt;/p&gt;

&lt;p&gt;I wont repeat what is said within the Lucene documentation, I suggest you read that to get an idea of what to use and when. 
  &lt;br /&gt;The only exceptions are Escape and Then.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Escape&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you’re wanting to search on multiple works &lt;em&gt;together&lt;/em&gt; then Lucene requires them to be ‘escaped’, otherwise it’ll (generally) treat the space character as a break in the query. So if you wanted to search for &lt;em&gt;Umbraco Rocks&lt;/em&gt; and didn’t escape it you’d match on both Umbraco and Rocks, where as when it’s escaped you’ll then match on the two words in sequence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Then &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Then method just allows you to combine multiple strings or multiple IExamineValues, so you can boost your fuzzy query with a proximity of 0.1 :P.&lt;/p&gt;

&lt;h3&gt;&lt;/h3&gt;

&lt;h3&gt;IBooleanOpeation&lt;/h3&gt;

&lt;p&gt;IBooleanOperation allows your to join multiple IQuery methods together using:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;IQuery And() &lt;/li&gt;

  &lt;li&gt;IQuery Or() &lt;/li&gt;

  &lt;li&gt;IQuery Not() &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are then translated into the underlying searcher so it can determine how to deal with your chaining. At the time of writing we don’t support nested conditionals (grouped OR’s operating like an And).&lt;/p&gt;

&lt;p&gt;There’s another method on IBooleanOperation which doesn’t fall into the above, but it’s very critical to the overall idea:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;ISearchCriteria Compile() &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Compile method will then return an ISearchCriteria which you then pass into your searcher. It’s expected that this is the last method which is called and it’s meant to prepare all search queries for execution. 
  &lt;br /&gt;The reason we’re going with this rather than passing the IQuery into the Searcher is that it means we don’t have to have the max results/ etc into every IQuery instance, it’s not something that is relevant in that scope, so it’d just introduce code smell, and no one wants that.&lt;/p&gt;

&lt;h3&gt;Bringing it all together&lt;/h3&gt;

&lt;p&gt;So now you know the basics, how do you go about producing a query?&lt;/p&gt;

&lt;p&gt;Well the first thing you need to do is get an instance of your ISearchCriteria:&lt;/p&gt;

&lt;pre&gt;var sc = ExamineManager.Instance.CreateSearchCriteria();&lt;/pre&gt;

&lt;p&gt;Now lets do a search for a few things across a few different fields:&lt;/p&gt;

&lt;pre&gt;var query = sc.NodeName(&amp;quot;umbraco&amp;quot;).And().Field(&amp;quot;bodyText&amp;quot;, &amp;quot;is awesome&amp;quot;.Escape()).Or().Field(&amp;quot;bodyText&amp;quot;, &amp;quot;rock&amp;quot;.Fuzzy());&lt;/pre&gt;

&lt;p&gt;Now we’ve got a query across a few different fields, lastly we need to pass it to our searcher:&lt;/p&gt;

&lt;pre&gt;var results = ExamineManager.Instance.Search(query.Compile());&lt;/pre&gt;

&lt;p&gt;It’s just that simple!&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Hopefully the fluent API is clean enough that people can build nice and complex queries and are able to search their websites with not problem. If you’ve got any feedback please leave it here, as we’re working to get an RC out soon.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1217</guid>
      <link>https://shazwazza.com/post/examine-but-not-as-you-knew-it/</link>
      <category>Umbraco</category>
      <category>Examine</category>
      <title>Examine, but not as you knew it</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;Almost 12 months ago Shannon &lt;a href="http://www.farmcode.org/post/2009/04/20/Umbraco-Examine-v4x-Powerful-Umbraco-Indexing.aspx" target="_blank"&gt;blogged&lt;/a&gt; about &lt;a href="http://www.farmcode.org/page/Umbraco-Examine.aspx" target="_blank"&gt;Umbraco Examine&lt;/a&gt; a Lucene.NET indexer which works nicely with Umbraco 4.x. Since then we’ve done quite a bit of work on Examine, and as people will may be aware we’ve integrated Examine into the Umbraco core and it will be shipped out of the box with Umbraco 4.1.&lt;/p&gt;  &lt;p&gt;Something Shannon and I had discussed a few times was that we wanted to decouple Examine from Umbraco so it could be used for indexing on sites other than Umbraco.    &lt;br /&gt;You’ll also notice that I keep referring to it as Examine, not Umbraco Examine which most people are more familiar with.     &lt;br /&gt;This is because over the last week we have achieved what we’d wanted to do, we’ve decoupled Examine from Umbraco!&lt;/p&gt;  &lt;h3&gt;So what’s Examine?&lt;/h3&gt;  &lt;p&gt;Examine is a provider based, config driven search and indexer framework. Examine provides all the methods required for indexing and searching any data source you want to use.&lt;/p&gt;  &lt;p&gt;Examine is now agnostic of the indexer/ searcher API, as well as the data source. That’s right Examine has no references within itself to Umbraco, nor does it have any references to Lucene.NET.    &lt;br /&gt;We have still maintained a usage of XML internally for passing the data-to-index around, as it’s the easiest construct which we could think to work with and pass around.&lt;/p&gt;  &lt;p&gt;You could implement the Examine framework in any solution, to index any data you want, it could be from a SQL server, or it could be from web-scraped content.&lt;/p&gt;  &lt;h3&gt;Where does that leave Umbraco Examine?&lt;/h3&gt;  &lt;p&gt;Umbraco Examine still exists, in fact it’s the primary (and currently only) implementer of Examine. Over the last week though we’ve done a lot of refactoring of Umbraco Examine to work with some changes we’ve done to the underlying Examine API.&lt;/p&gt;  &lt;h3&gt;Changes? What changes?&lt;/h3&gt;  &lt;p&gt;Last week anyone who follows me on &lt;a href="http://twitter.com/slace" target="_blank"&gt;Twitter&lt;/a&gt; will have seen a lot of tweets around Umbraco Examine which was about a new search API and the breaking changes we were implementing.&lt;/p&gt;  &lt;p&gt;While looking to refactor the underlying API of a large Umbraco site we have running I found that Examine was actually not properly designed if you wanted to search for data in specific fields, or build complex search queries.&lt;/p&gt;  &lt;p&gt;This was a real bugger, I had many different parameters I needed to optionally search on, and only in certain fields, but since Umbraco Examine works with just a raw string this wasn’t possible.&lt;/p&gt;  &lt;p&gt;So I set about creating a new &lt;em&gt;fluent search API. &lt;/em&gt;This has actually turned out quite well, in fact so well that we new have this as the recommended search method, not raw text (which is still available).&lt;/p&gt;  &lt;p&gt;The fluent API is part of the Examine API so it’s also available for any implementation, not just Umbraco! Since we’ve used Lucene.NET as the initial support model the API is designed similarly to what you’d expect from Lucene.NET, but we hope that it’s generic enough to look and feel right for any indexer/ searcher.&lt;/p&gt;  &lt;p&gt;Here’s how the fluent API looks:&lt;/p&gt;  &lt;pre&gt;searchCriteria
.Id(1080)
.Or()
.Field(&amp;quot;headerText&amp;quot;, &amp;quot;umb&amp;quot;.Fuzzy())
.And()
.NodeTypeAlias(&amp;quot;cws&amp;quot;.MultipleCharacterWildcard())
.Not()
.NodeName(&amp;quot;home&amp;quot;);&lt;/pre&gt;

&lt;p&gt;All you have to do is pass that into your searcher. That easy, and that beautiful. I’ll do a blog post where we’ll look more deeply into the fluent API separately.&lt;/p&gt;

&lt;p&gt;Additionally we’ve done some other changes, because of what the framework new is we’ve renamed our assemblies and namespaces:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Examine.dll&lt;/li&gt;

  &lt;ul&gt;
    &lt;li&gt;This was formally UmbracoExamine.Core.dll&lt;/li&gt;

    &lt;li&gt;Root namespace Examine&lt;/li&gt;

    &lt;li&gt;Contains all the classes and methods to create your own indexer and searcher&lt;/li&gt;
  &lt;/ul&gt;

  &lt;li&gt;UmbracoExamine.dll&lt;/li&gt;

  &lt;ul&gt;
    &lt;li&gt;This was formally UmbracoExamine.Providers.dll&lt;/li&gt;

    &lt;li&gt;Root namespace UmbracoExamine.dll&lt;/li&gt;

    &lt;li&gt;Contains all the classes and methods of an Umbraco &amp;amp; Lucene.NET &lt;/li&gt;
  &lt;/ul&gt;
&lt;/ul&gt;

&lt;p&gt;Apologies to any existing implementations of Umbraco Examine, this will result in breaking changes but since we’ve not hit RC yet too bad :P.&lt;/p&gt;

&lt;p&gt;There are also some changes to the config, &amp;lt;IndexUserFields /&amp;gt; has become &amp;lt;IndexStandardFields /&amp;gt;, and obviously the config registrations are different with the assembly and namspace changes.&lt;/p&gt;

&lt;p&gt;The last change is that we’ve moved to the &lt;a href="http://www.opensource.org/licenses/ms-pl.html" target="_blank"&gt;Ms-PL license&lt;/a&gt; for Examine, whos source is available on &lt;a href="http://umbracoexamine.codeplex.com" target="_blank"&gt;codeplex&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Currently we’re working to tidy up the API and the documentation so that we can get the RC release out shortly, so watch this space.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1219</guid>
      <link>https://shazwazza.com/post/examine-s-fluent-search-api-elevator-pitch/</link>
      <category>Examine</category>
      <title>Examine’s Fluent Search API – Elevator Pitch</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;I realised that with &lt;a href="/post/2010/03/25/Examinee28099s-fluent-search-API.aspx" target="_blank"&gt;my blog post about Examine&lt;/a&gt; it was fairly in-depth and a lot of people were probably bored before they got to the good bits about how easy searching can be.     &lt;br /&gt;So I decided that a smaller, more concise post was in order.&lt;/p&gt;  &lt;h3&gt;What?&lt;/h3&gt;  &lt;p&gt;The Fluent Search API is a chainable (like jQuery) API for building complex searches for a data source, in this case Umbraco. It doesn’t require you to know any “search language”, it just works via standard .NET style method calls, with intellisense to help guide you along the way.&lt;/p&gt;  &lt;h3&gt;How?&lt;/h3&gt;  &lt;p&gt;This is achieved by combining &lt;em&gt;IQuery&lt;/em&gt; methods (search methods) with &lt;em&gt;IBooleanOperation&lt;/em&gt; methods (And, Or, Not) to produce something cool. For example:&lt;/p&gt;  &lt;pre&gt;var query = sc
	.NodeName(&amp;quot;umbraco&amp;quot;)
	.And()
	.Field(&amp;quot;bodyText&amp;quot;, &amp;quot;is awesome&amp;quot;.Escape())
	.Or()
	.Field(&amp;quot;bodyText&amp;quot;, &amp;quot;rock&amp;quot;.Fuzzy()); &lt;/pre&gt;

&lt;p&gt;&lt;em&gt;Examineness&lt;/em&gt; can be implemented to do special things to search text, like making it a wild card query, or escaping several terms to have them used as a search sentence.&lt;/p&gt;

&lt;h3&gt;&amp;#160;&lt;/h3&gt;

&lt;p&gt;Hopefully this more direct post will engage your attention better and make you want more Examine sexiness.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1202</guid>
      <link>https://shazwazza.com/post/excluding-pages-with-url-rewriting/</link>
      <category>Web Development</category>
      <title>Excluding pages with URL Rewriting</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;Today we had a mini site which the promotion had completed, but the site was to stay live with a few of the content pages staying live for people who come to view it.&lt;/p&gt;  &lt;p&gt;Because the site was only a few pages there isn’t a CMS back-end, it’s just flat ASPX pages are stored in a single folder.    &lt;br /&gt;The problem is, that the pages which need to be available are also in the folder which the pages which are not longer accessible are.&lt;/p&gt;  &lt;p&gt;There is a few ways in which I can take &lt;em&gt;down&lt;/em&gt; the pages which people aren’t meant to access, firstly I could just delete them. That’d work, but that’d be a 404 error which isn’t really a good user experience (I could set the 404 redirect to be the home page, but the browser would still receive a 404 HTTP status).&lt;/p&gt;  &lt;p&gt;So the next option is URL Redirection, lets crack out our UrlRewriting.config file and set up a rule. We’ll start with a rule like this:&lt;/p&gt;  &lt;pre&gt;&amp;lt;add name=&amp;quot;RedirAllIndexedPagesToDefault&amp;quot; 
   virtualURL=&amp;quot;^(.*)/pages/(.*)&amp;quot; 
   destinationUrl=&amp;quot;$1/default.aspx&amp;quot; 
   redirectMode=&amp;quot;Permanent&amp;quot; 
   redirect=&amp;quot;Domain&amp;quot; 
   ignoreCase=&amp;quot;true&amp;quot; /&amp;gt;&lt;/pre&gt;

&lt;p&gt;There, that’ll handle &lt;strong&gt;everything&lt;/strong&gt; in our pages folder, but it doesn’t help with the pages which I want accessible. Say the pages I want accessible are TermsAndConditions.aspx and PrivacyPolicy.aspx, but I don’t want Entry.aspx accessible. 

  &lt;br /&gt;It’s just a matter of modifying my &lt;strong&gt;virtualURL&lt;/strong&gt; to be a bit stricter, so now it looks like this:&lt;/p&gt;

&lt;pre&gt;&amp;lt;add name=&amp;quot;RedirAllIndexedPagesToDefault&amp;quot; 
   virtualURL=&amp;quot;^(.*)/pages/&lt;strong&gt;(?![TP.*])&lt;/strong&gt;(.*)&amp;quot; 
   destinationUrl=&amp;quot;$1/default.aspx&amp;quot; 
   redirectMode=&amp;quot;Permanent&amp;quot; 
   redirect=&amp;quot;Domain&amp;quot; 
   ignoreCase=&amp;quot;true&amp;quot; /&amp;gt;&lt;/pre&gt;

&lt;p&gt;Now you’ll not be able to get to Entry.aspx, but the other two pages will still work just fine.&lt;/p&gt;

&lt;p&gt;Sure it’s not great if you’ve got lots of pages (and if you did have lots of pages I’d hope there was a CMS to deal with it), but it’s good for mini sites which you want some pages but not others in a folder accessible.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1158</guid>
      <link>https://shazwazza.com/post/testing-outgoing-smtp-emails-so-simple/</link>
      <category>Web Development</category>
      <category>etc...</category>
      <category>Hosting</category>
      <category>Servers</category>
      <title>Testing Outgoing SMTP Emails - So Simple!</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;At the &lt;a href="http://www.umbraco.org" target="_blank"&gt;Umbraco&lt;/a&gt; retreat before &lt;a href="http://www.codegarden09.com/" target="_blank"&gt;CodeGarden 09&lt;/a&gt; in Denmark, &lt;a href="http://www.aaron-powell.com/" target="_blank"&gt;Aaron&lt;/a&gt; had told me an extremely handy tip about testing outbound emails in your .Net applications. I'm not sure why I've never heard about this before and the funny thing is all of the .Net developers working in our office (including contractors) had never seen this before either! It's so incredibly simple and built into .Net, so if you don't know about this already you'll want to be using this in the future.&lt;/p&gt;  &lt;p&gt;If you application needs to send emails for whatever reason and you’re testing locally, you generally have to make sure that you're only sending emails to your address(es) so you’re not spamming a bunch of random people. This is an easy way to get around that and lets you view all of the emails sent. Just change (in our case add) a &lt;em&gt;deliveryMethod&lt;/em&gt; attribute to your &lt;em&gt;smtp&lt;/em&gt; settings to &lt;em&gt;SpecifiedPickupDirectory:&lt;/em&gt;&lt;/p&gt;  &lt;pre&gt;&amp;lt;system.net&amp;gt;
  &amp;lt;mailSettings&amp;gt;
    &amp;lt;smtp from=&amp;quot;noreply@localhost&amp;quot; deliveryMethod=&amp;quot;SpecifiedPickupDirectory&amp;quot;&amp;gt;
      &amp;lt;specifiedPickupDirectory pickupDirectoryLocation=&amp;quot;c:\maildrop&amp;quot; /&amp;gt;
    &amp;lt;/smtp&amp;gt;
  &amp;lt;/mailSettings&amp;gt;
&amp;lt;/system.net&amp;gt;&lt;/pre&gt;

&lt;p&gt;Now, all emails that are sent, just get saved to the specified folder and you can view them with Windows Live Mail, Outlook express, Thunderbird, or whatever.&lt;/p&gt;

&lt;p&gt;Nice!! &lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1162</guid>
      <link>https://shazwazza.com/post/introducing-snapshot/</link>
      <category>Umbraco</category>
      <title>Introducing Snapshot</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;Over the past few weeks Shannon and I have been dropping hints on Twitter about an exciting new project we’ve been working on. We’ve now started dropping hints including the name Snapshot. &lt;br&gt;Well we thought it was about time that we stopped playing the tease and brought more to the table.  &lt;h3&gt;What is Snapshot?&lt;/h3&gt; &lt;p&gt;In short Snapshot is a tool for Umbraco, giving you the ability to export a full ASP.NET site from the CMS.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.darren-ferguson.com/" target="_blank"&gt;Darren Ferguson&lt;/a&gt; tweeted about a similar product he’s working on, generating HTML files from Umbraco.&lt;/p&gt; &lt;p&gt;But we’re going up a notch, we’re exporting &lt;strong&gt;a fully working ASP.NET website&lt;/strong&gt; from Umbraco. &lt;br&gt;This means that macros will work, .NET User Controls will work, everything you’d expect from an Umbraco site.&lt;/p&gt; &lt;p&gt;Just there’s no CMS at all. In fact, you shouldn’t require any of the Umbraco assemblies to run it!&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Enough talk, here’s a video!&lt;/p&gt; &lt;p&gt;&lt;object width="400" height="300"&gt; &lt;param name="allowfullscreen" value="true" /&gt; &lt;param name="allowscriptaccess" value="always" /&gt; &lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=11805292&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=11805292&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" allowfullscreen="true" allowscriptaccess="always"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://vimeo.com/11805292"&gt;Snapshot introduction&lt;/a&gt; from &lt;a href="http://vimeo.com/user3836949"&gt;The Farm&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1190</guid>
      <link>https://shazwazza.com/post/backing-up-document-types/</link>
      <category>Umbraco</category>
      <title>Backing up Document Types</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;Something I’ve heard a number of people say is that they want a way in which they can store the DocumentType in their source control system.  &lt;p&gt;This is obviously a bit of a problem since they are actually stored in the database, not on the file system. Hmmm…&lt;/p&gt; &lt;p&gt;Then yesterday I was talking to &lt;a href="http://tath.am"&gt;Tatham Oddie&lt;/a&gt; about it and how you could go about CI with Umbraco. Then after bouncing a few ideas of Shannon we had a great idea, that when you say a DocumentType it would just dump it to the file system. You can then check this file into your source control system and you have a backup.&lt;/p&gt; &lt;p&gt;Sounds pretty simple, and in fact, Umbraco has all the stuff you’d need for this, it’s just a matter of doing it. So while waiting for a rather large project to check out of source control I decided to just write it.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;Please note, the following code is not tested, it’s just a POC, when I get some time I do plan on actually testing it :P&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;h3&gt;How do go about it&lt;/h3&gt; &lt;p&gt;It’s actually quite simple, you just need to tie into the Umbraco event model for a DocumentType and use the built in XML export feature.&lt;/p&gt; &lt;p&gt;I’ve also done the code so you can either dump to a single file or to multiple files (depending which is easiest in your solution.&lt;/p&gt; &lt;p&gt;It doesn’t check the files out for you, so if you’re using something like TFS you’ll have a problem, but I have put in handlers for read-only files.&lt;/p&gt; &lt;p&gt;Also, there’s no error checking, like I said, this is POC code :P.&lt;/p&gt; &lt;h3&gt;Code baby!&lt;/h3&gt;&lt;pre&gt;using System.Linq;
using System.IO;
using System.Web;
using System.Xml.Linq;
using umbraco;
using umbraco.BusinessLogic;
using umbraco.cms.businesslogic.web;

namespace AaronPowell.Umbraco
{
    public class DocumentTypeSerializer : ApplicationBase
    {
        public DocumentTypeSerializer()
        {
            DocumentType.AfterSave += new DocumentType.SaveEventHandler(DocumentType_AfterSave);
            DocumentType.AfterDelete += new DocumentType.DeleteEventHandler(DocumentType_AfterDelete);
        }

        void DocumentType_AfterDelete(DocumentType sender, umbraco.cms.businesslogic.DeleteEventArgs e)
        {
            DumpDocumentTypes(false);
        }

        void DocumentType_AfterSave(DocumentType sender, umbraco.cms.businesslogic.SaveEventArgs e)
        {
            DumpDocumentTypes(false);
        }

        private static void DumpDocumentTypes(bool useSingleFile)
        {
            var allDocTypes = DocumentType.GetAllAsList();
			var storageFolder = GlobalSettings.StorageDirectory + "/";
			System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
			
			if(useSingleFile)
			{
				var xdoc = new XDocument(new XElement("DocumentTypes"));

				foreach (var dt in allDocTypes)
					xdoc.Root.Add(XElement.Parse(dt.ToXml(xmlDoc).InnerXml));

				var file = storageFolder + "DocumentTypes.config";
				var fileOnFileSystem = new FileInfo(HttpContext.Current.Server.MapPath(file));
				if (fileOnFileSystem.Exists)
				{
					if (fileOnFileSystem.Attributes == FileAttributes.ReadOnly)
						fileOnFileSystem.Attributes &amp;amp;= ~FileAttributes.ReadOnly;
						
					fileOnFileSystem.Delete();
				}

				xdoc.Save(fileOnFileSystem.FullName);
			}
			else
			{
				storageFolder += "DocumentTypes/";
				if(!Directory.Exists(storageFolder))
				{
					Directory.Create(storageFolder);
				}
				else
				{
					var di = new DirectoryInfo(storageFolder);
					var files = di.GetFiles();
					foreach(var file in files) 
					{
						if (file.Exists)
						{
							if (file.Attributes == FileAttributes.ReadOnly)
								file.Attributes &amp;amp;= ~FileAttributes.ReadOnly;
								
							file.Delete();
						}
					}
				}				
				
				foreach(var dt in allDocTypes) 
				{
					var xdoc = XDocument.Parse(dt.ToXml(xmlDoc).ToString());
					
					var file = storageFolder + dt.Alias + ".config";
					
					var fileOnFileSystem = new FileInfo(HttpContext.Current.Server.MapPath(file));
					if (fileOnFileSystem.Exists)
					{
						if (fileOnFileSystem.Attributes == FileAttributes.ReadOnly)
							fileOnFileSystem.Attributes &amp;amp;= ~FileAttributes.ReadOnly;
							
						fileOnFileSystem.Delete();
					}

					xdoc.Save(fileOnFileSystem.FullName);
				}
			}
        }
    }
}&lt;/pre&gt;
&lt;p&gt;I'll look at cleaning this up and testing it soon and releasing it as an actual Umbraco package, but in the mean time feel free to have a play around with it.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1237</guid>
      <link>https://shazwazza.com/post/aspnet-client-dependency-framework-rc1-released/</link>
      <category>Client Dependency</category>
      <title>ASP.Net Client Dependency Framework RC1 Released!</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;With the community feedback, bug reports, patches, etc… I’ve managed to find time to upgrade this library to a release candidate status. We do use this framework in many production websites but it was great to hear from other in regards to specific bugs that were found relating to particular environments. These bugs have all been fixed up and this library is looking very stable. &lt;/p&gt;  &lt;p&gt;You can download the binaries &lt;a href="http://clientdependency.codeplex.com/releases/view/42193" target="_blank"&gt;&lt;strong style="font-size: 22px"&gt;here&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Better yet, I’ve put together a near complete documentation library on CodePlex &lt;a href="http://clientdependency.codeplex.com/documentation" target="_blank"&gt;&lt;strong style="font-size: 22px"&gt;here&lt;/strong&gt;&lt;/a&gt; !!&lt;/p&gt;  &lt;p&gt;I still think the best way to learn about this project is to download the source code from CodePlex &lt;a href="http://clientdependency.codeplex.com/SourceControl/list/changesets" target="_blank"&gt;&lt;strong style="font-size: 22px"&gt;here &lt;/strong&gt;&lt;/a&gt;and have a look at the demo web application included.&lt;/p&gt;  &lt;p&gt;Moving forward, the next phase for this library is to add MVC support and another file registration provider called PlaceholderProvider which will give you even more granular control over where dependencies can be rendered in your markup. MVC support should be fairly straight forward and we’ll include a demo project for this as well.&lt;/p&gt;  &lt;p&gt;Well definitely be releasing a final version soon after the next Umbraco 4.1 release candidate is released (which will hopefully be fairly soon!)&lt;/p&gt;  &lt;p&gt;Happy day! Any and all feedback, bug reports and patches are definitely appreciated!&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1246</guid>
      <link>https://shazwazza.com/post/wildcard-mapping-in-iis-7-classic-pipeline-webconfig/</link>
      <category>Web Development</category>
      <category>etc...</category>
      <category>Hosting</category>
      <category>Servers</category>
      <title>Wildcard mapping in IIS 7 classic pipeline = web.config!</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;After foolishly pulling out my hair trying to find out why my wildcard mapping was disappearing in IIS 7 using classic pipeline mode, i realized it was my own fault!! I followed the instructions on this site: &lt;a title="http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/" href="http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/"&gt;http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/&lt;/a&gt; and unfortunately just skipped over the message about how this modifies your web.config… oops! So basically, every time I deployed my handler mapping would be removed… Doh!&lt;/p&gt;  &lt;p&gt;Unfortunately, the method to add a wildcard mapping in this article will actually remove the inheritance of standard handlers from the root of IIS and your machine.config and just make copies of them. This might not be the best approach, but i suppose sometimes it’s necessary. We only need the wildcard mapping for URL Rewriting so i decided to see if i could just simply add the isapi wildcard mapping only, have the rest of the handlers inherit from the root and see if it works… turns out it does!&lt;/p&gt;  &lt;p&gt;So instead of having to modify IIS itself, i just needed to add this to my web.config:&lt;/p&gt;  &lt;pre&gt;&amp;lt;handlers&amp;gt;
	&amp;lt;remove name=&amp;quot;ASP.Net-ISAPI-Wildcard&amp;quot; /&amp;gt;
	&amp;lt;add name=&amp;quot;ASP.Net-ISAPI-Wildcard&amp;quot; path=&amp;quot;*&amp;quot;
	verb=&amp;quot;*&amp;quot; type=&amp;quot;&amp;quot; modules=&amp;quot;IsapiModule&amp;quot;
	scriptProcessor=&amp;quot;C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll&amp;quot;
	resourceType=&amp;quot;Unspecified&amp;quot;
	requireAccess=&amp;quot;None&amp;quot;
	allowPathInfo=&amp;quot;false&amp;quot;
	preCondition=&amp;quot;classicMode,runtimeVersionv2.0,bitness64&amp;quot;
	responseBufferLimit=&amp;quot;4194304&amp;quot; /&amp;gt;
&amp;lt;/handlers&amp;gt;&lt;/pre&gt;

&lt;p&gt;Too easy! No fussing around with IIS and now at least i won’t override my changes accidentally.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1251</guid>
      <link>https://shazwazza.com/post/examine-hits-rc1/</link>
      <category>Examine</category>
      <title>Examine hits RC1</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;I’m happy to announce that Examine and UmbracoExamine have today hit &lt;a href="http://examine.codeplex.com/releases/view/43099" target="_blank"&gt;RC1&lt;/a&gt;!&lt;a href="http://examine.codeplex.com" target="_blank"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="FileDownload[1]" border="0" alt="FileDownload[1]" align="right" src="/image.axd?picture=WindowsLiveWriter/ExaminehitsRC1/3B4831D4/FileDownload1.png" width="244" height="85"&gt;&lt;/a&gt;  &lt;p&gt;The Codeplex site also has more extensive documentation about how to get UmbracoExamine up and running within your Umbraco website.&lt;/p&gt; &lt;p&gt;&lt;a href="http://examine.codeplex.com/releases/view/43099" target="_blank"&gt;Go, download your copy today.&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1284</guid>
      <link>https://shazwazza.com/post/snapshot-cms-api/</link>
      <category>Umbraco</category>
      <title>Snapshot CMS API</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;As we’ve been working on the API for &lt;a href="http://farmcode.org/post/2010/05/18/Introducing-Snapshot.aspx"&gt;Snapshot&lt;/a&gt; we realised that there’s a bunch of cool aspects to the API which we think that everyone can benefit from.  &lt;p&gt;To this end we at TheFARM have decided that we’re going to give away the CMS API’s for Snapshot free!&lt;/p&gt; &lt;h2&gt;What does this include?&lt;/h2&gt; &lt;p&gt;What we’re providing is a set of API’s which can be used as replacements for some of the Umbraco API’s, most importantly the Media and NodeFactory API’s.&lt;/p&gt; &lt;p&gt;In Snapshot we’ve got quite a bit of caching built in for working with both media and node, along with some handy features around the creation of strongly typed representations of your objects, similar to LINQ to Umbraco, but not tied to Umbraco 4.1 and more focused on being used in the scope of NodeFactory.&lt;/p&gt; &lt;h2&gt;What’s not included?&lt;/h2&gt; &lt;p&gt;This is just the Snapshot API for working with the Umbraco XML cache, it does not include the Snapshot export engine, nor does it include the API for working in the published Snapshot environment (sorry, those &lt;strong&gt;aren’t&lt;/strong&gt; going to be free!).&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;Why would I want to use it?&lt;/h2&gt; &lt;p&gt;Well this is a good question, we’ve already got both Media and NodeFactory, why would you want to use something more custom for it?&lt;/p&gt; &lt;p&gt;Media caching is an obvious advantage, but most importantly the Snapshot API is designed with dependency injection as a forethought. This means that when you’re working on your applications in Umbraco you can have the Media or Node API’s injected using &lt;a href="http://code.google.com/p/autofac"&gt;Autofac&lt;/a&gt;. This makes testable Umbraco development quite easy.&lt;/p&gt; &lt;p&gt;Lastly, since Snapshot is an abstraction away from the Umbraco API you can even write your own implementations which don’t require the Umbraoc XML file to read data, you could pull it in from any source.&lt;/p&gt; &lt;h2&gt;Getting it&lt;/h2&gt; &lt;p&gt;The pre-release of the Snapshot CMS API is available on the &lt;a href="http://farmcode.org/page/Snapshot.aspx"&gt;Snapshot page of FarmCode.org&lt;/a&gt;. Keep in mind that this is an early build of the Snapshot CMS API, and it &lt;strong&gt;is&lt;/strong&gt; subject to change. For updated releases keep an eye on our blog.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:13 Z</pubDate>
      <a10:updated>2023-03-23T15:08:13Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1265</guid>
      <link>https://shazwazza.com/post/creating-code-behind-files-for-umbraco-templates/</link>
      <category>Umbraco</category>
      <title>Creating code-behind files for Umbraco templates</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;I’ve always had this idea in my head that one of the downfalls of using Umbraco when coming form standard ASP.Net web application was the missing code-behind files. You know, when you create a new web application and add an .aspx page to it it conveniently comes with a .cs and design.cs file. Most of the time I would even let the code-behind file inherit from my own custom Page/MasterPage implementation, e.g. a SecuredPage that comes with various properties and methods to handle authentication. Although Umbraco uses regular masterpages (if you haven’t turned it off in the web.config) all you get in the backoffice is the actual page template. Now, don’t get me wrong: I love the way Umbraco let’s you edit all aspects of your site via the backend and gives you the utmost flexibility and 100% control over the output, presented in a refreshingly simple manner. Yet sometimes you need a bit more, and it’s just another clear plus for Umbraco that you are able do the following without ever having to modify the core.  &lt;p&gt;The 'aha' moment that it is actually quite easy to add code-behind files to Umbraco masterpages came to me when I had to port a quite big ASP.Net website to Umbraco. The website had grown organically over the years with lots of custom templates, user controls, etc. The site also had multi-language support, all of which was handled in the code-behind files of the pages. The goal was to get it over to Umbraco as quick as possible, then rework the functionality bit by bit. So I started by creating a new Umbraco site and ‘wrapped’ it in a web application project in Visual Studio.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="/image.axd?picture=1-28-2011%205-00-55%20PM.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1-28-2011 5-00-55 PM" border="0" alt="1-28-2011 5-00-55 PM" src="/image.axd?picture=1-28-2011%205-00-55%20PM_thumb.png" width="343" height="459"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;sub&gt;[Please refer to the comments below to find more information on how to set this up in Visual Studio.]&lt;/sub&gt;&lt;/p&gt; &lt;p&gt;After adding a couple of document types and templates in Umbraco the masterpages folder looks something like this:&lt;/p&gt; &lt;p&gt;&lt;a href="/image.axd?picture=1-28-2011%205-28-34%20PM.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1-28-2011 5-28-34 PM" border="0" alt="1-28-2011 5-28-34 PM" src="/image.axd?picture=1-28-2011%205-28-34%20PM_thumb.png" width="153" height="77"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The Root.master file is the main master page, Page1.master and Page2.master are nested master pages in Umbraco. I’ve included all three of them in the solution. Now it’s time to create the code-behind file: right-click on the masterpages folder and add three C# classes and name them Root.master.cs, Page1.master.cs and Page2.master.cs. The result should be something like this:&lt;/p&gt; &lt;p&gt;&lt;a href="/image.axd?picture=1-28-2011%205-29-38%20PM.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1-28-2011 5-29-38 PM" border="0" alt="1-28-2011 5-29-38 PM" src="/image.axd?picture=1-28-2011%205-29-38%20PM_thumb.png" width="191" height="127"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Visual Studio automatically groups them together, fantastic. Yet they are not really hooked up yet, VS does the grouping just based on file names. The master directive on Root.master currently looks like this:&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:4893245a-de6a-4304-b18c-29fdcf6764e1" class="wlWriterSmartContent"&gt;&lt;pre style="background-color: white; width: 592px; height: 65px; overflow: auto"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;%@ Master &lt;/span&gt;&lt;span style="color: #ff0000"&gt;Language&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="C#"&lt;/span&gt;&lt;span style="color: #ff0000"&gt; 
           MasterPageFile&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="~/umbraco/masterpages/default.master"&lt;/span&gt;&lt;span style="color: #ff0000"&gt; 
           AutoEventWireup&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="true"&lt;/span&gt;&lt;span style="color: #ff0000"&gt; %&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt;To hook up the cs file we need to add the CodeBehind and Inherits attributes like so:&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:367d06de-6e44-4624-bec8-3a56496ae9d8" class="wlWriterSmartContent"&gt;&lt;pre style="background-color: white; width: 587px; height: 93px; overflow: auto"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color: #000000"&gt;@ Master Language&lt;/span&gt;&lt;span style="color: #000000"&gt;=&lt;/span&gt;&lt;span style="color: #000000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt;C#&lt;/span&gt;&lt;span style="color: #000000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt; 
           MasterPageFile&lt;/span&gt;&lt;span style="color: #000000"&gt;=&lt;/span&gt;&lt;span style="color: #000000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt;~/umbraco/masterpages/default.master&lt;/span&gt;&lt;span style="color: #000000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt; 
           AutoEventWireup&lt;/span&gt;&lt;span style="color: #000000"&gt;=&lt;/span&gt;&lt;span style="color: #000000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt;true&lt;/span&gt;&lt;span style="color: #000000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt; 
           CodeBehind&lt;/span&gt;&lt;span style="color: #000000"&gt;=&lt;/span&gt;&lt;span style="color: #000000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt;Root.master.cs&lt;/span&gt;&lt;span style="color: #000000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt; 
           Inherits&lt;/span&gt;&lt;span style="color: #000000"&gt;=&lt;/span&gt;&lt;span style="color: #000000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt;Umbraco_4._6._1.masterpages.Root&lt;/span&gt;&lt;span style="color: #000000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt;You should get an error at this point as the compiler complains that Root is not convertible to System.Web.UI.MasterPage, so we need to fix this in the cs file as well by making the class partial (necessary if you want to later add designer files as well) and inheriting from System.Web.UI.MasterPage. An empty Page_Load message can’t hurt as well:&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:d5afca84-faa0-4ffe-b389-afa876d28643" class="wlWriterSmartContent"&gt;&lt;pre style="background-color: white; width: 543px; height: 221px; overflow: auto"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt;&lt;span style="color: #000000"&gt; System;

&lt;/span&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt;&lt;span style="color: #000000"&gt; Umbraco4_6_1.masterpages
{
    &lt;/span&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;partial&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;class&lt;/span&gt;&lt;span style="color: #000000"&gt; Root : System.Web.UI.MasterPage
    {
        &lt;/span&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; Page_Load(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;object&lt;/span&gt;&lt;span style="color: #000000"&gt; sender, EventArgs e)
        {
        }
    }
}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt;You should now be able to switch between both files by pressing F7 in Visual Studio. Let’s try to add a Property and reference that from the template:&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:145b4492-011f-40ea-800f-d14449f9c0d9" class="wlWriterSmartContent"&gt;&lt;pre style="background-color: white; width: 580px; height: 176px; overflow: auto"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="color: #000000"&gt; Message { &lt;/span&gt;&lt;span style="color: #0000ff"&gt;get&lt;/span&gt;&lt;span style="color: #000000"&gt;; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;set&lt;/span&gt;&lt;span style="color: #000000"&gt;; }

        &lt;/span&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; Page_Load(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;object&lt;/span&gt;&lt;span style="color: #000000"&gt; sender, EventArgs e)
        {
            Message &lt;/span&gt;&lt;span style="color: #000000"&gt;=&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #800000"&gt;"&lt;/span&gt;&lt;span style="color: #800000"&gt;All the best from your code-behind file!! :)&lt;/span&gt;&lt;span style="color: #800000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt;;
        }&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt;and something like this on the template:&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:c70b7ac6-b7f3-48d9-b7d8-5d5cda84ab99" class="wlWriterSmartContent"&gt;&lt;pre style="background-color: white; width: 367px; height: 70px; overflow: auto"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;div&lt;/span&gt;&lt;span style="color: #000000"&gt;&amp;gt;
        &amp;lt;%= Message %&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;div&lt;/span&gt;&lt;span style="color: #000000"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt;Now we just need to compile the project and navigate to a content page that uses the Root template to see the message.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Adding designer files&lt;/h3&gt;
&lt;p&gt;[As Simon Dingley pointed out below there is an even easier way to create the designer files: right-click on the master.aspx page and select "Convert to web application", which will create the .designer file for the selected item.]&lt;/p&gt;
&lt;p&gt;We can also add a designer file to the duo to make things even better. After adding Root.master.designer.cs, Page1.master.designer.cs and Page2.master.designer.cs the solution looks like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="/image.axd?picture=1-28-2011%205-49-22%20PM.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1-28-2011 5-49-22 PM" border="0" alt="1-28-2011 5-49-22 PM" src="/image.axd?picture=1-28-2011%205-49-22%20PM_thumb.png" width="238" height="187"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Visual Studio is now rightfully complaining that it got duplicate definitions for the classes and even suggests to add the partial keyword, which we will quickly do. After that is all working and compiling nicely we need to give Visual Studio control over the designer files. That is easily accomplished by slightly modifying each .master file (e.g. by adding a single space to an empty line) and saving it, VS will do the rest for you. The most important thing this will do for you is to reference all controls you add to the template so they are available for use in the code-behind file.&lt;/p&gt;
&lt;p&gt;Now let’s try to modify the message value from the code-behind of Page1 by adding&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:63c8b174-c1eb-4519-94b9-ea292fac35ee" class="wlWriterSmartContent"&gt;&lt;pre style="background-color: white; width: 546px; height: 90px; overflow: auto"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; Page_Load(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;object&lt;/span&gt;&lt;span style="color: #000000"&gt; sender, EventArgs e)
        {
            ((Root) Master).Message &lt;/span&gt;&lt;span style="color: #000000"&gt;=&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #800000"&gt;"&lt;/span&gt;&lt;span style="color: #800000"&gt;Hello from the nested master page!&lt;/span&gt;&lt;span style="color: #800000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt;;
        }&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt;to it. Browsing to any Umbraco page that uses the Page1 template will now show the new message.&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:09 Z</pubDate>
      <a10:updated>2023-03-23T15:08:09Z</a10:updated>
    </item>
  </channel>
</rss>