<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>mylifeinaminute.com</title>
	<atom:link href="http://www.mylifeinaminute.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mylifeinaminute.com</link>
	<description>You can learn a lot in a minute</description>
	<pubDate>Sat, 16 Aug 2008 13:34:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Netflix Shipping Back Online</title>
		<link>http://www.mylifeinaminute.com/2008/08/16/netflix-shipping-back-online/</link>
		<comments>http://www.mylifeinaminute.com/2008/08/16/netflix-shipping-back-online/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 13:33:28 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
		
		<category><![CDATA[Netflix]]></category>

		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=110</guid>
		<description><![CDATA[Netflix seems to have found the cure for its current shipping problems and has started shipping again.  And once again, they are also offering customer credits.  Even better than the last time they went down, this time the credits are 15%.  Let&#8217;s hope they can keep the back-end systems up this time.




]]></description>
			<content:encoded><![CDATA[<p>Netflix seems to have found the cure for its <a title="Netflix DVD Shipments Delayed" href="/2008/08/14/netflix-dvd-shipments-delayed/">current shipping problems</a> and has started shipping again.  And once again, they are also offering customer credits.  Even better than the <a title="Netflix Was Down" href="/2008/03/26/netflix-was-down/">last time</a> they went down, this time the credits are 15%.  Let&#8217;s hope they can keep the back-end systems up this time.<br />
<a href="/images/Netflix/netflix_credit_15.jpg" target="_blank"><img class="alignnone" title="Netflix 15% Credit" src="/images/Netflix/netflix_credit_15_sm.jpg" alt="" width="350" height="255" /></a></p>
<p><map name='google_ad_map_110_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/110?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_110_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=110&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F08%2F16%2Fnetflix-shipping-back-online%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/08/16/netflix-shipping-back-online/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SPWeb.SiteGroups Versus SPWeb.Groups</title>
		<link>http://www.mylifeinaminute.com/2008/08/14/spwebsitegroups-versus-spwebgroups/</link>
		<comments>http://www.mylifeinaminute.com/2008/08/14/spwebsitegroups-versus-spwebgroups/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 19:33:45 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Office]]></category>

		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Visual Studio 2005]]></category>

		<category><![CDATA[Visual Studio 2008]]></category>

		<category><![CDATA[Windows SharePoint Services]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=108</guid>
		<description><![CDATA[Tyler Holmes has an old post on his blog that I felt is with worth mentioning as I faced this problem on a recent project and it is not the most intuitive behavior (but with SharePoint, what is?).
SPWeb.Groups vs. SPWeb.SiteGroups [Tyler Holmes]



]]></description>
			<content:encoded><![CDATA[<p><a title="Tyler Holmes Blog" href="http://blog.tylerholmes.com/">Tyler Holmes</a> has an old post on his blog that I felt is with worth mentioning as I faced this problem on a recent project and it is not the most intuitive behavior (but with <a title="SharePoint 2007" href="/category/microsoft/office/sharepoint-server/">SharePoint</a>, what is?).</p>
<p><a title="SPWeb.Groups vs. SPWeb.SiteGroups" href="http://blog.tylerholmes.com/2007/09/spwebgroups-vs-spwebsitegroups.html">SPWeb.Groups vs. SPWeb.SiteGroups</a> [Tyler Holmes]</p>
<p><map name='google_ad_map_108_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/108?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_108_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=108&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F08%2F14%2Fspwebsitegroups-versus-spwebgroups%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/08/14/spwebsitegroups-versus-spwebgroups/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Netflix DVD Shipments Delayed</title>
		<link>http://www.mylifeinaminute.com/2008/08/14/netflix-dvd-shipments-delayed/</link>
		<comments>http://www.mylifeinaminute.com/2008/08/14/netflix-dvd-shipments-delayed/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 13:20:40 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
		
		<category><![CDATA[Netflix]]></category>

		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=103</guid>
		<description><![CDATA[Netflix is currently experiencing difficulties with their shipping system and DVD shipments have been delayed.  Aaaggghhh!  How am I supposed to fill my Sunny In Philadelphia fix now?




]]></description>
			<content:encoded><![CDATA[<p><a title="Netflix" href="/category/netflix/">Netflix</a> is currently experiencing difficulties with their shipping system and DVD shipments have been delayed.  Aaaggghhh!  How am I supposed to fill my <a title="It's Always Sunny In Philadelphia" href="http://www.fxnetworks.com/shows/originals/sunny/">Sunny In Philadelphia</a> fix now?</p>
<p><a href="/images/Netflix/netflix_system_down.jpg" target="_blank"><img class="alignnone" title="Netflix Shipping Delayed" src="/images/Netflix/netflix_system_down_sm.jpg" alt="Netflix Shipping Delayed" width="380" height="264" /></a></p>
<p><map name='google_ad_map_103_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/103?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_103_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=103&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F08%2F14%2Fnetflix-dvd-shipments-delayed%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/08/14/netflix-dvd-shipments-delayed/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Creating and Populating Cross-Site Groups in SharePoint</title>
		<link>http://www.mylifeinaminute.com/2008/08/11/creating-and-populating-cross-site-groups-in-sharepoint/</link>
		<comments>http://www.mylifeinaminute.com/2008/08/11/creating-and-populating-cross-site-groups-in-sharepoint/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 11:00:05 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Office]]></category>

		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Visual Studio 2005]]></category>

		<category><![CDATA[Visual Studio 2008]]></category>

		<category><![CDATA[Windows SharePoint Services]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=96</guid>
		<description><![CDATA[The following is a method to create new cross-site groups in SharePoint 2007/WSS 3.0.  Along with creating the group, users are also added to the group based on selections from a PeopleEditor control (better known as the People Picker).



private enum GroupType
{
	Owners,
	Members,
	Visitors
}

public SPWeb CurrentWeb
{
	get { return SPContext.GetContext(HttpContext.Current).Web; }
}

private void CreateAndPopulateGroup(string groupName, GroupType groupType, bool createNewGroup)
{
	// [...]]]></description>
			<content:encoded><![CDATA[<p>The following is a method to create new cross-site groups in SharePoint 2007/WSS 3.0.  Along with creating the group, users are also added to the group based on selections from a PeopleEditor control (better known as the People Picker).</p>
<pre>
<pre name="code" class="c-sharp">

private enum GroupType
{
	Owners,
	Members,
	Visitors
}

public SPWeb CurrentWeb
{
	get { return SPContext.GetContext(HttpContext.Current).Web; }
}

private void CreateAndPopulateGroup(string groupName, GroupType groupType, bool createNewGroup)
{
	// Create the group
	if (createNewGroup)
	{
		SPMember owner = SPContext.GetContext(HttpContext.Current).Web.CurrentUser;
		this.CurrentWeb.SiteGroups.Add(groupName, owner, null, groupName);
		SPGroup grp = this.CurrentWeb.SiteGroups[groupName];
		switch (groupType)
		{
			case GroupType.Owners:
				this.CurrentWeb.AssociatedOwnerGroup = grp;
				break;
                    	case GroupType.Members:
				this.CurrentWeb.AssociatedMemberGroup = grp;
				break;
			case GroupType.Visitors:
				this.CurrentWeb.AssociatedVisitorGroup = grp;
				break;
		}
		SPRoleDefinitionCollection roleDef = this.CurrentWeb.RoleDefinitions;
		SPRoleAssignmentCollection roleAssigns = this.CurrentWeb.RoleAssignments;
		SPRoleAssignment roleAssign = new SPRoleAssignment(grp);
		SPRoleDefinitionBindingCollection definitions = roleAssign.RoleDefinitionBindings;
		switch (groupType)
		{
			case GroupType.Owners:
				definitions.Add(roleDef[&quot;Full Control&quot;]); //Could be Contribute or Read
				break;
			case GroupType.Members:
				definitions.Add(roleDef[&quot;Contribute&quot;]);
				break;
			case GroupType.Visitors:
				definitions.Add(roleDef[&quot;Read&quot;]);
			break;
		}
		roleAssigns.Add(roleAssign);
		this.CurrentWeb.Update();
	}
	else // use an existing group
	{
		string grpName = string.Empty;
		// find the group reference
		foreach (SPGroup group in this.CurrentWeb.SiteGroups)
		{
			switch (groupType)
			{
				case GroupType.Owners:
					if (group.ID.ToString() == this.ddlOwnerGroup.SelectedValue)
					{
						grpName = group.Name;
					}
					break;
				case GroupType.Members:
					if (group.ID.ToString() == this.ddlMemberGroup.SelectedValue)
					{
						grpName = group.Name;
					}
					break;
				case GroupType.Visitors:
					if (group.ID.ToString() == this.ddlVisitorGroup.SelectedValue)
					{
						grpName = group.Name;
					}
					break;
			}
		}
		SPGroup grp = this.CurrentWeb.SiteGroups[grpName];
		switch (groupType)
		{
			case GroupType.Owners:
				this.CurrentWeb.AssociatedOwnerGroup = grp;
				break;
			case GroupType.Members:
				this.CurrentWeb.AssociatedMemberGroup = grp;
				break;
			case GroupType.Visitors:
				this.CurrentWeb.AssociatedVisitorGroup = grp;
				break;
		}

		SPRoleDefinitionCollection roleDef = this.CurrentWeb.RoleDefinitions;
		SPRoleAssignmentCollection roleAssigns = this.CurrentWeb.RoleAssignments;
		SPRoleAssignment roleAssign = new SPRoleAssignment(grp);
		SPRoleDefinitionBindingCollection definitions = roleAssign.RoleDefinitionBindings;
		switch (groupType)
		{
			case GroupType.Owners:
				definitions.Add(roleDef[&quot;Full Control&quot;]); //Could be Contribute or Read
				break;
			case GroupType.Members:
				definitions.Add(roleDef[&quot;Contribute&quot;]);
				break;
			case GroupType.Visitors:
				definitions.Add(roleDef[&quot;Read&quot;]);
				break;
		}
		roleAssigns.Add(roleAssign);
		this.CurrentWeb.Update();
	}

	SPUserCollection grpUsers = this.CurrentWeb.SiteGroups[groupName].Users;

	// Add the users to the group;
	System.Collections.ArrayList entities = new System.Collections.ArrayList();

	switch (groupType)
	{
		case GroupType.Owners:
			entities = pickerOwnerGroupMembers.Entities;
			break;
		case GroupType.Members:
			entities = pickerMemberGroupMembers.Entities;
			break;
		case GroupType.Visitors:
			entities = pickerVisitorGroupMembers.Entities;
			break;
	}

	foreach (PickerEntity entity in entities)
	{
		// add the user only if they do not exist already
		try
		{
			SPUser user = grpUsers[entity.Key];
		}
		catch (SPException exc)
		{
			// user was not found, continue to add the user
			this.CurrentWeb.SiteGroups[groupName].Users.Add(entity.Key,
			Convert.ToString(entity.EntityData[&quot;Email&quot;]),
			Convert.ToString(entity.EntityData[&quot;DisplayName&quot;]),
			string.Empty);
		}
	}
}
</pre>
</pre>
<p><map name='google_ad_map_96_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/96?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_96_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=96&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F08%2F11%2Fcreating-and-populating-cross-site-groups-in-sharepoint%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/08/11/creating-and-populating-cross-site-groups-in-sharepoint/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adding a Domain Security Group to a SharePoint Site Programatically</title>
		<link>http://www.mylifeinaminute.com/2008/08/08/adding-a-domain-security-group-to-a-sharepoint-site-programatically/</link>
		<comments>http://www.mylifeinaminute.com/2008/08/08/adding-a-domain-security-group-to-a-sharepoint-site-programatically/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 11:00:37 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Office]]></category>

		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Visual Studio 2005]]></category>

		<category><![CDATA[Visual Studio 2008]]></category>

		<category><![CDATA[Windows SharePoint Services]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=92</guid>
		<description><![CDATA[To add a Windows Active Directory Security Group to a SharePoint 2007 or WSS 3.0 site, do the following:



SPContext.GetContext(HttpContext.Current).Web.AllUsers.Add(&#34;domain\\Group&#34;, &#34;&#34;, &#34;&#34;, &#34;domain\\Group&#34; );



To add your group to an existing site role (Full Control, Contribute, Read, etc.), use the following:



SPWeb cWeb = SPContext.GetContext(HttpContext.Current).Web;
SPUser user = cWeb .AllUsers[&#34;domain\\Group&#34;];
SPGroup grouptoadd = cWeb .Groups[&#34;Full Control&#34;];
grouptoadd.AddUser(user);





]]></description>
			<content:encoded><![CDATA[<p>To add a Windows Active Directory Security Group to a SharePoint 2007 or WSS 3.0 site, do the following:</p>
<pre>
<pre name="code" class="c-sharp">

SPContext.GetContext(HttpContext.Current).Web.AllUsers.Add(&quot;domain\\Group&quot;, &quot;&quot;, &quot;&quot;, &quot;domain\\Group&quot; );
</pre>
</pre>
<p>
To add your group to an existing site role (Full Control, Contribute, Read, etc.), use the following:</p>
<pre>
<pre name="code" class="c-sharp">

SPWeb cWeb = SPContext.GetContext(HttpContext.Current).Web;
SPUser user = cWeb .AllUsers[&quot;domain\\Group&quot;];
SPGroup grouptoadd = cWeb .Groups[&quot;Full Control&quot;];
grouptoadd.AddUser(user);
</pre>
</pre>
<p><map name='google_ad_map_92_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/92?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_92_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=92&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F08%2F08%2Fadding-a-domain-security-group-to-a-sharepoint-site-programatically%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/08/08/adding-a-domain-security-group-to-a-sharepoint-site-programatically/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Creating a new SPWeb through Code</title>
		<link>http://www.mylifeinaminute.com/2008/08/07/creating-a-new-spweb-through-code/</link>
		<comments>http://www.mylifeinaminute.com/2008/08/07/creating-a-new-spweb-through-code/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 16:35:21 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Office]]></category>

		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Visual Studio 2005]]></category>

		<category><![CDATA[Visual Studio 2008]]></category>

		<category><![CDATA[Windows SharePoint Services]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=88</guid>
		<description><![CDATA[To create a new SPWeb (a new site or workspace) and add it to the navigation (Top and QuickLaunch), you can use the following snippet:



SPWeb newWeb;

newWeb = SPContext.GetContext(HttpContext.Current).Web.Webs.Add(strURL, //URL (&#34;foo&#34; would generate example.com/foo)
	strTitle, //Title
	strDescription, //Description
	(uint)1033, // English
	strTemplate, // Template type
	bUseUnique, // Use unique permissions?
	false); // Convert existing web?

newWeb.Navigation.UseShared = (someCondition) ? true : false;

newWeb.Update();

if (newWeb.Navigation.UseShared)
{
	Microsoft.SharePoint.Navigation.SPNavigationNode [...]]]></description>
			<content:encoded><![CDATA[<p>To create a new SPWeb (a new site or workspace) and add it to the navigation (Top and QuickLaunch), you can use the following snippet:</p>
<pre>
<pre name="code" class="c-sharp">

SPWeb newWeb;

newWeb = SPContext.GetContext(HttpContext.Current).Web.Webs.Add(strURL, //URL (&quot;foo&quot; would generate example.com/foo)
	strTitle, //Title
	strDescription, //Description
	(uint)1033, // English
	strTemplate, // Template type
	bUseUnique, // Use unique permissions?
	false); // Convert existing web?

newWeb.Navigation.UseShared = (someCondition) ? true : false;

newWeb.Update();

if (newWeb.Navigation.UseShared)
{
	Microsoft.SharePoint.Navigation.SPNavigationNode pNode = new Microsoft.SharePoint.Navigation.SPNavigationNode(newWeb.ParentWeb.Title, newWeb.ParentWeb.Url.Replace(newWeb.ParentWeb.Site.Url, string.Empty));
	Microsoft.SharePoint.Navigation.SPNavigationNode cNode = new Microsoft.SharePoint.Navigation.SPNavigationNode(newWeb.Title, strURL);
	newWeb.ParentWeb.Navigation.TopNavigationBar.AddAsLast(cNode);

	// add to quick launch
	Microsoft.SharePoint.Navigation.SPNavigationNodeCollection quickLaunch = newWeb.ParentWeb.Navigation.QuickLaunch;
	foreach (Microsoft.SharePoint.Navigation.SPNavigationNode node in quickLaunch)
	{
		if (node.Title == &quot;Sites&quot;)
		{
			node.Children.AddAsLast(cNode);
			break;
		}
	}
}

newWeb.Dispose();
</pre>
</pre>
<p><map name='google_ad_map_88_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/88?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_88_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=88&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F08%2F07%2Fcreating-a-new-spweb-through-code%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/08/07/creating-a-new-spweb-through-code/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Note On Modifying the SharePoint Databases&#8230;</title>
		<link>http://www.mylifeinaminute.com/2008/08/06/a-note-on-modifying-the-sharepoint-databases/</link>
		<comments>http://www.mylifeinaminute.com/2008/08/06/a-note-on-modifying-the-sharepoint-databases/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 15:01:10 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
		
		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Office]]></category>

		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Windows SharePoint Services]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=85</guid>
		<description><![CDATA[In a recent post, I discussed manually removing servers in a MOSS 2007 farm.  That post dealt with the sticky issue of directly modifing the SharePoint configuration database.  Microsoft has recently published a knowledge base article (KB841057) detailing their stance on supporting situations that involve directly modifying ANY SharePoint or WSS database.
It is always important [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent post, I discussed <a title="Manually removing servers in MOSS 2007" href="/2008/07/23/manually-removing-servers-in-moss-2007/">manually removing servers in a MOSS 2007 farm</a>.  That post dealt with the <span style="text-decoration: line-through;">sticky</span> issue of directly modifing the SharePoint configuration database.  Microsoft has recently published a <a href="http://support.microsoft.com/kb/841057/en-us">knowledge base article</a> (<a href="http://support.microsoft.com/kb/841057/en-us">KB841057</a>) detailing their stance on supporting situations that involve directly modifying ANY SharePoint or WSS database.</p>
<p>It is always important to realize the impact such changes can have, as there are times when it will be necessary to contact Microsoft for aid with your SharePoint environment.</p>
<p><map name='google_ad_map_85_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/85?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_85_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=85&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F08%2F06%2Fa-note-on-modifying-the-sharepoint-databases%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/08/06/a-note-on-modifying-the-sharepoint-databases/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Altering an Announcements Web Part Character Limit</title>
		<link>http://www.mylifeinaminute.com/2008/07/24/altering-an-announcements-web-part-character-limit/</link>
		<comments>http://www.mylifeinaminute.com/2008/07/24/altering-an-announcements-web-part-character-limit/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 12:00:52 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
		
		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Office]]></category>

		<category><![CDATA[SharePoint Designer]]></category>

		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Windows SharePoint Services]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=78</guid>
		<description><![CDATA[To alter the character limit of an Announcements List web part (in Summary View), there is an attribute that must be set through SharePoint Designer on the page that contains the web part.  Perform a search for the string &#8220;Limit Len=&#8221; on the page in question and alter the value to reflect the character [...]]]></description>
			<content:encoded><![CDATA[<p>To alter the character limit of an Announcements List web part (in Summary View), there is an attribute that must be set through SharePoint Designer on the page that contains the web part.  Perform a search for the string &#8220;Limit Len=&#8221; on the page in question and alter the value to reflect the character limit you would like.</p>
<p><strong>Note</strong>:  The default character limit attribute is set to 250 characters.</p>
<p><map name='google_ad_map_78_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/78?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_78_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=78&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F07%2F24%2Faltering-an-announcements-web-part-character-limit%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/07/24/altering-an-announcements-web-part-character-limit/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Manually removing servers in MOSS 2007</title>
		<link>http://www.mylifeinaminute.com/2008/07/23/manually-removing-servers-in-moss-2007/</link>
		<comments>http://www.mylifeinaminute.com/2008/07/23/manually-removing-servers-in-moss-2007/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 15:11:46 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
		
		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Office]]></category>

		<category><![CDATA[SQL Server 2005]]></category>

		<category><![CDATA[Sharepoint Server]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=71</guid>
		<description><![CDATA[There are times when servers are physically removed from your farm environment before they are removed from the SharePoint farm instance.  When this happens, SharePoint can have orphaned data remaining in its database making it impossible to remove the server through Central Administration without some manual intervention.
Note:  It is important to remove these orphaned servers [...]]]></description>
			<content:encoded><![CDATA[<p>There are times when servers are physically removed from your farm environment before they are removed from the SharePoint farm instance.  When this happens, SharePoint can have orphaned data remaining in its database making it impossible to remove the server through Central Administration without some manual intervention.</p>
<p><span style="color: #ff0000;"><strong>Note</strong></span>:  It is important to remove these orphaned servers as SharePoint will attempt to deploy sites (if configured as a Web Application Server) and other packages (such as contents of a solution package) to the orphaned server and permanently error out making the administration of your farm more difficult as you continue to add functionality.</p>
<p>When you attempt to remove the orphaned server, you will receive an error similar to the following:</p>
<p><span style="color: #ff0000;">Remove failed: An object in the SharePoint administrative framework depends on other objects which do not exist. Ensure that all of the objects dependencies are created and retry this operation.</span></p>
<p><span style="color: #ff0000;">(Remove failed: Operation aborted (Exception from HRESULT: 0×80000007):</span></p>
<p><span style="color: #ff0000;">The conflict occurred in database &#8220;SharePoint_Config&#8221;, table &#8220;dbo.Objects&#8221;, column ‘ParentId&#8217;.  An object in the SharePoint administrative framework depends on other objects which do not exist.</span></p>
<p>This error is usually due to an orphaned reference to the Single Sign-On Service.  To fix this problem, you can do the following:</p>
<p><span style="color: #ff0000;"><strong>Note: This requires manual editing of the SharePoint configuration database.  Any manual changes made to this database that result in an error will NOT be supported by Microsoft.</strong></span></p>
<pre>
<pre name="code" class="sql">

select * from objects where Name like &#039;%&lt;SERVER NAME&gt;%&#039;
</pre>
</pre>
<p>
Use the output of that statement to obtain the ID (GUID) of the orphaned server.</p>
<pre>
<pre name="code" class="sql">

select * from dependencies where objectid = &#039;&lt;GUID&gt;&#039;
</pre>
</pre>
<p>
The row returned will allow you to see the relationship (Object &#8211;> Dependency) that is preventing the removal of the orphaned server.  It is most likely that if you look up the Dependent ID in the Objects table, you will see that it is a reference to the &#8220;SSOSRV&#8221; service (Single Sign-On Service).  </p>
<p>After making sure you have found the correct entry, delete the item from the Dependencies table.</p>
<pre>
<pre name="code" class="sql">

delete from dependencies where objectid = &#039;&lt;GUID&gt;&#039;
</pre>
</pre>
<p>
At this point, you will be able to remove your orphaned server from your farm (no IISRESET required).</p>
<p><map name='google_ad_map_71_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/71?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_71_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=71&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F07%2F23%2Fmanually-removing-servers-in-moss-2007%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/07/23/manually-removing-servers-in-moss-2007/feed/</wfw:commentRss>
		</item>
		<item>
		<title>An Active Directory Helper Class</title>
		<link>http://www.mylifeinaminute.com/2008/07/23/an-active-directory-helper-class/</link>
		<comments>http://www.mylifeinaminute.com/2008/07/23/an-active-directory-helper-class/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 13:26:22 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Visual Studio 2005]]></category>

		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=68</guid>
		<description><![CDATA[The following is an Active Directory helper class, allowing for actions such as resetting a users&#8217; password, or properties pertaining to a users&#8217; account.



using System;
using System.Data;
using System.DirectoryServices;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace MyLifeInAMinute.Base.Utiltities
{
    public class ActiveDirectoryHelper
    {
        /// &#38;lt;summary&#38;gt;
  [...]]]></description>
			<content:encoded><![CDATA[<p>The following is an Active Directory helper class, allowing for actions such as resetting a users&#8217; password, or properties pertaining to a users&#8217; account.</p>
<pre>
<pre name="code" class="c-sharp">

using System;
using System.Data;
using System.DirectoryServices;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace MyLifeInAMinute.Base.Utiltities
{
    public class ActiveDirectoryHelper
    {
        /// &amp;lt;summary&amp;gt;
        /// returns a string (i.e. LDAP://example.dc.local
        /// &amp;lt;/summary&amp;gt;
        private string LDAPConnection
        {
            get { return System.Configuration.ConfigurationManager.AppSettings[&quot;LDAPConnection&quot;].ToString(); }
        }

        /// &amp;lt;summary&amp;gt;
        /// returns a string contain the username for the LDAP connection (preferably admin level so we
        /// can reset passwords)
        /// &amp;lt;/summary&amp;gt;
        private string LDAPAdminPassword
        {
            get { return System.Configuration.ConfigurationManager.AppSettings[&quot;LDAPAdminPass&quot;].ToString(); }
        }

        /// &amp;lt;summary&amp;gt;
        /// returns a string containing the password for the LDAP connection
        /// &amp;lt;/summary&amp;gt;
        private string LDAPAdminUserName
        {
            get { return System.Configuration.ConfigurationManager.AppSettings[&quot;LDAPAdmin&quot;].ToString(); }
        }

        private DirectoryEntry GetDirectoryObject()
        {
            DirectoryEntry oDE;
            oDE = new DirectoryEntry(this.LDAPConnection, this.LDAPAdminUserName, this.LDAPAdminPassword, AuthenticationTypes.Secure);
            return oDE;
        }

        public SearchResultCollection GetAllUsers()
        {
            DirectoryEntry de = GetDirectoryObject();
            DirectorySearcher deSearch = new DirectorySearcher();
            deSearch.SearchRoot = de;

            deSearch.Filter = &quot;(&amp;amp;(objectClass=user))&quot;;
            deSearch.SearchScope = SearchScope.Subtree;
            SearchResultCollection results = deSearch.FindAll();

            return results;
        }

        public DirectoryEntry GetUser(string propertyName, string propertyValue)
        {
            DirectoryEntry de = GetDirectoryObject();
            DirectorySearcher deSearch = new DirectorySearcher();
            deSearch.SearchRoot = de;

            deSearch.Filter = &quot;(&amp;amp;(objectClass=user)(&quot; + propertyName + &quot;=&quot; + propertyValue + &quot;))&quot;;
            deSearch.SearchScope = SearchScope.Subtree;
            SearchResult results = deSearch.FindOne();

            if (!(results == null))
            {
                de = new DirectoryEntry(results.Path, this.LDAPAdminUserName, this.LDAPAdminPassword, AuthenticationTypes.Secure);
                return de;
            }
            else
            {
                return null;
            }
        }

        public void SetProperty(DirectoryEntry de, string PropertyName, string PropertyValue)
        {
            if (PropertyValue != null)
            {
                if (de.Properties.Contains(PropertyName))
                {
                    de.Properties[PropertyName][0] = PropertyValue;
                }
                else
                {
                    de.Properties[PropertyName].Add(PropertyValue);
                }
            }
        }

        public void ChangePassword(string userPath, string userName, string userCurrentPwd, string userNewPwd)
        {
            DirectoryEntry oDE;
            oDE = new DirectoryEntry(userPath, userName, userCurrentPwd, AuthenticationTypes.Secure);

            try
            {
                // Change the password.
                oDE.Invoke(&quot;ChangePassword&quot;, new object[] { userCurrentPwd, userNewPwd });
                oDE.CommitChanges();
                oDE.Close();
            }
            catch (Exception excep)
            {
                throw new Exception(&quot;Error changing password. Reason: &quot; + excep.InnerException);
            }
        }

        public void SetPassword(string userPath, string userPassword)
        {
            DirectoryEntry usr = new DirectoryEntry();
            usr.Path = userPath;
            usr.AuthenticationType = AuthenticationTypes.Secure;
            object[] password = new object[] { userPassword };
            object ret = usr.Invoke(&quot;SetPassword&quot;, password);
            usr.CommitChanges();
            usr.Close();
        }

        public string ToADDateString(DateTime date)
        {
            string year = date.Year.ToString();
            int month = date.Month;
            int day = date.Day;
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(year);
            if (month &amp;lt; 10)
            {
                sb.Append(&quot;0&quot;);
            }
            sb.Append(month.ToString());
            if (day &amp;lt; 10)
            {
                sb.Append(&quot;0&quot;);
            }
            sb.Append(day.ToString());
            sb.Append(&quot;000000.0Z&quot;);
            return sb.ToString();
        }
    }
}
</pre>
</pre>
<p>
Here are a few examples:</p>
<p><strong>Changing a Password</strong></p>
<pre>
<pre name="code" class="c-sharp">

Utiltities.ActiveDirectoryHelper adHelper = new Utiltities.ActiveDirectoryHelper();

System.DirectoryServices.DirectoryEntry de = new System.DirectoryServices.DirectoryEntry();

if (txtuName.Text.Contains(&quot;@&quot;))
	de = adHelper.GetUser(&quot;userPrincipalName&quot;, txtuName.Text);
else
	de = adHelper.GetUser(&quot;sAMAccountName&quot;, txtuName.Text);

if (de != null)
	adHelper.ChangePassword(de.Path, txtuName.Text, txtCurrentPwd.Text, txtNewPwd.Text);
</pre>
</pre>
<p>
<strong>Finding a User Property</strong> (in this case, sAMAccountName)</p>
<pre>
<pre name="code" class="c-sharp">

Utiltities.ActiveDirectoryHelper adHelper = new JonesDay.JDAuthorization.Utiltities.ActiveDirectoryHelper();

System.DirectoryServices.DirectoryEntry de = new System.DirectoryServices.DirectoryEntry();

if (txtuName.Text.Contains(&quot;@&quot;))
	de = adHelper.GetUser(&quot;userPrincipalName&quot;, txtResetuName.Text);
else
	de = adHelper.GetUser(&quot;sAMAccountName&quot;, txtResetuName.Text);

string userName = string.Empty;

foreach (object value in de.Properties[&quot;sAMAccountName&quot;])
{
	userName = Convert.ToString(value);
}
</pre>
</pre>
<p><map name='google_ad_map_68_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/68?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_68_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=68&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F07%2F23%2Fan-active-directory-helper-class%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/07/23/an-active-directory-helper-class/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.730 seconds -->
