Kirk Evans Blog

.NET From a Markup Perspective

How I Became a SharePoint 2010 MCM

I recently attained the Microsoft Certified Master for SharePoint 2010 certification.  I have long wanted to write about the experience, but honestly didn’t know how to begin.  After quite a few conversations with friends and colleagues, I thought I would share some insight about the process.  I am not writing this to dissuade you from… Read more

Querying Active Directory Using Principal Extensions in System.DirectoryServices.AccountManagement

I recently had a project where I needed to query the extensionAttribute1 – extensionAttribute15 attributes for users from Active Directory.  I’ve already written about how to query Active Directory using System.DirectoryServices.DirectoryEntry.  In that post, a reader named Marc suggested I look at the new System.DirectoryServices.AccountManagement namespace, so I decided to challenge myself and create a… Read more

SharePoint 2010 CAML List Joins

This post demonstrates how to use the JOIN syntax in CAML. A customer pinged me asking about how to write a JOIN query in CAML.  Honestly, I haven’t done this since in a long time, so it took awhile to shake off the cobwebs.  I tried to make things explicit and easy to reproduce in… Read more

Playing with SharePoint 2010 MUI

This post shows how to set up a SharePoint environment to explore the multilingual user interface (MUI).  Background I admit to being a typical American.  When I write applications, I hardly ever use resource files to support any language other than English.  My friend Derek Noonan sent me this map that makes me laugh (“Here… Read more

Create DNS Entries From a File

This post will show how to create DNS entries from a file using the DNSCmd.exe tool. Background I have a kind of edge case that I am trying to troubleshoot for my customer.  They have a lot of sub-companies, and they created a web application per company.  Fast forward a few years, they now have… Read more

Set IIS Log Fields with C#

This post shows how to set the log fields for IIS web sites programmatically.  Code is attached at the end of the post. Background I have a customer that has many web applications, and we need to set the IIS log fields to do some investigation.  James Blackwell posted a great sample of how to… Read more

Making The Case for Async Web Parts

This post will show how to make a call to HttpWebRequest asynchronously from a web part and wait on the result or time out. Years ago, I was fortunate to meet Jeff Richter and attend a session he gave on .NET performance.  He discussed I/O completion ports and showed why any calls from an ASP.NET… Read more

Get Social Data from SharePoint via Web Service

I am working on a project to create newsletters to send to my customers, and experimenting with a few ways to collect the information so that I can easily author the newsletter later.  One way that I am experimenting with is to use the Tagging feature of SharePoint 2010.  As I visit different web sites… Read more

Programmatically Creating a SharePoint Content Type

I have been working on a project that requires creating a content type programmatically.  Admittedly, it took me awhile to figure it out.  You can create a content type for SharePoint declaratively in a feature using XML similar to the following: <?xml version="1.0" encoding="utf-8"?> <Elements Id="2fdb55a0-75c1-4ad4-b709-82b2e1393f34" xmlns=""> <ContentType ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2 007948130EC3DB064584E219954237AF39 0075425CE93BDC404F8B042629FC235785" Name="TermsAndConditionsType" Group="Custom Content Types"… Read more

User Controls and Server Controls in SharePoint

ASP.NET developers have enjoyed using user controls and server controls in their development since ASP.NET was created.  This post talks about user controls and server controls and shows how to implement them in SharePoint. User Controls A user control is a control that is associated with a .ASCX extension and was originally intended for a… Read more