Demo script for Docker in Azure against Linux and Windows containers

These are the overall steps I followed in order to create a Docker demo in Azure, both against Linux and Windows containers. They are not very detailed, mostly because on the Windows side things are in preview. But the pointers should help. Basically, steps allow you to install Docker client in Windows, setup a Linux…


Dynamics CRM 2011: restricting multiple attachments to an entity’s Notes

Requirement was very simple: to be able to add a single document to the notes control of an entity – but no more than one document. There may be a more elegant way to accomplish this, but the way I found was to go to customize the entity’s form configure Tab to open when the…


SharePoint: To Update or not to Update?

Based on Update-SPSolution reference, The Update-SPSolution cmdlet upgrades a deployed SharePoint solution in the farm. Use this cmdlet only if a new solution contains the same set of files and features as the deployed solution. If files and features are different, the solution must be retracted and redeployed by using the Uninstall-SPSolution and Install-SPSolution cmdlets,…


Creating Visual Studio Templates

This article explains how to create Visual Studio project and item templates not from scratch, but starting from prototypes that model the things we want to create with those templates. For more info, go here. 1. Creating Prototype Projects or Items First of all, create the piece (project or item) that resembles the thing you…


Custom Single Sign-On Scenario in SharePoint 2010

  Here’s the scenario: a user navigates to a site whose homepage includes a link to the SharePoint 2010 site. Goal is, user gets into SharePoint 2010 site with no credentials prompt. Both source and destination sites use SQL as the membership repository. Easy, right? First implementation was with an http module, getting the SQL…


PowerShell script for generating a Visual Studio profile

  Idea is to start the following script and, at the same time, run a Visual Studio load test against that same web app. If everything works well, at the exit of the script you should end up with a Visual Studio profile (.vsp) that you can analyze. It requires Visual Studio 2010 Performance Tools…


Utility method to get SharePoint 2010 blog posts and their comments

Say no more. Here it is. Self-explanatory.         public class Post        {            public string Title;            public string Body;            public DateTime Published;            public IEnumerable<Comment> Comments;        }         public class Comment        {            public string Title;            public string Body;            public string Author;            public DateTime Created;        }         static IEnumerable<Post> GetBlogPosts()        {            // TODO: get blog’s site collection’s url           …


ScriptLink not accepting a query string :-(

  A typical practice for performance is to add a revision tag (e.g., “file.js?rev=123”) to .js files so a new build, hence a new revision, brings the file to the browser cache. Tried doing that with ScriptLink’s? No way. Issue is, due to the processing ScriptLink goes through, we cannot add revision to those files….


Working-around “SocialCommentWebPart Title property not working”

  A client recently hit the issue described in this post, SocialCommentWebPart Title property not working. Basically, the Title set in the person.aspx to the SocialCommentWebPart is not being honored e.g., <SPSWC:SocialCommentWebPart Title=”New Title” …> One workaround I found is to edit the web part in shared mode and set its title. Because this was needed…


C# code for configuring “Navigation Editing and Sorting”

  Here’s some code for doing what the title states. It deletes whatever is there, then adds a couple of global and current navigation nodes respectively. string siteUrl = “http://server/sites/blank/default.aspx”; using (SPSite site = new SPSite(siteUrl)) {     PublishingWeb pw = PublishingWeb.GetPublishingWeb(site.RootWeb);     int count = pw.Navigation.GlobalNavigationNodes.Count;     for (int i = 0; i <…