Setting List Item Permissions Programatically in WSS 3.0/MOSS 2007

[update: a quick review by one of our SDETs resulted in some good suggestions to make the code below more useable, and I’ve added them to the code below (1.  Using GetByType to return the Role Definition rather than specifying the name as a string, thereby working in localized versions other than en-us and 2.  checking for unique…


Using ASP.NET 2.0 Web Resources in WebParts

[wait…is this a (*gulp*) technical post?  sheesh…when’s the last time I actually posted dev/technical content?  I was shocked to find that it was March 2005, when I posted three fairly useful items — more than a year ago!  Well, then…let’s get going, and let’s get something started, eh?] Web Resources Way back in the far-distant…


On Site Definitions, or How I Learned to Stop Worrying and Love KB 898631

By now, the commotion surrounding KB 898631 has died down somewhat, after an inital explosion of commentary.  Serge’s first post seemed to be the initial spark that lit the tinder, and I suspect that his was but the most immediately recognizable voice and certainly the loudest, where many other voices and opinions remain OTW (off-the-web)…


Posts from the Past

When switched from Scott Watermasysk’s .Text to Community Server for blogging, much of the formatting of my previous posts was completely crushed, as was the ability to control which posts appeared on the front page of my blog.  So, to work around the latter while still allowing the former to be viewable even in…





CopyCat: Using Built-in WebServices to Copy Document Library Permissions Across Servers

  Here’s a sample console application written in C# which will copy the permissions from one document library to another using the built-in Permissions.asmx WebService.  Note that this sample does not account for cross-domain use, etc.  This will *only* work if the same users exist on the destination.  Overall, this is a fairly rough sample,…


Alert Me: Parameters Passed to SearchAlertType.GetAlertCreationLink()

  The SDK documents the GetAlertCreationLink() method as part of every class in the Microsoft.SharePoint.Portal.Alerts namespace.  However, if we want to utilize this method in some way — for example, to generate our own “Alert Me” link on a custom search page — the documentation is not quite sufficient.  Here’s how the SDK defines the…


Finding Ghosts: Programmatically Determining Ghosted/Unghosted State

  First, some terminology.  The terms “ghosted” and “unghosted” get thrown around a lot when talking about SharePoint site definitions, and all too often, they are used incorrectly.  Here’s the deal:   Ghosted:  a ghosted page is one that is read directly from the site definition on the filesystem. Unghosted:  an unghosted page is one…


Drawing the Curtain: Removing Access to the Site Settings Page for non-Administrative Users

  NOTE:  In this article, I discuss making some changes to SharePoint which are unsupported by Microsoft.  As an employee within the Support realm, I want to stress that the CheckPermissions() solution below is currently unsupported by Microsoft — if you make the change, you are on your own.  🙂  That said, I have gone…


What’s on the Menu? – How to Remove Items from a Document Library Drop-down Menu

  The SDK includes documentation explaining how to create a custom Jscript file that can override the default functions that create items in the cute little drop-down menu associated with list items.  For example, the drop-down below is for a PowerPoint presentation in a WSS document library:   The SDK describes how to override a…