What is Toluu?
Toluu is a free service for sharing the feeds you read and discovering new ones.
Get Invite

Agile Sharepoint development by 21apps and MOSS 2007 MVP Andrew Woodward


Unit Test SPSite construction Exceptions with new Isolator methodNovember 25

In our white paper Unit Testing SharePoint Solutions - Getting into the Object Model we needed to use Natural Mocks to allow the testing exceptions that are thrown as part of the the SPSite constructor.  Our test code looked like this and although not complicated it introduced another concept that could complicate things for newbies more than necessary.

[Test] public void GetRandomMessage_SiteNotFound_ReturnErrorMessage() { //Arrange using (RecordExpectations expections = RecorderManager.StartRecording()) { expections.ExpectAndThrow(new SPSite("http://invalid_url"), new FileNotFoundException()); } //Act string rndMessage = message.GetRandomMessage("http://invalid_url"); //Assert Assert.That(rndMessage.StartsWith("Error")); Assert.That(rndMessage.Contains("Site could not be found")); }

 

With the release of V5.1.2 of Isolator for SharePoint a new API has been added to

Isolator for SharePointNovember 24

Another great day for SharePoint developers.   Typemock have announced the introduction of Isolator for SharePoint.

Take a look at our white paper showing Isolator in action and how this really does make Unit Testing your SharePoint solutions that much easier.

Unit Testing SharePoint Solutions - Getting into the Object Model

Quote from Typemock Blog:

Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here. The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.

IE8 Beta 2 - NTLM 401.1 (Not good for SharePoint developers)November 17

Found a really annoying bug this week after upgrading one of my Windows 2003 SharePoint development Virtual Machines to IE8 Beta 2.

HTTP 401.1 - Unauthorized: Logon Failed

As most people do I make use of the HOSTS file to allow the use of FQDN to remove the need for high port numbers (i.e. http://agile.21apps.dev).  First thoughts were this was down to the zone within IE, but changes here had no affect.  All of the web sites continued to work in Firefox so there was no issue with SharePoint.

I eventually found the solution here  http://support.microsoft.com/kb/956158/en-us which requires you to add a new registry entry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0

This problem occurs because Windows includes a loopback check security feature that helps prevent reflection attacks on your computer. Therefore, authentication fails if the FQDN or the custom host header that you use does not match the local computer name. 

What the problem does not explain very well is the format of the entries, they need to be without any protocol handler i.e. agile.21apps.dev (see image below).

SUGUK Meetings in NovemberNovember 13

Wow, two great SUGUK events planned for November.   London on 25th and Scotland on 27th.

Edinburgh at the Scottish Parliment

Thurs 27th November

Spencer Harbar SharePoint MVP - MythBusters - debunking common SharePoint Farm Misconceptions
This interactive, whiteboard session will dive into common SharePoint Farm Myths and discuss common misconceptions around Global Deployments, Farm Topologies, Shared Service Providers, High Availability, Security and more. Alongside best practices for each “myth”, the SharePoint “magic numbers” will be covered and there will be plenty of scope to discuss any particular queries you may have on farm deployment.

Andrew Woodward SharePoint MVP - Test Driven Development – Contrary to popular belief it can be done on SharePoint projects
In the style of Don Box this PowerPoint free session will take you through the development of a SharePoint solution using TDD. We will introduce TDD , the tools of the trade, how TDD influences you design and mocking out the core SharePoint object model elements using the new Typemock Isolator APIs.

Sign Up for the Edinburgh event at SUGUK forum with your full name.

London at Microsoft Cardinal Place

Tue 25th November

Ben Robb SharePoint MVP - Customizing SharePoint Search

SharePoint Search is very powerful, and there are some key best practices which



SPDisposeCheck - the tool every SharePoint developer needsNovember 12

At long last Microsoft have announced publically the excellent SPDisposeCheck tool.   This tool will examine your IL level components and report any possible areas where you may have the potential for a leak due to objects not being disposed of correctly.   The output from the tool does require a deep understanding of the way objects are disposed of as there is the potential for false positives.

For more information check out the SharePoint Team Blog even if you can’t get the tool just yet, its coming soon, the referenced posts are a must read for all SharePoint developers.