Kirk Evans Blog

.NET From a Markup Perspective

Consolidate SharePoint 2010 Application Pools

Working with a customer, we saw that they had 20 or so web application pools, each with 1 web application each.  The software boundary for SharePoint 2010 is to have no more than 10 web application pools.  Because each application pool can have multiple web applications assigned to it, and easy fix is to just… Read more

Extract a WSP Solution from SharePoint 2010

This post shows how to download a WSP from SharePoint 2010 using PowerShell. Background A customer of mine had a scenario where they needed to download a WSP from SharePoint 2010.  In the Central Administration screen, a link is not available for you to download the WSP solution. Likewise, with stsadm, there’s not a command… 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

Add Microsoft.SharePoint.PowerShell Snap-In to All PowerShell Windows

This post will show you how to ensure Add-PSSnapin "Microsoft.SharePoint.PowerShell" has been executed in all PowerShell windows. Background I have been doing a lot of work in PowerShell lately, and found myself frequently in the PowerShell ISE window writing scripts.  I was constantly adding the line Add-PSSnapin "Microsoft.SharePoint.PowerShell" at the top of every script I… 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

Capturing a Memory Dump Using DebugDiag 1.2

In previous posts, I talked about using WinDBG to debug.  Another incredibly handy tool to have at your disposal is the Debug Diagnostic Tool, or DebugDiag 1.2.  This tool can be used to automatically capture a memory dump when an exception occurs.  To understand some of the tools at your disposal to troubleshoot issues, see… 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

STSADM Crashes After In-Place Upgrade to SharePoint 2010

I recently performed an in-place upgrade of SharePoint 2007 to SharePoint 2010, and the upgrade appeared successful.  I tried to run a few STSADM commands and got the following: System.MissingMethodException: Method not found: ‘Void Microsoft.SharePoint.SPRequestManager.Dispose()’. at Microsoft.SharePoint.StsAdmin.SPStsAdmin.Main(String[] args) After a few moments of panic and a quick search, I found a post that gave me… Read more