Thursday, 4 November 2010

The trial period for this product has expired

On 01 Nov 2010 we were greeted with this on one of our companies internal SP2010 farms:



It turns out that the expiry for the Betas of SharePoint 2010 was this weekend, resulting in the web interface just not working any more. Microsoft don't support any upgrade path from the Beta either.

The options:

1) Use WebDAV (Windows Explorer, the path will be like \\siteUrl\DavWWWRoot\site\doclibrary) to access your documents and copy onto a new Farm

2) For List data you can access the data via Access and upload back to a new list or Access will try and create a new List for you.

3) The Content Migration API is apparently available, but I ran into issues using Central Admin to export data and import using PowerShell due to the differing versions between the Beta and the RTM on the two servers. Chris O'Brien has a tool to do just what is needed, but I couldn't get it working myself.

We didn't have much data, and I didn't want to spend money on a tool like Metalogix , so stuck with WebDAV and Access and it's actually worked out pretty well.

If we had more data and sites, I'd definitely be looking to a tool to do the heavy lifting for me.

Thursday, 2 September 2010

Unexplained "Object reference not set..." errors

After 2 days of investigation, it appears that our totally unexplained 'object reference not set to an instance of an object' error was caused by Verbose diagnostic logging being enabled and not being returned back to normal immediately after our feature upgrade.

There appears to be a bug with Verbose logging that causes unexpected errors like the above.

Note to self: If you're turning on Verbose logging, before testing the site ALWAYS return it back to its usual setting.

Source

Thursday, 5 August 2010

The most elegant way of using disposable SharePoint objects


void CombiningCallsBestPractice()
{
using (SPSite siteCollection = new SPSite(SPContext.Current.Web.Url))
using (SPWeb web = siteCollection.OpenWeb())
{

//Perform operations on site.

}
// SPWeb object web.Dispose() automatically called; SPSite object
// siteCollection.Dispose() automatically called.
}

Source : http://msdn.microsoft.com/en-us/library/aa973248(office.12).aspx