<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss 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" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Alonso Robles</title>
	
	<link>http://blogs.importchaos.com/alonsorobles</link>
	<description>technology, academia, and other tidbits from the trenches of a boggled mind</description>
	<pubDate>Wed, 22 Oct 2008 10:58:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/alonsorobles" type="application/rss+xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Falonsorobles" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Falonsorobles" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Falonsorobles" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/alonsorobles" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Falonsorobles" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Falonsorobles" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Falonsorobles" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:browserFriendly>technology, academia, and other tidbits from the trenches of a boggled mind</feedburner:browserFriendly><item>
		<title>The PeopleEditor Class and the Visibility Attribute</title>
		<link>http://feeds.feedburner.com/~r/alonsorobles/~3/428440112/</link>
		<comments>http://blogs.importchaos.com/alonsorobles/2008/10/22/the-peopleeditor-class-and-the-visibility-attribute/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 10:56:19 +0000</pubDate>
		<dc:creator>alonso.robles</dc:creator>
		
		<category><![CDATA[Microsoft Office]]></category>

		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Windows Sharepoint Services]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[moss 2007]]></category>

		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=104</guid>
		<description><![CDATA[When doing custom development for MOSS 2007 or WSS 3.0, the PeopleEditor class can come in handy. However, it seems that it begins misbehaving when the the Visibility attribute is changed from its default value of true. Recently, I had the need to make it disappear and reappear depending on certain conditions in a custom form [...]]]></description>
			<content:encoded><![CDATA[<p>When doing custom development for MOSS 2007 or WSS 3.0, the <a title="PeopleEditor Class (Microsoft.SharePoint.WebControls)" href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.peopleeditor.aspx">PeopleEditor class</a> can come in handy. However, it seems that it begins misbehaving when the the Visibility attribute is changed from its default value of <em>true</em>. Recently, I had the need to make it disappear and reappear depending on certain conditions in a custom form that was developed and I ran into this problem. The work around simply involves using a <em>display</em> style attribute. To make control invisible, set the <em>display</em> style attribute value to <em>none</em>. To make the control visible again, set the <em>display</em> style attribute value back to <em>block</em>.</p>
<p>Here is a sample C# method that I used to make this happen:</p>
<p><code><br />
private void SetPeopleEditorVisibility(ref PeopleEditor pe, bool visible)<br />
{<br />
    if (pe.Style.Keys.Count &gt; 0 &amp;&amp; pe.Style["display"] != null)<br />
    {<br />
        pe.Style.Remove(&#8221;display&#8221;);<br />
    }</p>
<p>    if (visible)<br />
    {<br />
        pe.Style.Add(&#8221;display&#8221;, &#8220;block&#8221;);<br />
    }<br />
    else<br />
    {<br />
        pe.Style.Add(&#8221;display&#8221;, &#8220;none&#8221;);<br />
    }<br />
}</code></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/alonsorobles?a=b042M"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=b042M" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=6LI1m"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=6LI1m" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=84xdM"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=84xdM" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=DVsMm"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=DVsMm" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=lLBdm"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=lLBdm" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=Hd3BM"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=Hd3BM" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/alonsorobles/~4/428440112" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.importchaos.com/alonsorobles/2008/10/22/the-peopleeditor-class-and-the-visibility-attribute/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.importchaos.com/alonsorobles/2008/10/22/the-peopleeditor-class-and-the-visibility-attribute/</feedburner:origLink></item>
		<item>
		<title>Come See Me at the Orange County SharePoint User Group</title>
		<link>http://feeds.feedburner.com/~r/alonsorobles/~3/394590968/</link>
		<comments>http://blogs.importchaos.com/alonsorobles/2008/09/16/come-see-me-at-the-orange-county-sharepoint-user-group/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 22:01:40 +0000</pubDate>
		<dc:creator>alonso.robles</dc:creator>
		
		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[enterprise search]]></category>

		<category><![CDATA[moss 2007]]></category>

		<category><![CDATA[ocspug]]></category>

		<category><![CDATA[sharepoint user group]]></category>

		<category><![CDATA[Windows Sharepoint Services]]></category>

		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=97</guid>
		<description><![CDATA[Tomorrow, September 17th, I will be speaking at the Orange County SharePoint User Group along with Bob Mixon.
Improving SharePoint Search Relevancy through Scopes
6:30pm - 8:00pm - QuickStart, Irvine, CA

Organizations struggle with delivering information within the scope and context of business users needs.  Understanding scope and contextual search needs can be a daunting task.  However, results [...]]]></description>
			<content:encoded><![CDATA[<p>Tomorrow, September 17th, I will be speaking at the Orange County SharePoint User Group along with <a href="http://masteringsharepoint.com/blogs/bobmixon/archive/2008/09/15/i-ll-be-speaking-at-the-orange-county-sharepoint-user-group.aspx">Bob Mixon</a>.</p>
<blockquote><p><strong>Improving SharePoint Search Relevancy through Scopes<br />
</strong>6:30pm - 8:00pm - QuickStart, Irvine, CA</p>
<div>
<div>Organizations struggle with delivering information within the scope and context of business users needs.  Understanding scope and contextual search needs can be a daunting task.  However, results can be dramatically improved through careful planning, architecture, design, and development techniques.</div>
<div> </div>
</div>
<div>In this session, you will learn the techniques and best practices required to deliver a SharePoint solution that supports scoping of information.  We will cover appropriate architecture, design, and configuration techniques then dive into development.  Development topics will include an introduction to search syntax options and the key query classes offered in MOSS, and search object model with a demonstration of executing queries with scope information.</div>
</blockquote>
<div>So if you are in the area, stop by and say hello!</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/alonsorobles?a=rHJYL"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=rHJYL" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=M7Mal"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=M7Mal" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=gROQL"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=gROQL" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=efIQl"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=efIQl" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=GSDWl"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=GSDWl" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=lZmEL"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=lZmEL" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/alonsorobles/~4/394590968" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.importchaos.com/alonsorobles/2008/09/16/come-see-me-at-the-orange-county-sharepoint-user-group/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.importchaos.com/alonsorobles/2008/09/16/come-see-me-at-the-orange-county-sharepoint-user-group/</feedburner:origLink></item>
		<item>
		<title>WSS 3.0 and MOSS 2007 Certification</title>
		<link>http://feeds.feedburner.com/~r/alonsorobles/~3/374504890/</link>
		<comments>http://blogs.importchaos.com/alonsorobles/2008/08/25/wss-30-and-moss-2007-certification/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 18:53:34 +0000</pubDate>
		<dc:creator>alonso.robles</dc:creator>
		
		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Windows Sharepoint Services]]></category>

		<category><![CDATA[certification]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[moss 2007]]></category>

		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=93</guid>
		<description><![CDATA[I often get asked how to get &#8220;SharePoint certified&#8221;. This is actually an easy question to answer since there are four available SharePoint related MCTS certifications from Microsoft. The certifications are:

MCTS: Windows SharePoint Services 3.0 – Configuration via exam 70-631
MCTS: Microsoft Windows SharePoint Services 3.0 – Application Development via exam 70-541
MCTS: Microsoft Office SharePoint Server 2007 – [...]]]></description>
			<content:encoded><![CDATA[<p>I often get asked how to get <em>&#8220;SharePoint certified&#8221;</em>. This is actually an easy question to answer since there are four available SharePoint related <a href="http://www.microsoft.com/learning/mcp/mcts/default.mspx">MCTS certifications from Microsoft</a>. The certifications are:</p>
<ul>
<li><a href="http://www.microsoft.com/learning/mcp/mcts/spservices/config/default.mspx">MCTS: Windows SharePoint Services 3.0 – Configuration</a> via exam 70-631</li>
<li><a href="http://www.microsoft.com/learning/mcp/mcts/spservices/appdev/default.mspx">MCTS: Microsoft Windows SharePoint Services 3.0 – Application Development</a> via exam 70-541</li>
<li><a href="http://www.microsoft.com/learning/mcp/mcts/spserver/config/default.mspx">MCTS: Microsoft Office SharePoint Server 2007 – Configuration</a> via exam 70-630</li>
<li><a href="http://www.microsoft.com/learning/mcp/mcts/spserver/appdev/default.mspx">MCTS: Microsoft Office SharePoint Server 2007 ― Application Development</a> via exam 70-542</li>
</ul>
<p>Usually, the next question I get is&#8230; Which one should I take? This question is a bit harder to answer since the answer depends on the individual goal of certification. Nevertheless, I will try to break it down.</p>
<p>Every person who wants to get <em>&#8220;SharePoint certified&#8221;</em>  should start with exam 70-631 (WSS 3.0 Configuration). This certification shows that you understand how to install and configure a SharePoint farm, use Central Administration, and use and customize out-of-the-box features such as site templates, lists, libraries, and web parts. From a professional perspective, this exam is the corner stone for all things SharePoint since it ensures that the individual with this certification has the essential knowledge to create out-of-the-box solutions using WSS 3.0. To begin preparing for this exam, I suggest strong familiarity with the <a href="http://technet.microsoft.com/en-us/library/cc288070.aspx">WSS 3.0 TechNet library</a>.</p>
<p>The next certification to go for depends on your professional goals. If you are a developer and want to build custom solutions, then take the 70-541 exam (WSS 3.0 Development). If you are not a developer and plan on building out-of-the-box solutions with MOSS 2007, then take the 70-630 exam (MOSS 2007 Configuration). My reasons follow below.</p>
<p>Exam 70-541 (WSS 3.0 Development) certifies general knowledge of custom development and advanced customization of WSS features. This includes knowledge of the <a href="http://msdn.microsoft.com/en-us/library/ms430674.aspx">programming against the WSS object model</a> and using the <a href="http://msdn.microsoft.com/en-us/library/ms426449.aspx">collaborative application markup language (aka CAML)</a> to create custom applications, templates, features, definitions, and more. It also demonstrates the ability to package and deploy custom solutions using the WSS solution deployment mechanism. To begin preparing for this exam, I suggest strong familiarity with the <a href="http://msdn.microsoft.com/en-us/library/bb931737.aspx">WSS 3.0 MSDN library</a>. If you are not a developer, then skip this exam.</p>
<p>Exam 70-630 (MOSS 2007 Configuration) certifies the ability to deploy, maintain, monitor, and administrate operations of MOSS 2007. This includes deploying and managing a Shared Service Provided (SSP), search, business intelligence, business forms, user profiles, my sites, business data catalog, and more. Basically, it&#8217;s the same as exam 70-631 but with a focus on the premium out-of-the-box features of MOSS 2007 not included in WSS 3.0. If you want to prepare for this exam, then get familiar with the <a href="http://technet.microsoft.com/en-us/library/cc303422.aspx">MOSS 2007 TechNet library</a>.</p>
<p>The last exam is 70-542 (MOSS 2007 Development) is another developer focused exam similar to the 70-541 exam. However, the focus shifts from the WSS object model and features to the MOSS object model and features. This exam assumes that you are comfortable with CAML, the .NET framework, and developing applications with WSS. If you want to prepare for this exam, then get familiar with the <a href="http://msdn.microsoft.com/en-us/library/bb931736.aspx">MOSS 2007 MSDN library</a>.</p>
<p>Sometimes people also end up asking me if using TechNet and MSDN are enough to prepare for the exams. This totally depends on your experience and your level of familiarity with SharePoint and only you can decide if TechNet and MSDN are enough for you. Rest assured there are lots of good learning resources out there to help you prepare for the exams such as <a href="http://blogs.importchaos.com/alonsorobles/2008/05/22/sharepoint-reading-list/">books</a>, classes, and more. If you need helping preparing for an exam and finding classes or other learning resources, then go check out the <a href="http://www.microsoft.com/learning/default.mspx">Microsoft Learning</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/alonsorobles?a=DwuWO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=DwuWO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=ts36o"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=ts36o" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=LXSqO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=LXSqO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=NOqFo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=NOqFo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=pX5io"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=pX5io" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=X9jqO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=X9jqO" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/alonsorobles/~4/374504890" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.importchaos.com/alonsorobles/2008/08/25/wss-30-and-moss-2007-certification/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.importchaos.com/alonsorobles/2008/08/25/wss-30-and-moss-2007-certification/</feedburner:origLink></item>
		<item>
		<title>Caution When Packaging Themes for SharePoint Products and Technologies</title>
		<link>http://feeds.feedburner.com/~r/alonsorobles/~3/341789138/</link>
		<comments>http://blogs.importchaos.com/alonsorobles/2008/07/21/caution-when-packaging-themes-for-sharepoint-products-and-technologies/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 18:50:27 +0000</pubDate>
		<dc:creator>alonso.robles</dc:creator>
		
		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Windows Sharepoint Services]]></category>

		<category><![CDATA[branding]]></category>

		<category><![CDATA[moss 2007]]></category>

		<category><![CDATA[wcm]]></category>

		<category><![CDATA[web content management]]></category>

		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=86</guid>
		<description><![CDATA[Last month, I wrote up a post about how to package themes in a WSS 3.0 Solution Package (WSP file) for deployment on a SharePoint farm. After playing with this package a bit there was on problem that I encountered that was pretty obvious but I failed to take into consideration. The problem was that [...]]]></description>
			<content:encoded><![CDATA[<p>Last month, I wrote up a post about <a title="Packaging Branding and Themes for Deployment in SharePoint Environments" href="http://blogs.importchaos.com/alonsorobles/2008/06/26/packaging-branding-and-themes-for-deployment-in-sharepoint-environments/">how to package themes in a WSS 3.0 Solution Package (WSP file) for deployment on a SharePoint farm</a>. After playing with this package a bit there was on problem that I encountered that was pretty obvious but I failed to take into consideration. The problem was that the <em>SPTHEMES.XML</em> and the <em>OOB_SPTHEMES.XML</em>files that were packaged were deleted when I retracted and deleted the solution. Afterwards, I began to experience strange behavior with themes in my SharePoint environment.</p>
<p><strong>Why did this happen?</strong></p>
<p>A few months ago, I explained <a title="Creating Solution Packages for WSS 3.0 and MOSS 2007 Deployments" href="http://blogs.importchaos.com/alonsorobles/2008/05/16/creating-solution-packages-for-wss-30-and-moss-2007-deployments/">how WSS deploys and retracts solution packages</a>. In that explanation, I explored how the WSS run-time checks the solution manifest of the solution package (WSP file) and removes any files, features, and other solution components from the file system and content databases. This includes both the <em>SPTHEMES.XML</em> and <em>OOB_SPTHEMES.XML</em> files that were specified in the solution manifest of the theme package. Take a look at the <strong>bold-ed </strong>lines in the manifest excerpt below:</p>
<blockquote><p><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;"><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;?</span><span style="color: #a31515;">xml </span><span style="color: #ff0000;">version</span><span style="color: #0000ff;">=</span>“<span style="color: #0000ff;">1.0</span>” <span style="color: #ff0000;">encoding</span><span style="color: #0000ff;">=</span>“<span style="color: #0000ff;">utf-8</span>“<span style="color: #0000ff;"> ?&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">Solution </span><span style="color: #ff0000;">xmlns</span><span style="color: #0000ff;">=</span>“<span style="color: #0000ff;">http://schemas.microsoft.com/sharepoint/</span>”<br />
          </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">DeploymentServerType</span><span style="color: #0000ff;">=</span>“<span style="color: #0000ff;">ApplicationServer</span>”<br />
          </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">ResetWebServer</span><span style="color: #0000ff;">=</span>“<span style="color: #0000ff;">TRUE</span>”<br />
          </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">SolutionId</span><span style="color: #0000ff;">=</span>“<span style="color: #0000ff;">D250636F-0A26-4019-8425-A5232D592C10</span>“<span style="color: #0000ff;">&gt;<br />
 </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFiles</span><span style="color: #0000ff;">&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><strong><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFile </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>“<span style="color: #0000ff;">LAYOUTS/1033/SPTHEMES.XML</span>“</strong><span style="color: #0000ff;"><strong>/&gt;<br />
  </strong></span></span><span style="font-size: 10pt; font-family: Courier New;"><strong><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFile </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>“<span style="color: #0000ff;">LAYOUTS/1033/OOB_SPTHEMES.XML</span>“</strong><span style="color: #0000ff;"><strong>/&gt;<br />
</strong>  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFile </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>“<span style="color: #0000ff;">THEMES/MYNEWTHEME/MYNEWTHEME.INF</span>“<span style="color: #0000ff;">/&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFile </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>“<span style="color: #0000ff;">THEMES/MYNEWTHEME/mossExtension.css</span>“<span style="color: #0000ff;">/&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFile </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>“<span style="color: #0000ff;">THEMES/MYNEWTHEME/theme.css</span>“<span style="color: #0000ff;">/&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;!–</span><span style="color: #008000;">Additional images and icons (gif, jpg, png files)<br />
       </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #008000;">can be added here using &lt;TemplateFile&gt; elements </span><span style="color: #0000ff;">–&gt;<br />
 </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;/</span><span style="color: #a31515;">TemplateFiles</span><span style="color: #0000ff;">&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;/</span><span style="color: #a31515;">Solution</span><span style="color: #0000ff;">&gt;</span></span></span></span></p></blockquote>
<p>So when I retracted my theme solution, both the <em>SPTHEMES.XML</em> and <em>OOB_SPTHEMES.XML</em>files were deleted from the file system and the original SPTHEMES.XML was not restored. Luckly, I had a copy of the themes WSP file from which I extracted the <em>OOB_SPTHEMES.XML</em> file and manually copied back to the <em>12/LAYOUTS/1033 </em>directory. This resolved the odd theme behavior that my environment was experiencing.</p>
<p><strong>Lesson learned?</strong></p>
<p>If you are going to modify files in the SharePoint HIVE in an unsupported manner (such as was the case with the theme package), make sure you have a back up of the original file system files. Like we did with the <em>OOB_SPTHEMES.XML</em> file and make a note on additional steps, aside from solution retraction and deletion, that need to be taken to restore the file system to it&#8217;s original state. This means don&#8217;t just test the deployment, but also the retraction process before using this type of solution in a production environment.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/alonsorobles?a=E3H9O"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=E3H9O" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=G4dso"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=G4dso" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=vFedO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=vFedO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=tQKro"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=tQKro" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=4itbo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=4itbo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=LA9cO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=LA9cO" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/alonsorobles/~4/341789138" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.importchaos.com/alonsorobles/2008/07/21/caution-when-packaging-themes-for-sharepoint-products-and-technologies/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.importchaos.com/alonsorobles/2008/07/21/caution-when-packaging-themes-for-sharepoint-products-and-technologies/</feedburner:origLink></item>
		<item>
		<title>Introduction to the Enterprise Search Query Object Model</title>
		<link>http://feeds.feedburner.com/~r/alonsorobles/~3/336723923/</link>
		<comments>http://blogs.importchaos.com/alonsorobles/2008/07/15/introduction-to-the-enterprise-search-query-object-model/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 03:54:29 +0000</pubDate>
		<dc:creator>alonso.robles</dc:creator>
		
		<category><![CDATA[.NET Framework]]></category>

		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[enterprise search]]></category>

		<category><![CDATA[moss 2007]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=64</guid>
		<description><![CDATA[I had the pleasure of delivering a presentation tonight at the monthly Los Angeles SharePoint User Group. The talk provided an introduction to the enterprise search query object model which is used by Microsoft Office SharePoint Server 2007 (MOSS) and Microsoft Search Server 2008 (MSS) to provide search results to search queries. The guts of the 30 [...]]]></description>
			<content:encoded><![CDATA[<p>I had the pleasure of <a title="Presenting at the Upcoming Los Angeles SharePoint User Group (LASPUG) Meeting - July 15, 2008" href="http://blogs.importchaos.com/alonsorobles/2008/07/14/presenting-at-the-upcoming-los-angeles-sharepoint-user-group-laspug-meeting-july-15-2008/">delivering a presentation</a> tonight at the monthly <a title="Los Angeles SharePoint User Group" href="http://laspug.org/">Los Angeles SharePoint User Group</a>. The talk provided an introduction to the enterprise search query object model which is used by <a title="Microsoft Office SharePoint Server 2007 (MOSS)" href="http://office.microsoft.com/en-us/sharepointserver/default.aspx">Microsoft Office SharePoint Server 2007 (MOSS)</a> and <a title="Microsoft Search Server 2008 (MSS)" href="http://www.microsoft.com/enterprisesearch/serverproducts/searchserver/default.aspx">Microsoft Search Server 2008 (MSS)</a> to provide search results to search queries. The guts of the 30 minute slide deck [<a title="Power Point 2007" href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/07/introduction-to-the-search-query-object-model.pptx">PPTX</a> | <a href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/07/introduction-to-the-search-query-object-model.pdf">PDF</a>] consisted of a quick overview of Microsoft&#8217;s <a title="Enterprise Search Architecture on MSDN" href="http://msdn.microsoft.com/en-us/library/ms570748.aspx">enterprise search architecture</a>, followed by quick comparison of the <a title="Enterprise Search Keyword Syntax Reference on MSDN" href="http://msdn.microsoft.com/en-us/library/ms497636.aspx">keyword syntax</a> and the <a title="Enterprise Search SQL Syntax Reference on MSDN" href="http://msdn.microsoft.com/en-us/library/ms493660.aspx">SQL-based syntax</a>used for querying the query engine, and ended with an overview of the <a title="Enterprise Search Query Object Model Overview on MSDN" href="http://msdn.microsoft.com/en-us/library/ms544561.aspx">KeywordQuery and FullTextSqlQuery classes</a>and their commonly used properties. After the slides, I spun up a virtual machine and demonstrated the classes at work with some sample code [<a href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/07/laspug-demo-20080715.zip">ZIP</a>]. The talk ended with crediting <a title="Microsoft MVP" href="http://www.u2u.info/Blogs/Patrick/">Patrick Tisseghem</a> and his book, <a href="http://www.amazon.com/gp/product/0735623686?ie=UTF8&amp;tag=importchaos-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0735623686">Inside Microsoft Office SharePoint Server 2007</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=importchaos-20&amp;l=as2&amp;o=1&amp;a=0735623686" border="0" alt="" width="1" height="1" />, where I first started learning about search query object model.</p>
<p>If you missed the presentation, feel free to take a look at the materials:</p>
<ul>
<li><a href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/07/introduction-to-the-search-query-object-model.pptx">Introduction to the Search Query Object Model</a> [PPTX]</li>
<li><a href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/07/introduction-to-the-search-query-object-model.pdf">Introduction to the Search Query Object Model</a> [PDF]</li>
<li><a href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/07/laspug-demo-20080715.zip">Sample Code</a></li>
</ul>
<p>Oh, and there is one more excellent resource that I forgot to include in the slide deck is the <a title="Official blog of the Microsoft Enterprise Search Team" href="http://blogs.msdn.com/enterprisesearch">Enterprise Search Team Blog</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/alonsorobles?a=QohnO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=QohnO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=fUtEo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=fUtEo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=uprGO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=uprGO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=BWdzo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=BWdzo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=7s0Oo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=7s0Oo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=iartO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=iartO" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/alonsorobles/~4/336723923" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.importchaos.com/alonsorobles/2008/07/15/introduction-to-the-enterprise-search-query-object-model/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.importchaos.com/alonsorobles/2008/07/15/introduction-to-the-enterprise-search-query-object-model/</feedburner:origLink></item>
		<item>
		<title>Presenting at the Upcoming Los Angeles SharePoint User Group (LASPUG) Meeting - July 15, 2008</title>
		<link>http://feeds.feedburner.com/~r/alonsorobles/~3/335405190/</link>
		<comments>http://blogs.importchaos.com/alonsorobles/2008/07/14/presenting-at-the-upcoming-los-angeles-sharepoint-user-group-laspug-meeting-july-15-2008/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 20:26:23 +0000</pubDate>
		<dc:creator>alonso.robles</dc:creator>
		
		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[enterprise search]]></category>

		<category><![CDATA[moss 2007]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=63</guid>
		<description><![CDATA[I will be doing a brief presentation tomorrow for the Los Angeles SharePoint User Group (LASPUG). My presentation will consist of a quick overview on some of the key classes avialable in the Search Query object model and a breif demonstration on how to use them. The meeting is virtual so you can attend from [...]]]></description>
			<content:encoded><![CDATA[<p>I will be doing a brief presentation tomorrow for the <a href="http://laspug.org">Los Angeles SharePoint User Group (LASPUG)</a>. My presentation will consist of a quick overview on some of the key classes avialable in the Search Query object model and a breif demonstration on how to use them. The meeting is virtual so you can attend from anywhere in the world. Feel free to check it out.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/alonsorobles?a=jWSKO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=jWSKO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=Qckso"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=Qckso" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=CynuO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=CynuO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=n2DTo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=n2DTo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=CE3Uo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=CE3Uo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=cpP2O"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=cpP2O" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/alonsorobles/~4/335405190" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.importchaos.com/alonsorobles/2008/07/14/presenting-at-the-upcoming-los-angeles-sharepoint-user-group-laspug-meeting-july-15-2008/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.importchaos.com/alonsorobles/2008/07/14/presenting-at-the-upcoming-los-angeles-sharepoint-user-group-laspug-meeting-july-15-2008/</feedburner:origLink></item>
		<item>
		<title>Packaging Branding and Themes for Deployment in SharePoint Environments</title>
		<link>http://feeds.feedburner.com/~r/alonsorobles/~3/320701963/</link>
		<comments>http://blogs.importchaos.com/alonsorobles/2008/06/26/packaging-branding-and-themes-for-deployment-in-sharepoint-environments/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 17:50:13 +0000</pubDate>
		<dc:creator>alonso.robles</dc:creator>
		
		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Windows Sharepoint Services]]></category>

		<category><![CDATA[branding]]></category>

		<category><![CDATA[moss 2007]]></category>

		<category><![CDATA[wcm]]></category>

		<category><![CDATA[web content management]]></category>

		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=60</guid>
		<description><![CDATA[Last week, a colleague asked me to conduct a presentation for some colleagues to discuss best practices concerning SharePoint branding and themes. The presentation was not meant to teach anyone how to create master pages, page layouts, cascading style sheets, or write web pages, but rather, how to package branding and themes for deployment in [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, a colleague asked me to conduct a presentation for some colleagues to discuss best practices concerning SharePoint branding and themes. The presentation was not meant to teach anyone how to create master pages, page layouts, cascading style sheets, or write web pages, but rather, how to package branding and themes for deployment in SharePoint environments As such, I did my homework and demonstrated some approaches in a two hour virtual meeting last night. The purpose of this post is to recap the approaches and practices and provide a reference to the <a href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/06/customtheme.zip">sample Visual Studio 2008 projects</a> that were generated during the session.</p>
<h3>Packaging SharePoint Themes</h3>
<p>SharePoint themes are an interesting feature in SharePoint that allow site owners to quickly change the appearance of colors, icons, and images buy injecting an additional style sheet that overrides some of the existing styles found in the <em>core.css</em> style sheet. Creating a custom theme involves a couple of simple steps:</p>
<ol>
<li>Creating a new folder in the 12/TEMPLATE/THEMES directory</li>
<li>Creating a <em>theme.css </em>file to override the out of the box styles defined in the <em>core.css</em> style sheet in the directory created in the previous step</li>
<li>Creating a <em>mossExtension.css </em>file which is appended to <em>theme.css</em> file to create a the actual style sheet that is actually used when viewing pages in the SharePoint site</li>
<li>Creating a <em>&lt;directory name&gt;.inf</em> file that contains some basic setup information about the theme</li>
<li>Adding all the images and icons referenced in the custom style sheets in step 2 and 3 to the new directory created in step 1</li>
<li>Modifying the <em>SPTHEMES.XML</em> file in the 12/TEMPLATE/LAYOUTS/1033 directory</li>
</ol>
<p><strong>A word of caution!</strong> Modifying the <em>SPTHEMES.XML</em> is not a recommended customization practice since this file maybe overwritten by future SharePoint service packs.</p>
<p>It&#8217;s easy enough to take an existing theme directory out of the 12/TEMPLATE/THEMES directory, make a copy of it, rename the directory, rename the INF file, edit the INF, <em>theme.css</em>, and <em>mossExtension.css</em> file to create a new theme. However, this approach is not practical in a production SharePoint farm. The practical approach is to use the WSS solution framework to create our own solution package to deploy the custom theme. For more information, I covered the <a href="http://blogs.importchaos.com/alonsorobles/2008/05/16/creating-solution-packages-for-wss-30-and-moss-2007-deployments/">creation of solution packages (WSP files) in detail</a> in a previous post. Let&#8217;s take a quick look at the solution manifest for our theme package:</p>
<p><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;?</span><span style="color: #a31515;">xml </span><span style="color: #ff0000;">version</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">1.0</span>&#8221; <span style="color: #ff0000;">encoding</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">utf-8</span>&#8220;<span style="color: #0000ff;"> ?&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">Solution </span><span style="color: #ff0000;">xmlns</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">http://schemas.microsoft.com/sharepoint/</span>&#8221;<br />
          </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">DeploymentServerType</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">ApplicationServer</span>&#8221;<br />
          </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">ResetWebServer</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">TRUE</span>&#8221;<br />
          </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">SolutionId</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">D250636F-0A26-4019-8425-A5232D592C10</span>&#8220;<span style="color: #0000ff;">&gt;<br />
 </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFiles</span><span style="color: #0000ff;">&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFile </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">LAYOUTS/1033/SPTHEMES.XML</span>&#8220;<span style="color: #0000ff;">/&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFile </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">LAYOUTS/1033/OOB_SPTHEMES.XML</span>&#8220;<span style="color: #0000ff;">/&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFile </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">THEMES/MYNEWTHEME/MYNEWTHEME.INF</span>&#8220;<span style="color: #0000ff;">/&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFile </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">THEMES/MYNEWTHEME/mossExtension.css</span>&#8220;<span style="color: #0000ff;">/&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">TemplateFile </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">THEMES/MYNEWTHEME/theme.css</span>&#8220;<span style="color: #0000ff;">/&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;!&#8211;</span><span style="color: #008000;"> Additional images and icons (gif, jpg, png files)<br />
       </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #008000;">can be added here using &lt;TemplateFile&gt; elements </span><span style="color: #0000ff;">&#8211;&gt;<br />
 </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;/</span><span style="color: #a31515;">TemplateFiles</span><span style="color: #0000ff;">&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;/</span><span style="color: #a31515;">Solution</span><span style="color: #0000ff;">&gt;<br />
</span></span></p>
<p>The solution includes a modified <em>SPTHEMES.XML</em> file where we added an element to define the custom theme named <em>MYNEWTHEME</em>. You can also see that we included a copy of the original <em>SPTHEMES.XML</em> file and renamed it <em>OOB_SPTHEMES.XML</em> since it&#8217;s always a good idea to have back up copy of the file we modified. Finally, you see the critical <em>MYNEWTHEME.INF</em>, <em>mossExtension.css</em>, and <em>theme.css</em> files. For the sake of brevity, additional image and icon files were excluded on purpose.</p>
<p>The WSP file was then generated using a directive file and the MAKECAB utility (<a href="http://blogs.importchaos.com/alonsorobles/2008/05/16/creating-solution-packages-for-wss-30-and-moss-2007-deployments/">directive files and the MAKECAB utility</a> are also covered in my previous post) and deployed using the STSADM utility.</p>
<h3>Packaging Branding</h3>
<p>There are many different SharePoint Products and Technologies branding techniques. In the presentation, I demonstrated how quickly and easily we can use a solution to deploy custom style sheets, master pages, and page layouts and how we can use a feature receiver to programmatically apply the branding using the object model. Again for the sake of brevity, the demonstration illustrated how a master page can be deployed and applied. However, a similar approach can be used for page layouts, cascading style sheets, XSL files, image files, and any other branding components and artifacts.</p>
<p>The solution manifest to accomplish our task is relatively basic. Here it is:</p>
<p><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;?</span><span style="color: #a31515;">xml </span><span style="color: #ff0000;">version</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">1.0</span>&#8221; <span style="color: #ff0000;">encoding</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">utf-8</span>&#8220;<span style="color: #0000ff;"> ?&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">Solution </span><span style="color: #ff0000;">xmlns</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">http://schemas.microsoft.com/sharepoint/</span>&#8221;<br />
          </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">DeploymentServerType</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">WebFrontEnd</span>&#8221;<br />
          </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">SolutionId</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">A250636F-0A26-4019-8425-A5232D592C10</span>&#8220;<span style="color: #0000ff;">&gt;<br />
 </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">FeatureManifests</span><span style="color: #0000ff;">&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">FeatureManifest </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">MyBranding\feature.xml</span>&#8220;<span style="color: #0000ff;">/&gt;<br />
 </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;/</span><span style="color: #a31515;">FeatureManifests</span><span style="color: #0000ff;">&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;"> &lt;</span><span style="color: #a31515;">Assemblies</span><span style="color: #0000ff;">&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">  &lt;</span><span style="color: #a31515;">Assembly </span><span style="color: #ff0000;">DeploymentTarget</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">GlobalAssemblyCache</span>&#8221;<br />
            </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">CustomThemeFeature.dll</span>&#8220;<span style="color: #0000ff;"> /&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;/</span><span style="color: #a31515;">Assemblies</span><span style="color: #0000ff;">&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;/</span><span style="color: #a31515;">Solution</span><span style="color: #0000ff;">&gt;</span></span></p>
<p>As you can see, the solution manifest only includes a feature manifest and an assembly that will be deployed to the GAC. The assembly only contains a custom feature receiver class that programatically applies the custom master page and the custom theme discussed earlier in this post.</p>
<p>Let&#8217;s take a look at the feature manifest:</p>
<p><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">Feature </span><span style="color: #ff0000;">xmlns</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">http://schemas.microsoft.com/sharepoint/</span>&#8221;<br />
         </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">Id</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">D250636F-0A26-4019-8425-A5232D592C11</span>&#8221;<br />
         </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">Description</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">My custom master page feature.</span>&#8221;<br />
         </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">Title</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">My Custom Branding</span>&#8221;<br />
         </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">ReceiverAssembly</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">CustomThemeFeature, Version=1.0.0.0, PublicKeyToken=1ff5d2fddf39f61b, Culture=neutral</span>&#8221;<br />
         </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">ReceiverClass</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">CustomThemeFeature.FeatureReceiver</span>&#8221;<br />
         </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">Scope</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">Web</span>&#8220;<span style="color: #0000ff;">&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;"> &lt;</span><span style="color: #a31515;">ElementManifests</span><span style="color: #0000ff;">&gt;<br />
  </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">ElementManifest </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">elements.xml</span>&#8220;<span style="color: #0000ff;">/&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">  &lt;</span><span style="color: #a31515;">ElementFile </span><span style="color: #ff0000;">Location</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">mycustom.master</span>&#8220;<span style="color: #0000ff;">/&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;"> &lt;/</span><span style="color: #a31515;">ElementManifests</span><span style="color: #0000ff;">&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;/</span><span style="color: #a31515;">Feature</span><span style="color: #0000ff;">&gt;<br />
</span></span></p>
<p>The feature manifest is also pretty simple as it includes one element manifest and one element file. The element file is the custom master page that was created. The element manifest will declare a module that will be used to populate the master page gallery with the custom master page. An important thing to notice here is the <em>ReceiverAssembly</em> and <em>ReceiverClass</em> attributes in the <em>Feature</em> element. These attributes tell the WSS solution framework to use a custom assembly and feature receiver class to handle the feature related events. We will look at the feature receiver class in a bit. First lets take a look the element manifest:</p>
<p><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">Elements </span><span style="color: #ff0000;">xmlns</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">http://schemas.microsoft.com/sharepoint/</span>&#8220;<span style="color: #0000ff;">&gt;<br />
 </span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;</span><span style="color: #a31515;">Module </span><span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">MasterPages</span>&#8220;</span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;"><br />
</span><span style="color: #ff0000;">         List</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">116</span>&#8221;<br />
         </span><span style="font-size: 10pt;"><span style="font-family: Courier New;"><span style="color: #ff0000;">Url</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">_catalogs/masterpage</span>&#8220;</span><span style="color: #0000ff;"><span style="font-family: Courier New;">&gt;<br />
</span></span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">  &lt;</span><span style="color: #a31515;">File </span><span style="color: #ff0000;">Url</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">mycustom.master</span>&#8220;<span style="color: #0000ff;"><br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #ff0000;">        Type</span><span style="color: #0000ff;">=</span>&#8220;<span style="color: #0000ff;">GhostableInLibrary</span>&#8220;<span style="color: #0000ff;"> /&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;"> &lt;/</span><span style="color: #a31515;">Module</span><span style="color: #0000ff;">&gt;<br />
</span></span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">&lt;/</span><span style="color: #a31515;">Elements</span><span style="color: #0000ff;">&gt;</span></span></p>
<p>The element manifest is simploy responsible for populating the master page gallery with the custom master page. If our solution and feature also had custom page layouts, those can be added to the master page gallery by adding <em>File</em> child elements to the <em>Module</em> element. Additionally, we could add more modules to populate the style library with custom style sheets and/or XSL files or add other media files to other SharePoint libraries.</p>
<p>Finally let&#8217;s take a look at the custom feature receiver class:</p>
<p><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">using</span> Microsoft.SharePoint;</span></p>
<p><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">namespace</span> CustomThemeFeature </span><span style="font-size: 10pt; font-family: Courier New;">{</span><span style="font-size: 10pt; font-family: Courier New;"><br />
<span style="color: #0000ff;"> public </span><span style="color: #0000ff;">class </span><span style="color: #2b91af;">FeatureReceiver</span>: SPFeatureReceiver </span><span style="font-size: 10pt; font-family: Courier New;">{<br />
  </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">public </span><span style="color: #0000ff;">override </span><span style="color: #0000ff;">void</span> FeatureActivated(SPFeatureReceiverProperties properties) </span><span style="font-size: 10pt; font-family: Courier New;">{<br />
   </span><span style="font-size: 10pt; font-family: Courier New;">SPWeb site = (SPWeb)properties.Feature.Parent;<br />
   </span><span style="font-size: 10pt; font-family: Courier New;">site.MasterUrl = <span style="color: #a31515;">&#8220;/_catalogs/masterpage/mycustom.master&#8221;</span>;<br />
   </span><span style="font-size: 10pt; font-family: Courier New;">site.CustomMasterUrl = <span style="color: #a31515;">&#8220;/_catalogs/masterpage/mycustom.master&#8221;</span>;<br />
   </span><span style="font-size: 10pt; font-family: Courier New;">site.ApplyTheme(<span style="color: #a31515;">&#8220;MYNEWTHEME&#8221;</span>);<br />
   </span><span style="font-size: 10pt; font-family: Courier New;">site.Update();<br />
  </span><span style="font-size: 10pt; font-family: Courier New;">}<br />
  </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">public </span><span style="color: #0000ff;">override </span><span style="color: #0000ff;">void</span> FeatureDeactivating(SPFeatureReceiverProperties properties) {</span><span style="font-size: 10pt; font-family: Courier New;">}<br />
  </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">public </span><span style="color: #0000ff;">override </span><span style="color: #0000ff;">void</span> FeatureInstalled(SPFeatureReceiverProperties properties) </span><span style="font-size: 10pt; font-family: Courier New;">{</span><span style="font-size: 10pt; font-family: Courier New;">}<br />
  </span><span style="font-size: 10pt; font-family: Courier New;"><span style="color: #0000ff;">public </span><span style="color: #0000ff;">override </span><span style="color: #0000ff;">void</span> FeatureUninstalling(SPFeatureReceiverProperties properties) </span><span style="font-size: 10pt; font-family: Courier New;">{</span><span style="font-size: 10pt; font-family: Courier New;">}<br />
 </span><span style="font-size: 10pt; font-family: Courier New;">}<br />
</span><span style="font-size: 10pt; font-family: Courier New;">}</span></p>
<p>The class simply takes advantage of the feature activated event and to set the values of the master pages and apply a theme to the SPWeb object where the feature is activated.</p>
<p>Similar to the custom theme discussed earlier in this post, a WSP solution file was created using a directive file and the MAKECAB utility. The solution was then deployed with the STSADM utility. The feature was installed with the STSADM utility as well.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/alonsorobles?a=WxFBO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=WxFBO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=KhVZo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=KhVZo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=NoykO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=NoykO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=TOBJo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=TOBJo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=uj7ro"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=uj7ro" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=o1eXO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=o1eXO" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/alonsorobles/~4/320701963" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.importchaos.com/alonsorobles/2008/06/26/packaging-branding-and-themes-for-deployment-in-sharepoint-environments/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.importchaos.com/alonsorobles/2008/06/26/packaging-branding-and-themes-for-deployment-in-sharepoint-environments/</feedburner:origLink></item>
		<item>
		<title>Upcoming Los Angeles SharePoint User Group Meeting - June 17, 2008</title>
		<link>http://feeds.feedburner.com/~r/alonsorobles/~3/311450996/</link>
		<comments>http://blogs.importchaos.com/alonsorobles/2008/06/13/upcoming-los-angeles-sharepoint-user-group-meeting-june-17-2008/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 22:37:13 +0000</pubDate>
		<dc:creator>alonso.robles</dc:creator>
		
		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Windows Sharepoint Services]]></category>

		<category><![CDATA[events]]></category>

		<category><![CDATA[lapsug]]></category>

		<category><![CDATA[moss 2007]]></category>

		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=59</guid>
		<description><![CDATA[The Los Angeles SharePoint User Group (LASPUG) will be having their monthly meeting this coming Tuesday, June 17th, 2008 at 6:30 PM. The meeting is virtual so make sure you mark your calendars and attend regardless of where you are.
The meeting agenda includes two presenters:

Dan Kruger from Quest Software will be giving us an over view [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://laspug.org">Los Angeles SharePoint User Group (LASPUG)</a> will be having their monthly meeting this coming Tuesday, June 17th, 2008 at 6:30 PM. The meeting is virtual so make sure you mark your calendars and attend regardless of where you are.</p>
<p>The meeting agenda includes two presenters:</p>
<ul>
<li>Dan Kruger from Quest Software will be giving us an over view of Quest&#8217;s <em>Development Studio for SharePoint</em>.</li>
<li>Jim Duncan (a former MVP), Senior SharePoint Architect of ShareSquared, will be presenting a dive into <em>Using the Business Data Catalog from SharePoint.</em></li>
</ul>
<p>More information is available at <a href="http://www.laspug.org/Lists/Events%20Calendar/DispForm.aspx?ID=10">http://www.laspug.org/Lists/Events%20Calendar/DispForm.aspx?ID=10</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/alonsorobles?a=mtlSO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=mtlSO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=8Ydbo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=8Ydbo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=dadRO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=dadRO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=kAgoo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=kAgoo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=DIBao"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=DIBao" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=yQMnO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=yQMnO" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/alonsorobles/~4/311450996" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.importchaos.com/alonsorobles/2008/06/13/upcoming-los-angeles-sharepoint-user-group-meeting-june-17-2008/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.importchaos.com/alonsorobles/2008/06/13/upcoming-los-angeles-sharepoint-user-group-meeting-june-17-2008/</feedburner:origLink></item>
		<item>
		<title>Enabling the SharePoint Safe Mode Call Stack, Disabling Custom Errors and Enabiling Compilation Debugging</title>
		<link>http://feeds.feedburner.com/~r/alonsorobles/~3/309172538/</link>
		<comments>http://blogs.importchaos.com/alonsorobles/2008/06/09/enabling-the-sharepoint-safe-mode-call-stack-disabling-custom-errors-and-enabling-compilation-debugging/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 02:21:43 +0000</pubDate>
		<dc:creator>alonso.robles</dc:creator>
		
		<category><![CDATA[.NET Development]]></category>

		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[Internet Information Services]]></category>

		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Windows Sharepoint Services]]></category>

		<category><![CDATA[asp.net 2.0]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[iis 7.0]]></category>

		<category><![CDATA[moss 2007]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=58</guid>
		<description><![CDATA[When developling for SharePoint, I find myself always turning on the call stack and disabiling the custom errors in my development environment. It really does help when trying to debug run-time problems. I know there a few posts out there that describe how to do this, but I figured I would repost it as a [...]]]></description>
			<content:encoded><![CDATA[<p>When developling for SharePoint, I find myself always turning on the call stack and disabiling the custom errors in my development environment. It really does help when trying to debug run-time problems. I know there a few posts out there that describe how to do this, but I figured I would repost it as a reference for myself (which you are welcome to use).</p>
<p>Just remember that I do this in my development environment only. I don&#8217;t recommend changing the <em>web.config</em> files in any other environment.</p>
<p><strong>Enabling the Call Stack</strong></p>
<p>Set the value <em>CallStack<strong> </strong></em>attribute in the <em>SafeMode </em>element in the <em>web.config</em> file to <em>true</em>.</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;configuration&gt;
  ...
  &lt;SharePoint&gt;
   &lt;SafeMode MaxControls="200"
             CallStack="true"
             DirectFileDependencies="10"
             TotalFileDependencies="50"
             AllowPageLevelTrace="false"&gt;
    ...
   &lt;/SafeMode&gt;
   ...
 &lt;/SharePoint&gt;
 ...
&lt;/configuration&gt;</pre>
<p><strong>Disabling Custom Errors</strong></p>
<p>Set the value of the <em>mode</em> attribute in the <em>customErrors</em> element to <em>Off</em>.</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;configuration&gt;
  ...
  &lt;system.web&gt;
   ...
   &lt;customErrors mode="Off" /&gt;
   ...
  &lt;/system.web&gt;
 ...
&lt;/configuration&gt;</pre>
<p><strong>Enabiling Compilation Debugging</strong></p>
<p>Set the value of the <em>debug </em>attriute in the <em>compilation</em> element to <em>true</em>.</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;configuration&gt;
  ...
  &lt;system.web&gt;
   ...
   &lt;compilation debug="true"&gt;
    ...
   &lt;/compilation&gt;
   ...
  &lt;/system.web&gt;
 ...
&lt;/configuration&gt;</pre>
<p> <strong>Putting it all together</strong></p>
<pre>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
 &lt;configuration&gt;
  ...
  &lt;SharePoint&gt;
   &lt;SafeMode MaxControls="200"
             CallStack="true"
             DirectFileDependencies="10"
             TotalFileDependencies="50"
             AllowPageLevelTrace="false"&gt;
    ...
   &lt;/SafeMode&gt;
   ...
 &lt;/SharePoint&gt;
 &lt;system.web&gt;
   ...
   &lt;customErrors mode="Off" /&gt;
   ...
   &lt;compilation debug="true"&gt;
    ...
   &lt;/compilation&gt;
   ...
  &lt;/system.web&gt;
 ...
&lt;/configuration&gt;</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/alonsorobles?a=aCLSO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=aCLSO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=kTyBo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=kTyBo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=kHKUO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=kHKUO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=4a82o"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=4a82o" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=E3vfo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=E3vfo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=wIvrO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=wIvrO" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/alonsorobles/~4/309172538" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.importchaos.com/alonsorobles/2008/06/09/enabling-the-sharepoint-safe-mode-call-stack-disabling-custom-errors-and-enabling-compilation-debugging/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.importchaos.com/alonsorobles/2008/06/09/enabling-the-sharepoint-safe-mode-call-stack-disabling-custom-errors-and-enabling-compilation-debugging/</feedburner:origLink></item>
		<item>
		<title>Daniel Larson’s Best Practices for Elevated Privilege in SharePoint</title>
		<link>http://feeds.feedburner.com/~r/alonsorobles/~3/306391302/</link>
		<comments>http://blogs.importchaos.com/alonsorobles/2008/06/06/daniel-larsons-best-practices-for-elevated-privilege-in-sharepoint/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 21:57:06 +0000</pubDate>
		<dc:creator>alonso.robles</dc:creator>
		
		<category><![CDATA[Sharepoint Server]]></category>

		<category><![CDATA[Windows Sharepoint Services]]></category>

		<category><![CDATA[best practices]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[moss 2007]]></category>

		<category><![CDATA[security]]></category>

		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=56</guid>
		<description><![CDATA[[via Daniel Larson]
Daniel Larson, a MOSS MVP, has been ranting over the past few days about the use of the SPSecurity.RunWithElevatedPrivileges method. While I have been amused with his rants, I share his concerns and frustrations as a result of using the method in my SharePoint development experience and seeing the method abused and missused in [...]]]></description>
			<content:encoded><![CDATA[<p>[via <a href="http://daniellarson.spaces.live.com/Blog/cns!D3543C5837291E93!2005.entry">Daniel Larson</a>]</p>
<p><a href="http://daniellarson.spaces.live.com/Blog/">Daniel Larson</a>, a MOSS MVP, has been ranting over the past few days about the use of the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx">SPSecurity.RunWithElevatedPrivileges</a> method. While I have been amused with his rants, I share his concerns and frustrations as a result of using the method in my SharePoint development experience and seeing the method abused and missused in many code reviews. Today, he posted <a href="http://daniellarson.spaces.live.com/Blog/cns!D3543C5837291E93!2005.entry">a list of his best practices for gaining &#8220;elevated privileges&#8221; SharePoint</a>.</p>
<p>Daniel Larson&#8217;s list of best practives for elevated privileges in SharePoint:</p>
<blockquote>
<ul>
<li>Avoid using SPSecurity.RunwithElevatedPrivilege to access the SharePoint object model. Instead, use the SPUserToken to impersonate with SPSite.</li>
<li>If you do use SPSecurity.RunwithElevatedPrivilege, dispose of all objects in the delegate. Do not pass SharePoint objects out of the <em>RunwithElevatedPrivilege</em>  method.</li>
<li>Only use SPSecurity.RunwithElevatedPrivilege to make network calls under the application pool identity. Don&#8217;t use it for elevation of privilege of SharePoint objects.</li>
<li>Always use the SPSite constructor with an SPUserToken to create an elevated privilege security context in SharePoint. To impersonate the system, use the SystemAccount.UserToken property of the current SPSite context, such as:<br />
var site = new SPSite(SPContext.Current.Site.ID,  SPContext.Current.Site.SystemAccount.UserToken);</li>
<li>Avoid passing SharePoint objects between different security contexts (<em>SPSite</em> instances), with the exception of the SPUserToken used in the SPSite ctor. An SPUser object created from <em>SPSite A </em>cannot (reliably) be passed to <em>SPSite B</em>. This can be the source of obscure bugs in production that are difficult to reproduce in development. For example, an <em>SPUser</em> reference created from SPContext.Current.Site cannot reliably be used in an elevated site context, as the user reference <em>may</em> take on a different meaning in the alternate context.</li>
<li>Never use elevated privilege to bypass security&#8211; always use it to work <em>with</em> security.</li>
<li>Restrict what assemblies can use elevated privilege by running in minimal trust, avoiding the GAC, and auditing any CAS policies deployed with vendor solutions.</li>
</ul>
</blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/alonsorobles?a=Wi0xO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=Wi0xO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=u42ko"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=u42ko" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=enfRO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=enfRO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=aCwmo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=aCwmo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=CbAeo"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=CbAeo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/alonsorobles?a=6KOLO"><img src="http://feeds.feedburner.com/~f/alonsorobles?i=6KOLO" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/alonsorobles/~4/306391302" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.importchaos.com/alonsorobles/2008/06/06/daniel-larsons-best-practices-for-elevated-privilege-in-sharepoint/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.importchaos.com/alonsorobles/2008/06/06/daniel-larsons-best-practices-for-elevated-privilege-in-sharepoint/</feedburner:origLink></item>
	</channel>
</rss>
