SharePoint

Migrate SharePoint Blog to WordPress

As promised here, this is a follow-up post with the tool I developed for the SharePoint to WordPress migration. First, a screenshot: What is it, that we have to cover with a migration? Copying the posts is not enough. So I came up with this features: Features Copy posts Copy comments Copy resources like images and downloads Create needed tags and categories Modify links to local resource deal with https, if links are absolute on the source blog and mixed with http Using web services to connect to source and destination URL rewriting (covered by a WordPress Plugin) Delete all content from the destination blog (for migration testing) Replace strings (with Regex) a nice (WPF) GUI Description Originally I’ve build a plain console application.

ChangePassword Webpart – new version available

The ChangePassword WebPart on CodePlex has been downloaded over 20.000 times. The new version has a couple of new features: Easy Installation SharePoint 2010 and 2013 (Foundation and Server) Password strength indicator Plugin support to extend functionality by custom code1 Warning if an unsecured connection is used Copyright hint can be removed1 Auditing of password changes (and attempts) Logging into the SharePoint logs This is how it might look on your SharePoint:

Useful JavaScript to know when working with SharePoint Display Templates

This post has some really great examples for JavaScript helper methods and available properties for working with Display Templates in SharePoint 2013. http://dotnetmafia.com/blogs/dotnettipoftheday/archive/2014/02/26/useful-javascript-for-working-with-sharepoint-display-templates-spc3000-spc14.aspx If you ever had to decide if your script is running on a SharePoint Foundation, use this one: // Determine if the host is SharePoint Foundation if (!Srch.U.isSPFSKU()) { }

SharePoint App Deployment fails

Visual Studio does not tell you much if an app deployment fails. Fortunately SharePoint will log more information about the problem that occurred during the app deployment in the ULS-Log. So if you run into the “There were deployment errors.” exception, take a look at the ULS-Log. In this particular case SharePoint didn’t like my JavaScript: App Packaging: CreatePackage: Unexpected exception: There were errors when validating the App package: There were errors when validating the App Package.

The solution for warming up SharePoint

Most SharePoint Farms will have a solution for the long loading time after an Application Pool recycle or iisreset running. There are many different ways to preload websites, so your users have faster load times. So why another solution? There are some questions, that I think have not been dealt with before: Most solutions require some sort of Timer to be started (e.g. a Scheduled Task) When should the warmup occur?

SharePoint 2013 SDK

How could I miss the release of the SharePoint 2013 SDK in November? http://www.microsoft.com/en-us/download/details.aspx?id=30722 Anyway. Finally the non-preview version has been released 🙂

Building a Visual Studio project for SP2010/SP2013 (.NET 3.5/4.0)

In this post I will show you how you can use MSBuild to target your project for .NET 3.5 or .NET 4.0 and use a separate app.config file for each. My Warmup Tool is supposed to work with SP2010 and SP2013. To achieve that compatibility, I have to change the TargetFramework of the project to be able to compile, as well as the app.config so the application uses the desired Framework.

Speed up SharePoint Update Installation

Installing Updates for SharePoint 2013 will take a long time, if you don’t disable some services prior starting the update process by executing the hotfix exe file. To simplify the installation, and speeding it up, you can use a PowerShell script to stop the necessary services, and start the update. http://blogs.msdn.com/b/russmax/archive/2013/04/01/why-sharepoint-2013-cumulative-update-takes-5-hours-to-install.aspx You need to copy the code, and save it as e.g. Install_SharePoint_Update.ps1 in the same folder as the exe file.

SQL Access to Configuration DB required

In many cases you pass an URL string to connect to SharePoint. In my case I wanted to verify the URL by using this code: 1: Uri requestUri; 2: if (!Uri.TryCreate(absoluteUrl, UriKind.Absolute, out requestUri)) 3: throw new ArgumentException(absoluteUrl + " is no a valid URL."); 4: 5: SPWebApplication webApplication = SPWebApplication.Lookup(requestUri); And here comes the “but”. I did not know that the account, which is executing the code, needs permissions to the Configuration Database!