<?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; Visual Studio 2005</title>
	<atom:link href="http://www.mylifeinaminute.com/category/microsoft/visual-studio-2005/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, 18 Jan 2012 02:33:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<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>Scott</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></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>Some Background on CAS Policies</title>
		<link>http://www.mylifeinaminute.com/2008/12/31/some-background-on-cas-policies/</link>
		<comments>http://www.mylifeinaminute.com/2008/12/31/some-background-on-cas-policies/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 16:26:38 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<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>
		<category><![CDATA[CAS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Solution Packages]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=275</guid>
		<description><![CDATA[Reza Alirezaei has a good post on the behind the scenes of CAS policies and SharePoint. Check it out.]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.devhorizon.com/reza/" title="Reza Alirezaei's Blog">Reza Alirezaei</a> has a good post on the behind the scenes of CAS policies and SharePoint.
<p><a href="http://blogs.devhorizon.com/reza/?p=785" title="Behind the Scences: CAS in Solution Packages">Check it out.</a></p>
<p><map name='google_ad_map_275_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/275?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_275_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=275&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F12%2F31%2Fsome-background-on-cas-policies%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/12/31/some-background-on-cas-policies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HubKey&#8217;s Development Hole</title>
		<link>http://www.mylifeinaminute.com/2008/12/23/hubkeys-development-hole/</link>
		<comments>http://www.mylifeinaminute.com/2008/12/23/hubkeys-development-hole/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 21:08:35 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Visual Studio 2005]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[Windows SharePoint Services]]></category>
		<category><![CDATA[APIs]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[hubkey]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=262</guid>
		<description><![CDATA[Over at the Development Hole, the HubKey crew has been busy building out a SharePoint API that mimics the internal SharePoint object model. If you have ever felt the pain of having to have a SharePoint instance/farm/installation available to run your code again, you&#8217;ll appreciate what HubKey is doing. You can grab a beta of [...]]]></description>
			<content:encoded><![CDATA[<p>Over at the <a href="http://geek.hubkey.com" title="Development Hole">Development Hole</a>, the <a href="http://www.hubkey.com/" title="HubKey">HubKey</a> crew has been busy building out a <a href="http://geek.hubkey.com/2008/11/sharepoint-api-client-side-object-model.html" title="SharePoint API: A client-side object model">SharePoint API</a> that mimics the internal SharePoint object model.</p>
<p>If you have ever felt the pain of having to have a SharePoint instance/farm/installation available to run your code again, you&#8217;ll appreciate what <a href="http://www.hubkey.com/" title="HubKey">HubKey</a> is doing.  You can grab a beta of their API <a href="http://www.hubkey.com/contact.aspx">here</a> (select HubKey SharePoint API as your interest).</p>
<p><map name='google_ad_map_262_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/262?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_262_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=262&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F12%2F23%2Fhubkeys-development-hole%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/12/23/hubkeys-development-hole/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>Scott</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></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:]]></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; title: ; notranslate">
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>Scott</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></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: Note that this buids on Creating Custom Profile Properties Through Code.]]></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; title: ; notranslate">
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>Scott</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></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: Note that the current context (HttpContext.Current) needs to be saved off, set to null, then reinstated upon [...]]]></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; title: ; notranslate">
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>Isolator for SharePoint by Typemock</title>
		<link>http://www.mylifeinaminute.com/2008/11/24/isolator-for-sharepoint-by-typemock/</link>
		<comments>http://www.mylifeinaminute.com/2008/11/24/isolator-for-sharepoint-by-typemock/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 01:46:27 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Visual Studio 2005]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[Windows SharePoint Services]]></category>
		<category><![CDATA[Isolator]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[Patterns & Practices]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Guidance]]></category>
		<category><![CDATA[Typemock]]></category>
		<category><![CDATA[Unit Testing]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=220</guid>
		<description><![CDATA[Typemock have just released their newest product, Isolator for SharePoint.  Isolator is required to run the unit tests included in the latest release from the Patterns &#38; Practices group for SharePoint guidance.  Oh, and did I mention that you might be able to snag a full license? Typemock are offering their new product for unit [...]]]></description>
			<content:encoded><![CDATA[<p>Typemock have just released their newest product, <a title="Isolator for SharePoint" href="http://www.typemock.com/sharepointpage.php?utm_source=sp_bb&amp;utm_medium=blog_4sp&amp;utm_campaign=sp_bb">Isolator for SharePoint</a>.  Isolator is required to run the unit tests included in the latest release from the <a title="patterns &amp; practices SharePoint Guidance" href="http://www.codeplex.com/spg">Patterns &amp; Practices group for SharePoint guidance</a>.  Oh, and did I mention that you might be able to snag a full license?</p>
<p>Typemock are offering their new product for <a href="http://www.typemock.com/sharepointpage.php?utm_source=sp_bb&amp;utm_medium=blog_4sp&amp;utm_campaign=sp_bb">unit testing SharePoint</a> called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to <a href="http://blog.typemock.com/2008/11/newisolatorforsharepointtoolforunittest.html?utm_source=typeblog&amp;utm_medium=sp_bb&amp;utm_campaign=typeblog">unit test SharePoint</a> without a SharePoint server. To learn more <a href="http://www.typemock.com/sharepointpage.php?utm_source=sp_bb&amp;utm_medium=blog_4sp&amp;utm_campaign=sp_bb">click here</a>.   <strong>The first 50 bloggers </strong>who blog this text in their blog and tell us about it, will get <span style="color: #ff0000;">a Full Isolator license, Free</span>. for rules and info <a href="http://blog.typemock.com/2008/11/newisolatorforsharepointtoolforunittest.html">click here</a>.</p>
<p><map name='google_ad_map_220_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/220?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_220_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=220&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F11%2F24%2Fisolator-for-sharepoint-by-typemock%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/11/24/isolator-for-sharepoint-by-typemock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Method for Checking Permissions on a SPWeb Object</title>
		<link>http://www.mylifeinaminute.com/2008/11/21/custom-method-for-checking-permissions-on-a-spweb-object/</link>
		<comments>http://www.mylifeinaminute.com/2008/11/21/custom-method-for-checking-permissions-on-a-spweb-object/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 14:24:20 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[.NET]]></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[SPBasePermissions]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=189</guid>
		<description><![CDATA[The out-of-the-box method DoesUserHavePermissions() on an SPWeb object does not take indirect membership into account (i.e. the current user is a member of a domain group that has access the the SPWeb being checked).  To get around this, I use the following method (DoesUserHavePermssionsToWeb(SPUser, SPWeb)): Note that in the above method is checking for SPBasePermissions [...]]]></description>
			<content:encoded><![CDATA[<p>The out-of-the-box method <a title="DoesUserHavePermissions Method" href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.doesuserhavepermissions.aspx">DoesUserHavePermissions()</a> on an SPWeb object does not take indirect membership into account (i.e. the current user is a member of a domain group that has access the the SPWeb being checked).  To get around this, I use the following method (<strong>DoesUserHavePermssionsToWeb(SPUser, SPWeb)</strong>):</p>
<p><span id="more-189"></span></p>
<pre>
<pre class="brush: csharp; title: ; notranslate">
        private bool DoesUserHavePermssionsToWeb(ref SPUser user, ref SPWeb web)
        {
            bool hasPermission = false;

            SPBasePermissions perms = this.GetPermissionsForUser(ref user, ref web);
            if (perms.ToString().Contains(SPBasePermissions.Open.ToString())
                    || perms.ToString().Contains(SPBasePermissions.FullMask.ToString()))
                hasPermission = true;
            if (!hasPermission)
            {
                // Check the users groups - this is for indirect membership;
                foreach (string groupLoginName in this.GetCurrentUserADGroups())
                {
                    try
                    {
                        SPUser groupUser = web.SiteUsers[groupLoginName];

                        perms = this.GetPermissionsForUser(ref groupUser, ref web);
                        if (perms.ToString().Contains(SPBasePermissions.Open.ToString())
                            || perms.ToString().Contains(SPBasePermissions.FullMask.ToString()))
                        {
                            hasPermission = true;
                            break;
                        }
                    }
                    catch { }
                }
            }

            return hasPermission;
        }

        private SPBasePermissions GetPermissionsForUser(ref SPUser user, ref SPWeb web)
        {
            SPBasePermissions perms = SPBasePermissions.EmptyMask;

            try
            {
                SPUserToken userToken = user.UserToken;
                System.Reflection.MethodInfo getPermissions = typeof(Microsoft.SharePoint.Utilities.SPUtility).GetMethod(&quot;GetPermissions&quot;,
                    System.Reflection.BindingFlags.NonPublic |
                    System.Reflection.BindingFlags.Public |
                    System.Reflection.BindingFlags.Instance |
                    System.Reflection.BindingFlags.InvokeMethod |
                    System.Reflection.BindingFlags.Static);

                perms = (SPBasePermissions)getPermissions.Invoke(null, new object[] { userToken, web });
            }
            catch { }

            return perms;
        }

        private System.Collections.ArrayList GetCurrentUserADGroups()
        {
			// Get the current groups for the logged in user;
            System.Collections.ArrayList groups = new System.Collections.ArrayList();
            foreach (System.Security.Principal.IdentityReference group in System.Web.HttpContext.Current.Request.LogonUserIdentity.Groups)
            {
                groups.Add(group.Translate(typeof (System.Security.Principal.NTAccount)).ToString());
            }
            return groups;
        }
</pre>
</pre>
<p>Note that in the above method is checking for <a title="SPBasePermissions Enumeration" href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx">SPBasePermissions</a> of Open and FullMask.</p>
<p>The supporting methods are also included.  After checking the permissions on the web object for the current logged in user, if not permissions have been granted we continue to check each Active Directory group that the current user is a member of.</p>
<p><map name='google_ad_map_189_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/189?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_189_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=189&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F11%2F21%2Fcustom-method-for-checking-permissions-on-a-spweb-object%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/11/21/custom-method-for-checking-permissions-on-a-spweb-object/feed/</wfw:commentRss>
		<slash:comments>1</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>Scott</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></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)]]></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; title: ; notranslate">
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>Scott</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></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>

<!-- Served from: www.mylifeinaminute.com @ 2012-02-07 16:35:37 by W3 Total Cache -->
