<?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</title>
	<atom:link href="http://www.mylifeinaminute.com/tag/visual-studio/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>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 Follow-up</title>
		<link>http://www.mylifeinaminute.com/2008/12/02/isolator-for-sharepoint-follow-up/</link>
		<comments>http://www.mylifeinaminute.com/2008/12/02/isolator-for-sharepoint-follow-up/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 14:00:08 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[Isolator]]></category>
		<category><![CDATA[Typemock]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=225</guid>
		<description><![CDATA[In a follow-up to the previous post relating to Isolator for SharePoint (by Typemock), I was one of the lucky 50 to win a full license.  I suppose it is time to get on to some unit testing.]]></description>
			<content:encoded><![CDATA[<p>In a follow-up to the previous post relating to <a title="Isolator for SharePoint by Typemock" href="/2008/11/24/isolator-for-sharepoint-by-typemock/">Isolator for SharePoint (by Typemock)</a>, I was one of the lucky 50 to win a full license.  I suppose it is time to get on to some unit testing.</p>
<p><map name='google_ad_map_225_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/225?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_225_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=225&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F12%2F02%2Fisolator-for-sharepoint-follow-up%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/12/02/isolator-for-sharepoint-follow-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Web Platform Installer</title>
		<link>http://www.mylifeinaminute.com/2008/12/01/microsoft-web-platform-installer/</link>
		<comments>http://www.mylifeinaminute.com/2008/12/01/microsoft-web-platform-installer/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 15:24:21 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Internet Information Services]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Server 2003]]></category>
		<category><![CDATA[Server 2008]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Web Platform Installer]]></category>

		<guid isPermaLink="false">http://www.mylifeinaminute.com/?p=223</guid>
		<description><![CDATA[Microsoft has just released the Web Platform Installer (RC1).   What is the Web Platform Installer you ask?  From Microsoft: &#8220;The Web Platform Installer (Web PI) is a simple tool that installs Microsoft&#8217;s entire Web Platform, including IIS7, Visual Web Developer 2008 Express Edition, SQL Server 2008 Express Edition and the .NET Framework. Using the Web [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Microsoft" href="/tag/microsoft/">Microsoft</a> has just released the <a title="Microsoft Web Platform Installer (RC1)" href="http://www.microsoft.com/web/channel/products/WebPlatformInstaller.aspx">Web Platform Installer (RC1)</a>.   What is the <a title="Microsoft Web Platform Installer (RC1)" href="http://www.microsoft.com/web/channel/products/WebPlatformInstaller.aspx">Web Platform Installer</a> you ask?  From <a title="Microsoft" href="/tag/microsoft/">Microsoft</a>:</p>
<blockquote><p>&#8220;The Web Platform Installer (Web PI) is a simple tool that installs Microsoft&#8217;s entire Web Platform, including IIS7, Visual Web Developer 2008 Express Edition, SQL Server 2008 Express Edition and the .NET Framework. Using the Web Platform Installer’s user interface, you can choose to install either specific products or the entire Microsoft Web Platform onto your computer. The Web PI also helps keep your products up to date by always offering the latest additions to the Web Platform.&#8221;</p></blockquote>
<p>The Web PI certainly looks promising as a quick ramp-up when setting up a development environment (or even a one-off server environment).</p>
<p><map name='google_ad_map_223_0feb153b14d1a0fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/223?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_223_0feb153b14d1a0fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=223&amp;url= http%3A%2F%2Fwww.mylifeinaminute.com%2F2008%2F12%2F01%2Fmicrosoft-web-platform-installer%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.mylifeinaminute.com/2008/12/01/microsoft-web-platform-installer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: www.mylifeinaminute.com @ 2012-02-07 15:28:39 by W3 Total Cache -->
