//Thursday 19 December 2013

Steps for setting up a new Umbraco 6.1.6 web project in Visual Studio 2012

  1. Create new empty MVC 4 Application in Visual Studio 2012
  2. Install Core Binaries from Nuget (latest on NuGet is now 7 so need to specify v6.1.6 "Install-Package UmbracoCms.Core -Version 6.1.6")
  3. Download the zip of Umbraco 6.1.6 and extract all files into your project folder except App_Code and bin. App_Code isn't relevant to an MVC project and you don't need the bin because the Umbraco binaries are managed by NuGet.
  4. Open up VS2012 and include the Umbraco folders in your project
  5. Update default rendering engine to be Mvc in Config\UmbracoSettings.config as follows:
    <templates>      
        <useAspNetMasterPages>true</useAspNetMasterPages>
        <defaultRenderingEngine>Mvc</defaultRenderingEngine>
    </templates>
    
  6. Create an empty database and a SQL user with access to the database
  7. Run the project and run through the standard Umbraco installation process to install database, set up connection strings etc.
  8. Add following appSettings to web.config to enable client side validation:
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    
  9. Install-Package Microsoft.jQuery.Unobtrusive.Ajax -Version 3.0.0
    Install-Package Microsoft.jQuery.Unobtrusive.Validation -Version 3.0.0

//Thursday 29 August 2013

Because of a security error, the client could not connect to the remote computer

Because of a security error, the client could not connect to the remote computer. Verify that you are logged onto the network and then try connecting again.

Recently I was presented with the above error when attempting to remote desktop to a Windows Server 2008 machine on a client VPN from a Windows Server 2003 virtual machine. The error message suggested a problem with my VPN authentication or connectivity to the remote machine. However after a bit of digging I realised that this was caused by the remote desktop settings on the Windows 2008 machine. In particular the setting related to the version of Remote Desktop that is required. When remote desktop is enabled an administrator has to choose one of the following options:
  • Allow connections from computers running any version of Remote Desktop (less secure).
  • Allow connections only from computers running Remote Desktop with Network Level Authentication (more secure).
More info here: http://technet.microsoft.com/en-us/library/cc794832(v=ws.10).aspx

If the administrator selects the latter then you can't connect via a Windows Server 2003 machine unless you update your Terminal Services client to version 6.1. There isn't an official 6.1 release of the Terminal Services client for Win2k3 however there is a security update available for SP2 that does update you from version 6.0 to version 6.1.

To check which version of Terminal Services client you have installed go to C:\Windows\System32\ and check the properties of mstsc.exe (since updating to 6.1 on Win2k3 I have version 6.0.6001.18564).

You can download version 6.0 here:

http://www.microsoft.com/en-us/download/details.aspx?id=21296

Download the security update to upgrade to version 6.1 here:

http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=22926

Credit to this article for the explanation of how to apply the 6.1 update:

http://technotes.khitrenovich.com/install-rdp-6-1-windows-server-2003/



//Tuesday 13 August 2013

Can't add Controller to MVC project in Visual Studio 2010 after installing Umbraco v6 Core binaries

I created an MVC project in Visual Studio 2010 and installed the Umbraco v6 core binaries using Nuget (version 6.0.5):

Install-Package UmbracoCms.Core

I was then unable to add a controller in Visual Studio. Right clicking the Controllers folder and choosing Add...Controller threw up an error dialog.

Could not load file or assembly 'umbraco, Version=1.0.4090.38017, Culture=neutral, PublicKeyToken=null' or one of it's dependencies. The system cannot find the file specified.

The solution to this is to remove the reference to the included library Our.Umbraco.uGoLive.47x.dll which apparently references a different version of umbraco to the one included in the package.

Found the answer on Our Umbraco here:

http://our.umbraco.org/forum/getting-started/installing-umbraco/38333-Error-creating-Controller-in-Umbraco-v6

//Friday 12 July 2013

Tools - Online XSLT debugger AKA jsfiddle for xslt

If you need a quick way to write/debug XSLT online I recommend this tool:

http://www.xsltcake.com/

Basically it's http://jsfiddle.net but for XSL. You get a similar layout with four tiled windows so that you can view everything on a single page. There is a pane for XML, a pane for XSLT and a pane for results (and one for parser errors).

This tool comes in handy to quickly query information in an XML document. Especially when you don't have access to any desktop tools for debugging XSLT.

For example you could use this generic XSLT to count the occurrences of each XML element in a given XML document:


  
  
    
      
        
      
    
  



//Friday 24 May 2013

WCF: Debugging web service using WS-Security over SSL

Recently had a requirement to connect to a web service that implements WS-Security over SSL using WCF. My web service calls were failing but I couldn't work out why. This old article (from 2007) on Rick Strahl's blog was very helpful in outlining the steps required to get tracing working in this situation:

http://www.west-wind.com/weblog/posts/2007/Dec/09/Tracing-WCF-Messages

//Tuesday 26 March 2013

SDL Tridion: Unable to expand publications in CME tree view

I had a problem in Tridion yesterday where I couldn't expand any publications in the CME tree view that contained an Audience Manager folder. It just threw up an error something like "Folder with URI tcm:8-2-196672 does not exist".

The way I worked out the problem related to Audience Manager was by doing a Find in Files in the Tridion Program Files folder searching for 196672. This matched a few config files and pointed to the problem being loading the Audience Manager folder. Eventually after a bit of digging around I found out how to disable Audience Manager in the GUI (see last post):

http://stackoverflow.com/questions/10402198/unable-to-open-publications-an-item-with-the-title-segments-already-exists

This got me to the point where content editors could start publishing pages again.

I started digging around the Tridion_cm_email database to try and find the mapping between publications and folders. The FOLDERS_OWNING_PUBLICATIONS table only had one row in it which seemed suspicious. So I restored last night's backup to a tempdb and the same table had many rows.

After restoring the previous day's backup of the email db everything is back to normal. I still don't know for sure what caused the issue. My assumption is that a recent content port included some dependencies that caused the Audience Manager settings to be overwritten. I thought I'd write an article about it since the error message is slightly esoteric and this might save someone a bit of time if they are having a similar issue.

SyntaxHighlighter