<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mylifeinaminute.com &#187; MSDN</title>
	<atom:link href="http://www.mylifeinaminute.com/category/microsoft/msdn/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mylifeinaminute.com</link>
	<description>You can learn a lot in a minute</description>
	<lastBuildDate>Wed, 08 Sep 2010 01:14:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SharePoint Guidance</title>
		<link>http://www.mylifeinaminute.com/2010/07/06/sharepoint-guidance/</link>
		<comments>http://www.mylifeinaminute.com/2010/07/06/sharepoint-guidance/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 23:24:05 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
				<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[SharePoint Server 2010]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint Guidance]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=496</guid>
		<description><![CDATA[From MSDN: Designing and developing rich, robust Microsoft® SharePoint® applications can be challenging. The following releases are designed to help solution developers and architects make the right decisions and follow proven practices when building applications for SharePoint. Each release contains guidance documentation, source code for reference implementations, reusable library code, and Quick Starts. Definitely worth [...]]]></description>
			<content:encoded><![CDATA[<p>From MSDN:</p>
<blockquote><p>Designing and developing rich, robust Microsoft® SharePoint® applications can be challenging. The following releases are designed to help solution developers and architects make the right decisions and follow proven practices when building applications for SharePoint. Each release contains guidance documentation, source code for reference implementations, reusable library code, and Quick Starts.</p></blockquote>
<p>Definitely worth exploring further if you looking to see how others are building on top of the product stack and what the SharePoint MVPs view as essential for developing robust applications.</p>
<h4>Reference</h4>
<ul>
<li><a title="SharePoint Guidance" href="http://msdn.microsoft.com/en-us/library/ff650022.aspx">SharePoint Guidance on MSDN</a></li>
</ul>
<p><map name='google_ad_map_496_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/496?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_496_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=496&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2010%2F07%2F06%2Fsharepoint-guidance%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2010/07/06/sharepoint-guidance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSDN Magazine: 10 Best Practices For Building SharePoint Solutions</title>
		<link>http://www.mylifeinaminute.com/2009/03/10/msdn-magazine-10-best-practices-for-building-sharepoint-solutions/</link>
		<comments>http://www.mylifeinaminute.com/2009/03/10/msdn-magazine-10-best-practices-for-building-sharepoint-solutions/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 01:16:44 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
				<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Windows SharePoint Services]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=338</guid>
		<description><![CDATA[MSDN Magazine has a SharePoint focused article this month titled 10 Best Practices For Building SharePoint Solutions. If you&#8217;re trying to wrap your head around the scope and depth of developing solutions on top of SharePoint, the article makes for a good primer.]]></description>
			<content:encoded><![CDATA[<p><a title="MSDN Magazine" href="http://msdn.microsoft.com/en-us/magazine/default.aspx">MSDN Magazine</a> has a SharePoint focused article this month titled <a title="10 Best Practices For Building SharePoint Solutions" href="http://msdn.microsoft.com/en-us/magazine/dd458798.aspx">10 Best Practices For Building SharePoint Solutions</a>. If you&#8217;re trying to wrap your head around the scope and depth of developing solutions on top of SharePoint, the article makes for a good primer.</p>
<p><map name='google_ad_map_338_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/338?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_338_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=338&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2009%2F03%2F10%2Fmsdn-magazine-10-best-practices-for-building-sharepoint-solutions%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2009/03/10/msdn-magazine-10-best-practices-for-building-sharepoint-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In Case You Missed It &#8211; Content Deployment Webcast</title>
		<link>http://www.mylifeinaminute.com/2009/01/07/in-case-you-missed-it-content-deployment-webcast/</link>
		<comments>http://www.mylifeinaminute.com/2009/01/07/in-case-you-missed-it-content-deployment-webcast/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 16:45:09 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Server 2008]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Visual Studio 2005]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[content deployment]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=294</guid>
		<description><![CDATA[Spencer Harbar presented an excellent webcast on content deployment in SharePoint 2007 yesterday. If you&#8217;ve ever wanted to learn more about it, now is the time. Go check it out.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.harbar.net/">Spencer Harbar</a> presented an excellent webcast on <a title="Plan content deployment" href="http://technet.microsoft.com/en-us/library/cc263428.aspx">content deployment</a> in <a href="/tag/moss-2007/">SharePoint 2007</a> yesterday. If you&#8217;ve ever wanted to learn more about it, now is the time.</p>
<p><a href="http://www.harbar.net/archive/2009/01/07/content-deployment-webcast-now-available-on-demand.aspx">Go check it out</a>.</p>
<p><map name='google_ad_map_294_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/294?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_294_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=294&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2009%2F01%2F07%2Fin-case-you-missed-it-content-deployment-webcast%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2009/01/07/in-case-you-missed-it-content-deployment-webcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Absolute URLs in a Content Editor Web Part</title>
		<link>http://www.mylifeinaminute.com/2008/12/24/fixing-absolute-urls-in-a-content-editor-web-part/</link>
		<comments>http://www.mylifeinaminute.com/2008/12/24/fixing-absolute-urls-in-a-content-editor-web-part/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 15:00:24 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[TechNet]]></category>
		<category><![CDATA[Windows SharePoint Services]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[control adapter]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=271</guid>
		<description><![CDATA[Maxime Bombardier has a post on the subject of fixing one of the bigger issues with the Content Editor web part. For the uninitiated, a Content Editor web part always renders absolute URLs when the rich-text editing capabilities are used. I must admit that I would have never have thought to use a control adapter [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.msdn.com/maximeb/default.aspx" title="Maxime Bombardier">Maxime Bombardier</a> has a post on the subject of fixing one of the bigger issues with the Content Editor web part. For the uninitiated, a <a href="http://www.contenteditorwebpart.com/default.aspx">Content Editor web part</a> always renders absolute URLs when the rich-text editing capabilities are used. I must admit that I would have never have thought to use a <a href="http://msdn.microsoft.com/en-us/library/67276kc5.aspx" title="Architectural Overview of Adaptive Control Behavior">control adapter</a> to manipulate the output of the web part on the fly. Now that I have learned something new, you should too.</p>
</p>
<p><a href="http://blogs.msdn.com/maximeb/archive/2008/12/23/fixing-absolute-urls-for-all-alternate-access-mappings-aam-of-content-editor-web-part-with-a-control-adapter.aspx" title="Fixing absolute URLs for all Alternate Access Mappings (AAM) of Content Editor Web Part with a Control Adapter">Go check it out</a>.</p>
<p><map name='google_ad_map_271_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/271?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_271_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=271&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F12%2F24%2Ffixing-absolute-urls-in-a-content-editor-web-part%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/12/24/fixing-absolute-urls-in-a-content-editor-web-part/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating User Profile Properties for the Current User</title>
		<link>http://www.mylifeinaminute.com/2008/12/16/updating-user-profile-properties-for-the-current-user/</link>
		<comments>http://www.mylifeinaminute.com/2008/12/16/updating-user-profile-properties-for-the-current-user/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 16:46:48 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[TechNet]]></category>
		<category><![CDATA[Visual Studio 2005]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[Windows SharePoint Services]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Profile Management]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=256</guid>
		<description><![CDATA[Updates to a user&#8217;s profile properties can be performed with the following: SPSite site = SPContext.GetContext(HttpContext.Current).Site; ServerContext serverContext = ServerContext.GetContext(site); UserProfileManager profileManager = new UserProfileManager(serverContext); UserProfile currentUserProfile = profileManager.GetUserProfile(System.Web.HttpContext.Current.User.Identity.Name); if (this.chkTerms.Checked) currentUserProfile[&#34;TermsOfUseAccepted&#34;].Value = &#34;true&#34;; else currentUserProfile[&#34;TermsOfUseAccepted&#34;].Value = &#34;false&#34;; currentUserProfile[&#34;SecurityQuestion1&#34;].Value = this.lstQuestion1.SelectedItem.Text + &#34;&#124;&#34; + Server.HtmlEncode(this.txtQuestion1Ans.Text); currentUserProfile[&#34;SecurityQuestion2&#34;].Value = this.lstQuestion2.SelectedItem.Text + &#34;&#124;&#34; + Server.HtmlEncode(this.txtQuestion2Ans.Text); currentUserProfile[&#34;SecurityQuestion3&#34;].Value = this.lstQuestion3.SelectedItem.Text [...]]]></description>
			<content:encoded><![CDATA[<p>Updates to a user&#8217;s profile properties can be performed with the following:</p>
<p><span id="more-256"></span></p>
<pre>
<pre class="brush: csharp;">
SPSite site = SPContext.GetContext(HttpContext.Current).Site;
                ServerContext serverContext = ServerContext.GetContext(site);

                UserProfileManager profileManager = new UserProfileManager(serverContext);
                UserProfile currentUserProfile = profileManager.GetUserProfile(System.Web.HttpContext.Current.User.Identity.Name);

                if (this.chkTerms.Checked)
                    currentUserProfile[&quot;TermsOfUseAccepted&quot;].Value = &quot;true&quot;;
                else
                    currentUserProfile[&quot;TermsOfUseAccepted&quot;].Value = &quot;false&quot;;

                currentUserProfile[&quot;SecurityQuestion1&quot;].Value = this.lstQuestion1.SelectedItem.Text + &quot;|&quot; + Server.HtmlEncode(this.txtQuestion1Ans.Text);
                currentUserProfile[&quot;SecurityQuestion2&quot;].Value = this.lstQuestion2.SelectedItem.Text + &quot;|&quot; + Server.HtmlEncode(this.txtQuestion2Ans.Text);
                currentUserProfile[&quot;SecurityQuestion3&quot;].Value = this.lstQuestion3.SelectedItem.Text + &quot;|&quot; + Server.HtmlEncode(this.txtQuestion3Ans.Text);

                currentUserProfile.Commit();

                site.RootWeb.Dispose();
                site.Dispose();
</pre>
</pre>
<p><map name='google_ad_map_256_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/256?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_256_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=256&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F12%2F16%2Fupdating-user-profile-properties-for-the-current-user%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/12/16/updating-user-profile-properties-for-the-current-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retrieving User Profile Properties for the Current User</title>
		<link>http://www.mylifeinaminute.com/2008/12/16/retrieving-user-profile-properties-for-the-current-user/</link>
		<comments>http://www.mylifeinaminute.com/2008/12/16/retrieving-user-profile-properties-for-the-current-user/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 16:42:10 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[TechNet]]></category>
		<category><![CDATA[Visual Studio 2005]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[Windows SharePoint Services]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[Shared Services Provider]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Profile Management]]></category>
		<category><![CDATA[SharePoint User Management]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=254</guid>
		<description><![CDATA[Retrieving a user&#8217;s profile properties can be achieved with the following block: SPSite site = SPContext.GetContext(HttpContext.Current).Site; ServerContext serverContext = ServerContext.GetContext(site); UserProfileManager profileManager = new UserProfileManager(serverContext); UserProfile currentUserProfile = null; if (profileManager.UserExists(System.Web.HttpContext.Current.User.Identity.Name)) currentUserProfile = profileManager.GetUserProfile(System.Web.HttpContext.Current.User.Identity.Name); else currentUserProfile = profileManager.CreateUserProfile(System.Web.HttpContext.Current.User.Identity.Name); string termsOfUseAnswered = (string)currentUserProfile[&#34;TermsOfUseAccepted&#34;].Value; string securityQuestion1 = (string)currentUserProfile[&#34;SecurityQuestion1&#34;].Value; string securityQuestion2 = (string)currentUserProfile[&#34;SecurityQuestion2&#34;].Value; string securityQuestion3 = (string)currentUserProfile[&#34;SecurityQuestion3&#34;].Value; Note [...]]]></description>
			<content:encoded><![CDATA[<p>Retrieving a user&#8217;s profile properties can be achieved with the following block:</p>
<p><span id="more-254"></span></p>
<pre>
<pre class="brush: csharp;">
SPSite site = SPContext.GetContext(HttpContext.Current).Site;
            ServerContext serverContext = ServerContext.GetContext(site);

            UserProfileManager profileManager = new UserProfileManager(serverContext);
            UserProfile currentUserProfile = null;

            if (profileManager.UserExists(System.Web.HttpContext.Current.User.Identity.Name))
                currentUserProfile = profileManager.GetUserProfile(System.Web.HttpContext.Current.User.Identity.Name);
            else
                currentUserProfile = profileManager.CreateUserProfile(System.Web.HttpContext.Current.User.Identity.Name);

            string termsOfUseAnswered = (string)currentUserProfile[&quot;TermsOfUseAccepted&quot;].Value;
            string securityQuestion1 = (string)currentUserProfile[&quot;SecurityQuestion1&quot;].Value;
            string securityQuestion2 = (string)currentUserProfile[&quot;SecurityQuestion2&quot;].Value;
            string securityQuestion3 = (string)currentUserProfile[&quot;SecurityQuestion3&quot;].Value;
</pre>
</pre>
<p>Note that this buids on <a href="/2008/12/16/creating-custom-profile-properties-through-code-c/" title="Creating Custom Profile Properties Through Code (C#)">Creating Custom Profile Properties Through Code</a>.</p>
<p><map name='google_ad_map_254_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/254?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_254_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=254&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F12%2F16%2Fretrieving-user-profile-properties-for-the-current-user%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/12/16/retrieving-user-profile-properties-for-the-current-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Custom Profile Properties through Code (C#)</title>
		<link>http://www.mylifeinaminute.com/2008/12/16/creating-custom-profile-properties-through-code-c/</link>
		<comments>http://www.mylifeinaminute.com/2008/12/16/creating-custom-profile-properties-through-code-c/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 16:27:21 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[TechNet]]></category>
		<category><![CDATA[Visual Studio 2005]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[Windows SharePoint Services]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[Shared Services Provider]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Profile Management]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=248</guid>
		<description><![CDATA[I recently needed to add several custom profile properties through a web part for tracking a users&#8217; security preferences for a particular web application. The following is the method used to create four new properties in the SSP: private void VerifyCreateBaseProfileProperties() { SPSite site = SPContext.GetContext(HttpContext.Current).Site; Guid siteId = site.ID; HttpContext savedContext = HttpContext.Current; SPSecurity.RunWithElevatedPrivileges(delegate() [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed to add several custom profile properties through a web part for tracking a users&#8217; security preferences for a particular web application.</p>
<p>The following is the method used to create four new properties in the SSP:</p>
<p><span id="more-248"></span></p>
<pre>
<pre class="brush: csharp;">
private void VerifyCreateBaseProfileProperties()
        {
            SPSite site = SPContext.GetContext(HttpContext.Current).Site;
            Guid siteId = site.ID;
            HttpContext savedContext = HttpContext.Current;

            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                using (SPSite elevatedSite = new SPSite(siteId))
                {
                    try
                    {
                        HttpContext.Current = null;

                        elevatedSite.AllowUnsafeUpdates = true;
                        elevatedSite.RootWeb.AllowUnsafeUpdates = true;

                        ServerContext serverContext = ServerContext.GetContext(elevatedSite);

                        UserProfileManager profileManager = new UserProfileManager(serverContext);
                        UserProfileConfigManager profileConfigManager = new UserProfileConfigManager(serverContext);
                        PropertyCollection propertyCollection = profileConfigManager.GetProperties();

                        bool question1Exists = false;
                        bool question2Exists = false;
                        bool question3Exists = false;
                        bool termsOfUseExists = false;

                        foreach (Property property in profileManager.Properties)
                        {
                            switch (property.Name)
                            {
                                case &quot;SecurityQuestion1&quot;:
                                    question1Exists = true;
                                    break;
                                case &quot;SecurityQuestion2&quot;:
                                    question2Exists = true;
                                    break;
                                case &quot;SecurityQuestion3&quot;:
                                    question3Exists = true;
                                    break;
                                case &quot;TermsOfUseAccepted&quot;:
                                    termsOfUseExists = true;
                                    break;
                            }
                        }

                        if (!question1Exists)
                        {
                            Property question1 = propertyCollection.Create(false);
                            question1.Name = &quot;SecurityQuestion1&quot;;
                            question1.DisplayName = &quot;Security Question 1&quot;;
                            question1.Type = &quot;string&quot;;
                            question1.PrivacyPolicy = PrivacyPolicy.OptIn;
                            question1.DefaultPrivacy = Privacy.Private;
                            question1.Description = &quot;Security Question 1&quot;;
                            question1.IsSearchable = false;
                            question1.IsVisibleOnEditor = false;
                            question1.IsAlias = false;
                            question1.Length = 100;
                            question1.IsUserEditable = true;
                            propertyCollection.Add(question1);
                        }
                        if (!question2Exists)
                        {
                            Property question2 = propertyCollection.Create(false);
                            question2.Name = &quot;SecurityQuestion2&quot;;
                            question2.DisplayName = &quot;Security Question 2&quot;;
                            question2.Type = &quot;string&quot;;
                            question2.PrivacyPolicy = PrivacyPolicy.OptIn;
                            question2.DefaultPrivacy = Privacy.Private;
                            question2.Description = &quot;Security Question 2&quot;;
                            question2.IsSearchable = false;
                            question2.IsVisibleOnEditor = false;
                            question2.IsAlias = false;
                            question2.Length = 100;
                            question2.IsUserEditable = true;
                            propertyCollection.Add(question2);
                        }
                        if (!question3Exists)
                        {
                            Property question3 = propertyCollection.Create(false);
                            question3.Name = &quot;SecurityQuestion3&quot;;
                            question3.DisplayName = &quot;Security Question 3&quot;;
                            question3.Type = &quot;string&quot;;
                            question3.PrivacyPolicy = PrivacyPolicy.OptIn;
                            question3.DefaultPrivacy = Privacy.Private;
                            question3.Description = &quot;Security Question 3&quot;;
                            question3.IsSearchable = false;
                            question3.IsVisibleOnEditor = false;
                            question3.IsAlias = false;
                            question3.Length = 100;
                            question3.IsUserEditable = true;
                            propertyCollection.Add(question3);
                        }
                        if (!termsOfUseExists)
                        {
                            Property termsofUsequestion = propertyCollection.Create(false);
                            termsofUsequestion.Name = &quot;TermsOfUseAccepted&quot;;
                            termsofUsequestion.DisplayName = &quot;Terms Of Use Accepted&quot;;
                            termsofUsequestion.Type = &quot;string&quot;;
                            termsofUsequestion.PrivacyPolicy = PrivacyPolicy.OptIn;
                            termsofUsequestion.DefaultPrivacy = Privacy.Private;
                            termsofUsequestion.Description = &quot;Terms Of Use Accepted&quot;;
                            termsofUsequestion.IsSearchable = false;
                            termsofUsequestion.IsVisibleOnEditor = false;
                            termsofUsequestion.IsAlias = false;
                            termsofUsequestion.Length = 10;
                            termsofUsequestion.IsUserEditable = true;
                            propertyCollection.Add(termsofUsequestion);
                        }
                    }
                    catch (Exception exc)
                    {
                    }
                    finally
                    {
                        elevatedSite.Dispose();
                    }
                }
            });

            site.Dispose();
            HttpContext.Current = savedContext;
        }
</pre>
</pre>
<p>Note that the current context (HttpContext.Current) needs to be saved off, set to null, then reinstated upon the completion of the method.</p>
<p><map name='google_ad_map_248_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/248?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_248_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=248&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F12%2F16%2Fcreating-custom-profile-properties-through-code-c%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/12/16/creating-custom-profile-properties-through-code-c/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WSRP Toolkit for SharePoint</title>
		<link>http://www.mylifeinaminute.com/2008/12/16/wsrp-toolkit-for-sharepoint/</link>
		<comments>http://www.mylifeinaminute.com/2008/12/16/wsrp-toolkit-for-sharepoint/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 13:46:27 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[TechNet]]></category>
		<category><![CDATA[Windows SharePoint Services]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[OASIS]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[WSRP]]></category>
		<category><![CDATA[WSRP Toolkit for SharePoint]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=239</guid>
		<description><![CDATA[The Microsoft SharePoint Product Group has just announced the WSRP Toolkit for SharePoint.  What is WSRP?  From OASIS: WSRP defines a set of interfaces and related semantics which standardize interactions with components providing user-facing markup, including the processing of user interactions with that markup. This allows applications to consume such components as providing a portion [...]]]></description>
			<content:encoded><![CDATA[<p>The <a title="Microsoft SharePoint Product Group" href="http://blogs.msdn.com/sharepoint">Microsoft SharePoint Product Group</a> has just announced the <a title="WSRP Toolkit for SharePoint" href="http://blogs.msdn.com/sharepoint/archive/2008/12/15/announcing-the-wsrp-toolkit-for-sharepoint.aspx">WSRP Toolkit for SharePoint</a>.  What is WSRP?  From <a title="OASIS Web Services for Remote Portlets" href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsrp">OASIS</a>:</p>
<blockquote><p>WSRP defines a set of interfaces and related semantics which standardize interactions with components providing user-facing markup, including the processing of user interactions with that markup. This allows applications to consume such components as providing a portion of the overall user application without having to write unique code for interacting with each component.</p>
</blockquote>
<p><span id="more-239"></span></p>
<p>Videos:</p>
<p><embed src="http://images.video.msn.com/flash/soapbox1_1.swf" width="432" height="364" id="h4asov25" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&#038;v=dc4b1625-b80a-4960-a9e1-987e8c0610cc&#038;ifs=true&#038;fr=shared&#038;mkt=en-US"></embed><noembed><a href="http://video.msn.com/?mkt=en-US&#038;playlist=videoByUuids:uuids:dc4b1625-b80a-4960-a9e1-987e8c0610cc&#038;showPlaylist=true&#038;from=msnvideo" target="_new" title="WSRP Toolkit for SharePoint 2007 - demo 1">Video: WSRP Toolkit for SharePoint 2007 &#8211; demo 1</a></noembed></p>
<p><embed src="http://images.video.msn.com/flash/soapbox1_1.swf" width="432" height="364" id="78t23hiq" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&#038;v=af3497ec-5bc3-4671-8e76-6bb58beb9b65&#038;ifs=true&#038;fr=shared&#038;mkt=en-US"></embed><noembed><a href="http://video.msn.com/?mkt=en-US&#038;playlist=videoByUuids:uuids:af3497ec-5bc3-4671-8e76-6bb58beb9b65&#038;showPlaylist=true&#038;from=msnvideo" target="_new" title="WSRP Toolkit for SharePoint 2007 - demo 2">Video: WSRP Toolkit for SharePoint 2007 &#8211; demo 2</a></noembed></p>
<p><map name='google_ad_map_239_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/239?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_239_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=239&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F12%2F16%2Fwsrp-toolkit-for-sharepoint%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/12/16/wsrp-toolkit-for-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Locating all of the Web Parts on the Current Page (C#)</title>
		<link>http://www.mylifeinaminute.com/2008/11/13/locating-all-of-the-web-parts-on-the-current-page-c/</link>
		<comments>http://www.mylifeinaminute.com/2008/11/13/locating-all-of-the-web-parts-on-the-current-page-c/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 20:40:23 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[TechNet]]></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=170</guid>
		<description><![CDATA[The following snippet allows for locating all of the web parts on a given web part page (the sample is targeted at web parts of the type Microsoft.SharePoint.WebPartPages.ListViewWebPart) string webUrl = SPContext.Current.Web.Url; using (SPSite site = new SPSite(webUrl)) { using (SPWeb web = site.OpenWeb()) { SPLimitedWebPartManager manager = web.GetLimitedWebPartManager(this.Parent.Page.Request.Url.ToString(), System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared); SPLimitedWebPartCollection webPartColl = manager.WebParts; for [...]]]></description>
			<content:encoded><![CDATA[<p>The following snippet allows for locating all of the web parts on a given web part page (the sample is targeted at web parts of the type <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.listviewwebpart.aspx" title="ListViewWebPart Class">Microsoft.SharePoint.WebPartPages.ListViewWebPart</a>)</p>
<pre>
<pre class="brush: csharp;">
string webUrl = SPContext.Current.Web.Url;

using (SPSite site = new SPSite(webUrl))
{
     using (SPWeb web = site.OpenWeb())
     {
          SPLimitedWebPartManager manager = web.GetLimitedWebPartManager(this.Parent.Page.Request.Url.ToString(), System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);

          SPLimitedWebPartCollection webPartColl = manager.WebParts;

          for (int i = 0; i &amp;amp;amp;lt; webPartColl.Count; i++)
          {
               if (webPartColl[i].GetType() == typeof(Microsoft.SharePoint.WebPartPages.ListViewWebPart))
               {
                    // do stuff
               }
          }
     }
}
</pre>
</pre>
<p><map name='google_ad_map_170_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/170?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_170_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=170&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F11%2F13%2Flocating-all-of-the-web-parts-on-the-current-page-c%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/11/13/locating-all-of-the-web-parts-on-the-current-page-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So you want to learn about SharePoint?</title>
		<link>http://www.mylifeinaminute.com/2008/11/10/so-you-want-to-learn-about-sharepoint/</link>
		<comments>http://www.mylifeinaminute.com/2008/11/10/so-you-want-to-learn-about-sharepoint/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 18:07:17 +0000</pubDate>
		<dc:creator>liquidpooled</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[MSDN]]></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=167</guid>
		<description><![CDATA[If you&#8217;re looking for a primer in programming with SharePoint, the following are a few good resources provided by Microsoft: MSDN Ramp Up From the site: Ramp Up is a free, online, community-based learning program, with a number of different tracks that will help you build your portfolio of professional development skills. Ramp Up has [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re looking for a primer in programming with <a title="SharePoint Server" href="/category/microsoft/office/sharepoint-server/">SharePoint</a>, the following are a few good resources provided by Microsoft:</p>
<ul>
<li><a title="MSDN Ramp Up" href="http://www.myrampup.com/">MSDN Ramp Up</a>
<ul>
<li>From the site: Ramp Up is a free, online, community-based learning program, with a number of different tracks that will help you build your portfolio of professional development skills. Ramp Up has a solid foundation of premium technical content from subject-matter gurus, and provides easy-to-access content in a variety of forms that guide you in learning the important skills</li>
</ul>
</li>
<li><a title="Microsoft SharePoint Developer" href="http://www.microsoft.com/click/SharePointDeveloper/">SharePoint Developer</a>
<ul>
<li>A primer series on developing with SharePoint from Microsoft.</li>
</ul>
</li>
</ul>
<p><map name='google_ad_map_167_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/167?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_167_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=167&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F11%2F10%2Fso-you-want-to-learn-about-sharepoint%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/11/10/so-you-want-to-learn-about-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
