<?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>Gabe Hilado&#039;s SharePoint &#38; ASP.NET Blog &#187; SharePoint</title>
	<atom:link href="http://spdeveloper.net/category/sharepoint/feed/" rel="self" type="application/rss+xml" />
	<link>http://spdeveloper.net</link>
	<description>Microsoft, SharePoint, ASP.NET, Software Solutions</description>
	<lastBuildDate>Thu, 29 Sep 2011 15:13:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Metadata Search Web Part is Out!</title>
		<link>http://spdeveloper.net/2011/09/metadata-search-web-part-is-out/</link>
		<comments>http://spdeveloper.net/2011/09/metadata-search-web-part-is-out/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 15:13:35 +0000</pubDate>
		<dc:creator>Gabe Hilado</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Web Parts]]></category>

		<guid isPermaLink="false">http://spdeveloper.net/?p=494</guid>
		<description><![CDATA[I am pleased to announce that the Metadata Search Web Part for SharePoint 2010 is now released! The Web Part allows users to do advanced search in SharePoint 2010 with very minimal configuration. The Web Part has the following features: Search SharePoint lists &#8211; perform advanced searches on any SharePoint list or library using metadata Generate [...]]]></description>
			<content:encoded><![CDATA[<p>I am pleased to announce that the <a href="http://www.spmetadatasearch.com/">Metadata Search Web Part</a> for SharePoint 2010 is now released! The Web Part allows users to do <strong>advanced search</strong> in SharePoint 2010 with very minimal configuration.</p>
<p style="text-align: center;"><img class="aligncenter" title="Metadata Search Screen" src="http://www.spmetadatasearch.com/Images/search-form-preview.jpg" alt="Metadata Search Screen" /></p>
<p>The Web Part has the following features:</p>
<ul>
<li><a href="http://www.spmetadatasearch.com/sharepoint-list-search/">Search SharePoint lists</a> &#8211; perform advanced searches on any SharePoint list or library using metadata</li>
<li><a href="http://www.spmetadatasearch.com/print-sharepoint-list-report/">Generate reports based on SharePoint list items</a> &#8211; export to print-friendly pages or Word documents</li>
<li><a href="http://www.spmetadatasearch.com/sharepoint-theme-examples/">Adaptive styling</a> &#8211; works with any SharePoint 2010 theme and styling</li>
<li>Open-up SharePoint list items on the search result screen</li>
</ul>
<p>You can <a href="http://www.spmetadatasearch.com/download/">download and try</a> the product today!</p>
]]></content:encoded>
			<wfw:commentRss>http://spdeveloper.net/2011/09/metadata-search-web-part-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint Saturday DC #SPSTCDC going on right now!</title>
		<link>http://spdeveloper.net/2011/08/sharepoint-saturday-dc-spstcdc-going-on-right-now/</link>
		<comments>http://spdeveloper.net/2011/08/sharepoint-saturday-dc-spstcdc-going-on-right-now/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 04:02:38 +0000</pubDate>
		<dc:creator>Gabe Hilado</dc:creator>
				<category><![CDATA[Networking Events]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://spdeveloper.net/?p=491</guid>
		<description><![CDATA[Today was the kickoff day for SharePoint Saturday-DC Conference. It was pretty good turn out. Several buildings at Northern Virginia Community College, Annandale Campus were packed with SharePoint peeps. I saw several people I used to work with at previous consulting gigs; it was great to see them and catch up with them. I&#8217;m glad [...]]]></description>
			<content:encoded><![CDATA[<p>Today was the kickoff day for <a title="http://www.spstc.org/Pages/default.aspx" href="http://www.spstc.org/Pages/default.aspx">SharePoint Saturday-DC Conference</a>. It was pretty good turn out. Several buildings at Northern Virginia Community College, <a title="http://www.nvcc.edu/campuses-and-centers/annandale/index.html" href="http://www.nvcc.edu/campuses-and-centers/annandale/index.html">Annandale Campus</a> were packed with SharePoint peeps. I saw several people I used to work with at previous consulting gigs; it was great to see them and catch up with them. I&#8217;m glad that I decided to take a break from development and attend the SharePoint conference. What struck me about this conference is that it truly feelslike a conference. There were booths, networking, in addition to sessions. I&#8217;ve attended SharePoint Saturdays in the past and they ones I attended can be characterized more of a code-camp or &#8220;big meetup&#8221;. This SharePoint Saturday truly is a conference! There are many <a title="http://www.spstc.org/SitePages/Sessions.aspx" href="http://www.spstc.org/SitePages/Sessions.aspx">more sessions</a>, some of them highly technical, for the next two days. So if you are in the DC-VA-MD area and you want to learn more about SharePoint, <a title="http://www.spstc.org/Pages/About.aspx" href="http://www.spstc.org/Pages/About.aspx">please attend</a>!</p>
<p>If you can&#8217;t make it in person, you can follow on Twitter, hashtag #SPSTCDC.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://spdeveloper.net/2011/08/sharepoint-saturday-dc-spstcdc-going-on-right-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Part &#8220;Error Creating Control&#8221; in SharePoint Designer</title>
		<link>http://spdeveloper.net/2011/08/web-part-error-creating-control-spd/</link>
		<comments>http://spdeveloper.net/2011/08/web-part-error-creating-control-spd/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 00:34:28 +0000</pubDate>
		<dc:creator>Gabe Hilado</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint Designer]]></category>
		<category><![CDATA[Web Parts]]></category>

		<guid isPermaLink="false">http://spdeveloper.net/?p=478</guid>
		<description><![CDATA[When you are developing custom SharePoint web parts using SharePoint Object Model, it’s not enough that you can properly render contents in “Browse mode”.  Your web part must also take into account when the page it is attached to goes into “Edit mode”. In this blog post, I enumerate the different states the web part [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://spdeveloper.net/wp-content/uploads/2011/08/SPD-Error-Creating-Control.png"></a>When you are developing custom SharePoint web parts using SharePoint Object Model, it’s not enough that you can properly render contents in “<strong>Browse mode</strong>”.  Your web part must also take into account when the page it is attached to goes into “<strong>Edit mode</strong>”. In this <a href="http://spdeveloper.net/2009/12/programmatically-check-the-web-part-state/">blog post</a>, I enumerate the different states the web part can be in in any given time. Sometimes, you would want to limit the functionality of the web part when it is not in “Browse mode”. And this is why you <a href="http://spdeveloper.net/2009/12/programmatically-check-the-web-part-state/">check what state</a> the part is in before rendering contents for it.</p>
<p>You must also take into consideration the following use-cases that your web part will participate in:</p>
<ul>
<li>From the site’s <em>Web Part Gallery</em>, clicking the web part and rendering it in “<strong>Preview mode</strong>”.</li>
<li>When editing the page that has the web part in <strong>SharePoint Designer 2010</strong>, that the web part renders properly as a user-control.</li>
</ul>
<p>I want to focus on properly rendering the Web part in SharePoint Designer because this is a use-case that can be commonly missed. Today, I was testing a web part I am developing for Zenpo Software Innovations when I encountered the following error in SharePoint Designer 2010:</p>
<div class="wp-caption aligncenter" style="width: 661px"><a href="http://spdeveloper.net/wp-content/uploads/2011/08/SPD-Error-Creating-Control.png"><img title="SPD-Error-Creating-Control" src="http://spdeveloper.net/wp-content/uploads/2011/08/SPD-Error-Creating-Control.png" alt="Error Creating Control in SharePoint Designer" width="651" height="422" /></a><p class="wp-caption-text">“Error Creating Control” – what does that mean?</p></div>
<p style="text-align: left;">&nbsp;</p>
<p style="text-align: left;">The web part’s <strong>OnLoad </strong>and <strong>OnInit </strong>event-handlers didn’t check that the page is in “<strong>design mode</strong>”. So, it tried to render its content as if it was in browse-mode.</p>
<p style="text-align: left;">The web part uses custom JavaScript. I have to register the scripts in order for the web part to use them. I implement the <a href="http://msdn.microsoft.com/en-us/library/xxc4wkxx.aspx" target="_blank">script-registration</a> during the OnInit event of the web part like the following:</p>
<pre class="brush: csharp;">
        protected override void OnInit(EventArgs e)
        {
                if (!Page.ClientScript.IsClientScriptIncludeRegistered(&quot;Script1&quot;))
                {
                     scriptRegistered = false;
                     Page.ClientScript.RegisterClientScriptInclude(&quot;Script1&quot;,
                            Page.ClientScript.GetWebResourceUrl(this.GetType(),
                            &quot;Zenposoft.Script1.js&quot;));
                }
        }
</pre>
<p>This script registration code works fine on the web browser. The problem is when this code is invoked during SPD-editing of the web part page, <strong>Page.ClientScript.GetWebResourceUrl</strong> returns empty string (under normal browsing state, it would have returned the URL to the WebResource.axd file). And you cannot pass an empty string URL to the Page.ClientScript.RegisterClientScriptInclude method (it will throw an exception if you pass an empty URL). The web part really had no business trying to register scripts during design-time.</p>
<p>You might say to yourself, “this shouldn’t be an issue since Web part pages are edited through the browser anyway”. Think again! Web designers at your organization will use SharePoint Designer at some point to edit SharePoint pages and if your web part cannot handle “design mode” correctly, the designers will see the ugly “<strong>Error Creating Control</strong>” in SPD. You cannot instill confidence in the use of your web part if it’s throwing exceptions in SharePoint Designer!!!</p>
<p>So, how do we fix this? You can use the one of the following or both:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spcontext.isdesigntime.aspx" target="_blank">SPContext.Current.IsDesignTime</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.designmode.aspx" target="_blank">Control.DesignMode</a></li>
</ul>
<p>I found this <a href="http://blogs.msdn.com/b/sharepointdesigner/archive/2008/10/03/best-practice-to-create-designer-friendly-server-controls.aspx" target="_blank">Microsoft SharePoint Designer Team Blog post</a> that has nice explanation on how to create “designer friendly controls”. <strong>SPContext.Current.IsDesignTime</strong> and <strong>Control.DesignMode</strong> are mentioned in that blog post.</p>
<p>First, I modify the OnInit event-handler such that I register scripts only when “not in design mode”:</p>
<pre class="brush: csharp;">
        protected override void OnInit(EventArgs e)
        {
            if (!this.DesignMode &amp;&amp; !SPContext.Current.IsDesignTime)
            {
                if (!Page.ClientScript.IsClientScriptIncludeRegistered(&quot;Script1&quot;))
                {
                    scriptRegistered = false;
                    Page.ClientScript.RegisterClientScriptInclude(&quot;Script1&quot;,
                            Page.ClientScript.GetWebResourceUrl(this.GetType(),
                            &quot;Zenposoft.Script1.js&quot;));
                }
            }
        }
</pre>
<p>After deploying the modified Web part, we check SharePoint Designer and the errors are gone:</p>
<div id="attachment_486" class="wp-caption aligncenter" style="width: 671px"><a href="http://spdeveloper.net/wp-content/uploads/2011/08/SPD-Error-Gone.png"><img class="size-full wp-image-486" title="SPD-Error-Gone" src="http://spdeveloper.net/wp-content/uploads/2011/08/SPD-Error-Gone.png" alt="SPD-Error-Gone" width="661" height="408" /></a><p class="wp-caption-text">SharePoint Designer Errors - Gone</p></div>
<p>Yes, the errors are gone but we need to display something where the web part(s) are embedded. If the web part in on the page, the designer should render something there; it can’t be just white-space.</p>
<p>In order to render something in “design mode”, we override the <strong>Render</strong> method of the web part:</p>
<pre class="brush: csharp;">
        protected override void Render(HtmlTextWriter writer)
        {
            if (this.DesignMode || SPContext.Current.IsDesignTime)
            {
                writer.Write(&quot;&lt;input type=&quot;button&quot; value=&quot;Web part is in edit mode...&quot; /&gt;&quot;);
            }
            else
            {
                base.Render(writer);
            }
        }
</pre>
<p>If the web part is in “design mode”, we render a simple HTML button. Otherwise, we let the base class (WebPart) handle the rendering. Deploy the updated web part and you should now see the following in SharePoint Designer:</p>
<div id="attachment_487" class="wp-caption aligncenter" style="width: 448px"><a href="http://spdeveloper.net/wp-content/uploads/2011/08/SPD-Render-Control.png"><img class="size-full wp-image-487" title="SPD-Render-Control" src="http://spdeveloper.net/wp-content/uploads/2011/08/SPD-Render-Control.png" alt="SPD-Render-Control" width="438" height="261" /></a><p class="wp-caption-text">Render HTML button in Desing Mode</p></div>
<p>To summarize, you will want to render web parts correctly in designers such as SPD 2010.  The likelihood that Web designers will edit SharePoint pages in SPD is high enough that you will want to “design mode” for your web part to run properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://spdeveloper.net/2011/08/web-part-error-creating-control-spd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create &#8216;Open Tool Pane&#8217; link in custom .NET Web Parts for SharePoint 2010</title>
		<link>http://spdeveloper.net/2011/07/create-open-tool-pane-link-in-custom-net-web-parts-for-sharepoint-2010/</link>
		<comments>http://spdeveloper.net/2011/07/create-open-tool-pane-link-in-custom-net-web-parts-for-sharepoint-2010/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 18:30:29 +0000</pubDate>
		<dc:creator>Gabe Hilado</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Web Parts]]></category>

		<guid isPermaLink="false">http://spdeveloper.net/?p=466</guid>
		<description><![CDATA[Back in SharePoint 2007, it was pretty popular to use the built-in Javascript function MSOTlPn_ShowToolPane2Wrapper to put the Web part page into edit mode and have the Web part properties editable. Typically, you would put something like the following in your Web part class code: protected override void OnPreRender(EventArgs e) { if (this.Page != null) [...]]]></description>
			<content:encoded><![CDATA[<p>Back in SharePoint 2007, it was pretty popular to use the built-in Javascript function <strong>MSOTlPn_ShowToolPane2Wrapper</strong> to put the Web part page into edit mode and have the Web part properties editable. Typically, you would put something like the following in your Web part class code:</p>
<pre class="brush: csharp;">
protected override void OnPreRender(EventArgs e)
{
   if (this.Page != null)
   {
      if (string.IsNullOrEmpty(SelectedListName))
      {
            placeHolderLiteral.Text = &quot;
Web part is not configured. Please &lt;a href=&quot;\&amp;quot;javascript:MSOTlPn_ShowToolPane2Wrapper('Edit',&quot;&gt;edit the Web part&lt;/a&gt; and choose a list or library.

&quot;;
      }
   }
}
</pre>
<p>In the example above, I render a &#8220;please configure the Web part&#8221; message whenever the SelectedListName of the Web part is not set.</p>
<p>I&#8217;m currently developing a Web part for SharePoint 2010 and I wanted to have a &#8220;configure&#8221; link displayed for the Web part whenever Web properties (i.e. list name, view ID etc.) are not set or specified . I embed a code similar to the above snippet where I use <strong>MSOTlPn_ShowToolPane2Wrapper</strong><strong>. </strong>It didn&#8217;t work!</p>
<p>So, thinking like a developer, I observe how the out-of-the-box Web parts render an &#8220;open tool pane&#8221; hyperlink. I add an Image Viewer web part to a web part page and look at the structure of the hyperlink. Here&#8217;s what I saw:<br />
<a href="http://spdeveloper.net/wp-content/uploads/2011/07/ShowToolPane2Wrapper.png"></a></p>
<p><img class="aligncenter size-full wp-image-467" title="ShowToolPane2Wrapper function" src="http://spdeveloper.net/wp-content/uploads/2011/07/ShowToolPane2Wrapper.png" alt="ShowToolPane2Wrapper function" width="745" height="259" /><br />
I replaced my output code in my web part class from <strong>MSOTlPn_ShowToolPane2Wrapper to <strong>ShowToolPane2Wrapper </strong></strong>and it works!<br />
Please note that I encourage that you put &#8216;this&#8217; (object) as the second argument instead of &#8217;129&#8242;, or &#8217;16&#8242; as you see in some blogs out there. The second parameter is supposed to indicate which Web part to edit. Do you really know at run-time that your Web part is &#8217;129&#8242; or &#8217;16&#8242;? You don&#8217;t! So simply use &#8216;this&#8217;.</p>
]]></content:encoded>
			<wfw:commentRss>http://spdeveloper.net/2011/07/create-open-tool-pane-link-in-custom-net-web-parts-for-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error when you create Search Center Site in SharePoint 2010</title>
		<link>http://spdeveloper.net/2011/05/error-when-you-create-search-center-site-in-sharepoint-2010/</link>
		<comments>http://spdeveloper.net/2011/05/error-when-you-create-search-center-site-in-sharepoint-2010/#comments</comments>
		<pubDate>Fri, 27 May 2011 18:18:52 +0000</pubDate>
		<dc:creator>Gabe Hilado</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://spdeveloper.net/?p=460</guid>
		<description><![CDATA[When you&#8217;re trying to create a Search Center site in SharePoint 2010, you get an error that looks like the following: You have to activate SharePoint Server Publishing Infrastructure in Site Collection Features in order to create Search Center sites:]]></description>
			<content:encoded><![CDATA[<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/Enable-SharePoint-Server-Publishing-Infrastructure.png"></a>When you&#8217;re trying to create a <strong>Search Center</strong> site in SharePoint 2010, you get an error that looks like the following:<br />
<a href="http://spdeveloper.net/wp-content/uploads/2011/05/Unexpected-Error-When-Creating-Search-Center.png"><img class="aligncenter size-medium wp-image-461" title="Unexpected Error When Creating Search Center" src="http://spdeveloper.net/wp-content/uploads/2011/05/Unexpected-Error-When-Creating-Search-Center-300x150.png" alt="Unexpected Error When Creating Search Center" width="300" height="150" /></a></p>
<p>You have to activate<strong> SharePoint Server Publishing Infrastructure </strong> in Site Collection Features in order to create Search Center sites:</p>
<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/Enable-SharePoint-Server-Publishing-Infrastructure.png"><img title="Enable SharePoint Server Publishing Infrastructure" src="http://spdeveloper.net/wp-content/uploads/2011/05/Enable-SharePoint-Server-Publishing-Infrastructure.png" alt="Enable SharePoint Server Publishing Infrastructure" width="1013" height="77" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://spdeveloper.net/2011/05/error-when-you-create-search-center-site-in-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010 in Windows 2008 R2 and Kerberos</title>
		<link>http://spdeveloper.net/2011/05/sharepoint-2010-in-windows-2008-r2-and-kerberos/</link>
		<comments>http://spdeveloper.net/2011/05/sharepoint-2010-in-windows-2008-r2-and-kerberos/#comments</comments>
		<pubDate>Thu, 26 May 2011 19:48:55 +0000</pubDate>
		<dc:creator>Gabe Hilado</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[IIS 7]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://spdeveloper.net/?p=417</guid>
		<description><![CDATA[There are two options when configuring SharePoint 2010 security in &#8220;classic mode&#8221; (as opposed to claims-based). You can use Basic (NTLM) or Negotiate (Kerberos). If you use NTLM, you may run into double-hop issues. This is why you will probably want to use Kerberos over NTLM (this assuming you&#8217;re not yet moving towards claims-based authentication). [...]]]></description>
			<content:encoded><![CDATA[<p>There are two options when configuring SharePoint 2010 security in &#8220;classic mode&#8221; (as opposed to claims-based). You can use <strong>Basic (NTLM)</strong> or <strong>Negotiate (Kerberos)</strong>. If you use NTLM, you may run into <a href="http://www.google.com/#sclient=psy&amp;hl=en&amp;rlz=1R2ADRA_enUS384&amp;source=hp&amp;q=kerberos+double-hop" target="_blank">double-hop issues</a>. This is why you will probably want to use Kerberos over NTLM (this assuming you&#8217;re not yet moving towards claims-based authentication).</p>
<p>So, you want to use Kerberos. During the configuration of SharePoint after installation,  in the Configuration Wizard, you will be asked to choose which security setting you want to use. If you choose Negotiate (Kerberos), and then click Next button on the wizard, you will get a prompt like the following:</p>
<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/sp-secruity-kerberos1.png"><img class="aligncenter size-medium wp-image-429" title="SP Configuration Wizard - Kerberos or NTLM?" src="http://spdeveloper.net/wp-content/uploads/2011/05/sp-secruity-kerberos1-300x250.png" alt="SP Configuration Wizard - Kerberos or NTLM?" width="300" height="250" /></a></p>
<p>What this message tells you is that you or your domain administrators must configuration <strong>Security Principal Names</strong> or <strong>SPNs </strong>in Active Directory.</p>
<p>In case you&#8217;re wondering, here&#8217;s a summary of my SharePoint lab environment:</p>
<ul>
<li>Windows 2008 Server R2 OS on all servers. AD is compatible with Windows Server 2003 features.</li>
<li>Microsoft SQL Server 2008 R2</li>
<li>SharePoint Server 2010</li>
</ul>
<p>You can use use <a href="http://technet.microsoft.com/en-us/library/cc773257(WS.10).aspx" target="_blank">SetSPN tool</a> to configure the SPNs for your SharePoint environment. Or, if you&#8217;re curious to see  what SPNs &#8220;look like&#8221; in Active Directory, you can use ADSIEdit. If you use ADSIEdit, login to the domain controller or use a server that has the Active Directory tools installed in it. When you open up ADSIEdit, expand the CN=Users tree and look for the domain account you want to setup SPNs for. The domain account that you want to setup SPNs for is typically the identity of the SharePoint Web site application pool. In the example below, I was adding SPNs to the &#8220;SP Web App Pool&#8221; account, which will be the service account used by the SharePoint Web site. Right-click the domain account in ADSIEdit and click Properties. In the Attribute Editor tab, look for <strong>servicePrincipalName. </strong></p>
<p><img class="aligncenter size-medium wp-image-432" title="ADSIEDit - Add SPNs" src="http://spdeveloper.net/wp-content/uploads/2011/05/adsiedit-add-spn-300x200.png" alt="ADISEdit - Add SPNs" width="300" height="200" /></p>
<p>Edit it and you can then add the SPNs for the domain account.  I have included a link in the Resources section on the bottom of this article to a Technet article that explains in full detail how to add SPNs in Active Directory.</p>
<p>In addition to adding SPNs to the service account, you must also <strong>enable delegation</strong> for the service account. Go to Active Directory and look for the service account. If you have setup SPNs for the domain account, you should see a Delegation tab on the user properties:</p>
<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/service-account-allow-for-delegation.png"><img class="aligncenter size-medium wp-image-433" title="Service Account allowed for delegation" src="http://spdeveloper.net/wp-content/uploads/2011/05/service-account-allow-for-delegation-221x300.png" alt="Service Account allowed for delegation" width="221" height="300" /></a></p>
<p>Check &#8220;Trust this user for delegation in specified services only&#8221;. And then select &#8220;Use any authentication protocol&#8221;. Finally, add the SPNs to the &#8220;Services to which the account can present delegated credentials&#8221; list. Links on the resources list will show you how to do this in full details.</p>
<p>In MOSS 2007, you have to setup SPNs for the service account and choose Kerberos as authentication mode and your SharePoint is good to go to use Kerberos. Setting up SPNs for SharePoint service accounts is nothing new. Well, in my lab environment, my SharePoint 2010 is running on Windows Server 2008 R2 with IIS7. The expected behaviour after adding SPNs was that the user (me) was prompted 3 times by the SharePoint site and only to render nothing after the 3 prompts for login. No matter how carefully I typed-in a domain account into the login prompt, I couldn&#8217;t get in!</p>
<p>Apparently, in IIS7, there are new settings that you have to configure in addition to setting up SPNs for the service account. You have to edit the <strong>applicationHost.config</strong> file in order to enable <strong>WindowsAuthentication</strong>. This <a href="http://www.iis.net/ConfigReference/system.webServer/security/authentication/windowsAuthentication" target="_blank">IIS.NET article</a> explains that IIS7 installs with windowsAuthentication disabled by default. But I have to give credit to Spence for his <a href="http://www.harbar.net/archive/2008/05/18/Using-Kerberos-with-SharePoint-on-Windows-Server-2008.aspx" target="_blank">SharePoint article on how to enable Kerberos</a>. Spence&#8217;s article was what actually got me moving in the right direction.</p>
<p>So I enabled windowsAuthentication (list of resources at the bottom of this article). When I tried to connect to the SharePoint site, I was being prompted to login!! Why?? So I typed-in domain account. On the first attempt, I was able to get into the SharePoint site.</p>
<p>It felt like challenge-response (NTLM) because I was prompted to login. I look at the Security Event Log of the SharePoint Web server. I see that the user logged-in using Kerberos!</p>
<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/event-4624.png"><img class="aligncenter size-medium wp-image-434" title="Event 4624 in Security Event Log" src="http://spdeveloper.net/wp-content/uploads/2011/05/event-4624-300x208.png" alt="Event 4624 in Security Event Log" width="300" height="208" /></a></p>
<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/event-4624-showing-its-kerberos.png"><img class="aligncenter size-medium wp-image-435" title="Event 4624 showing it was Kerberos" src="http://spdeveloper.net/wp-content/uploads/2011/05/event-4624-showing-its-kerberos-300x195.png" alt="Event 4624 showing it was Kerberos" width="300" height="195" /></a></p>
<p>So what now? Why was I still getting prompted to login? I forgot something&#8211;Internet Explorer security settings! I have to add the URL to my SharePoint 2010 portal in <strong>Intranet Zone sites</strong>. Also, you have to configure the &#8220;Custom Level&#8221; of the Intranet zone such that &#8220;Automatic logon onl in Intranet zone&#8221; is selected:</p>
<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/Internet-Explorer-Security-Settings-for-Intranet-Zone.png"><img class="aligncenter size-medium wp-image-436" title="Internet Explorer Security Settings for Intranet Zone" src="http://spdeveloper.net/wp-content/uploads/2011/05/Internet-Explorer-Security-Settings-for-Intranet-Zone-264x300.png" alt="Internet Explorer Security Settings for Intranet Zone" width="264" height="300" /></a></p>
<p>If the SharePoint site is not detected as an Intranet zone, you will notice in IE status bar:</p>
<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/portal-internet-zone.png"><img class="aligncenter size-medium wp-image-437" title="SharePoint Portal - Internet Zone" src="http://spdeveloper.net/wp-content/uploads/2011/05/portal-internet-zone-300x165.png" alt="SharePoint Portal - Internet Zone" width="300" height="165" /></a></p>
<p>If you have admin rights to the workstation, you can probably edit the list of sites in Intranet Zones in IE Security settings and enable automatic logon in Intranet sites Well, in my setup, the workstation&#8211;what a user can change and cannot change&#8211;is controlled by group policies.</p>
<p>I had to create a new group policy and link it to my domain (or you can edit the default group policy for the domain if it&#8217;s just a lab environment) When editing the GPO, the path to add SharePoint sites to Intranet Zone is:</p>
<p>Computer Configuration&gt;Administrative Templates&gt;Windows Components&gt;Internet Explorer&gt;Internet Control Panel&gt;Security Page&gt;Site to Zone Assignment List</p>
<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/site-to-zone-assignments-list-GPO.png"><img class="aligncenter size-medium wp-image-438" title="IE Site to Zone Assignment List in GPO" src="http://spdeveloper.net/wp-content/uploads/2011/05/site-to-zone-assignments-list-GPO-300x162.png" alt="IE Site to Zone Assignment List in GPO" width="300" height="162" /></a></p>
<p>When you edit the Site to Zone Assignment list, you&#8217;ll be presented a dialog box. You can add the sites (typically just make it &#8220;http//*.yourFQDN&#8221; so that all sites in your lab environment are detected as Intranet sites):</p>
<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/enter-zone-assignments-GPO.png"><img class="aligncenter size-medium wp-image-439" title="Enter zone assignments in GPO" src="http://spdeveloper.net/wp-content/uploads/2011/05/enter-zone-assignments-GPO-300x205.png" alt="Enter zone assignments in GPO" width="300" height="205" /></a></p>
<p>After editing GPO, propagate the new policy by restarting the workstation. After the workstation restarts, I hit the SharePoint site again and no more login prompts!! Also, notice on the status bar that the SharePoint site is detected as an Intranet site:</p>
<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/portal-intranet-zone.png"><img class="aligncenter size-medium wp-image-440" title="Portal Intranet Zone" src="http://spdeveloper.net/wp-content/uploads/2011/05/portal-intranet-zone-300x157.png" alt="Portal Intranet Zone" width="300" height="157" /></a></p>
<p>Hopefully, this article demonstrated to you how to configure Kerberos for SharePoint 2010. Yes, claims-based authentication is supposed to be the &#8220;preferred&#8221; mode these days in SharePoint but plenty of organizations out there will stick with Kerberos (Windows integrated security) for a little while. If anything, this article serve as a jump point to other great articles out there on how to accomplish Kerberos in SharePoint. List of links below.</p>
<p><span style="text-decoration: underline;">Resources:</span></p>
<ul>
<li>Full Technet article on how to configure Kerberos authentication for SharePoint 2010. Very comprehensive. It talks about SPNs and how to add them in Active Directory. This is a good place to start: <a href="http://technet.microsoft.com/en-us/library/gg502602.aspx">http://technet.microsoft.com/en-us/library/gg502602.aspx</a></li>
<li>SharePoint 2010 and Kerberos: <a href="http://www.harbar.net/archive/2010/03/31/sharepoint-2010-and-kerberos.aspx">http://www.harbar.net/archive/2010/03/31/sharepoint-2010-and-kerberos.aspx</a></li>
<li>Using Kerberos with SharePoint on Windows Server 2008: <a href="http://www.harbar.net/archive/2008/05/18/Using-Kerberos-with-SharePoint-on-Windows-Server-2008.aspx">http://www.harbar.net/archive/2008/05/18/Using-Kerberos-with-SharePoint-on-Windows-Server-2008.aspx</a></li>
<li>Very detailed walkthrough on how to enable Kerberos for ANY Web application: <a href="http://blogs.technet.com/b/askds/archive/2008/05/29/kerberos-authentication-problems-service-principal-name-spn-issues-part-1.aspx">http://blogs.technet.com/b/askds/archive/2008/05/29/kerberos-authentication-problems-service-principal-name-spn-issues-part-1.aspx</a></li>
<li>Configuring Kerberos Authentication in SharePoint 2010: <a href="http://blogs.msdn.com/b/russmax/archive/2009/10/20/configuring-kerberos-authentication-in-sharepoint-2010-part-1.aspx">http://blogs.msdn.com/b/russmax/archive/2009/10/20/configuring-kerberos-authentication-in-sharepoint-2010-part-1.aspx</a></li>
<li>&lt;windowsAuthentication&gt; element in IIS 7: <a href="http://www.iis.net/ConfigReference/system.webServer/security/authentication/windowsAuthentication">http://www.iis.net/ConfigReference/system.webServer/security/authentication/windowsAuthentication</a></li>
<li>How to use Group Policy to configure Internet Explorer Security Zones: <a href="http://www.grouppolicy.biz/2010/03/how-to-use-group-policy-to-configure-internet-explorer-security-zone-sites/">http://www.grouppolicy.biz/2010/03/how-to-use-group-policy-to-configure-internet-explorer-security-zone-sites/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spdeveloper.net/2011/05/sharepoint-2010-in-windows-2008-r2-and-kerberos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sharepoint Products Configuration Wizard-CREATE DATABASE permission denied</title>
		<link>http://spdeveloper.net/2011/05/sharepoint-products-configuration-wizard-create-database-permission-denied/</link>
		<comments>http://spdeveloper.net/2011/05/sharepoint-products-configuration-wizard-create-database-permission-denied/#comments</comments>
		<pubDate>Fri, 20 May 2011 19:46:13 +0000</pubDate>
		<dc:creator>Gabe Hilado</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Deployment]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint Installation]]></category>

		<guid isPermaLink="false">http://spdeveloper.net/?p=400</guid>
		<description><![CDATA[When you run the SharePoint Products Configuration Wizard for the first time, you get the following error: System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in database &#8216;master&#8217;. This means that the domain account you specified to connect to the SQL Server does not have permissions to create the SharePoint config database. So go to your SQL Server [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/sp-configuration-failed-create-db-denied.png"></a>When you run the SharePoint Products Configuration Wizard for the first time, you get the following error:</p>
<p style="text-align: center;"><strong><em><a href="http://spdeveloper.net/wp-content/uploads/2011/05/sp-configuration-failed-create-db-denied.png"><img class="aligncenter" title="Configuration Failed" src="http://spdeveloper.net/wp-content/uploads/2011/05/sp-configuration-failed-create-db-denied-300x251.png" alt="Configuration Failed" width="300" height="251" /></a></em></strong></p>
<p><strong><em>System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in database &#8216;master&#8217;.</em></strong></p>
<p>This means that the domain account you specified to connect to the SQL Server does not have permissions to create the SharePoint config database. So go to your SQL Server and add the <strong>dbcreator</strong> role to your <strong>SharePoint Service account</strong>.</p>
<p><a href="http://spdeveloper.net/wp-content/uploads/2011/05/add-dbcreator-role-to-sp-account.png"><img class="aligncenter size-medium wp-image-404" title="Add dbcreator Role to SP Account" src="http://spdeveloper.net/wp-content/uploads/2011/05/add-dbcreator-role-to-sp-account-300x119.png" alt="Add dbcreator Role to SP Account" width="300" height="119" /></a></p>
<p>Please don&#8217;t make the SharePoint Service account elevated to domain admin level in AD or SysAdmin in SQL Server! It&#8217;s not necessary!</p>
]]></content:encoded>
			<wfw:commentRss>http://spdeveloper.net/2011/05/sharepoint-products-configuration-wizard-create-database-permission-denied/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error installing SharePoint 2010 Prerequisites</title>
		<link>http://spdeveloper.net/2011/05/error-installing-sharepoint-2010-prerequisites/</link>
		<comments>http://spdeveloper.net/2011/05/error-installing-sharepoint-2010-prerequisites/#comments</comments>
		<pubDate>Thu, 19 May 2011 19:45:15 +0000</pubDate>
		<dc:creator>Gabe Hilado</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Deployment]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint Installation]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://spdeveloper.net/?p=392</guid>
		<description><![CDATA[When installing SharePoint, you have to install prerequisites first. If you launch the SharePoint Prerequisites Installer from the SharePoint setup GUI (clicking the link), you may notice that most prerequisites (like IIS) installs correctly but there are some that wouldn&#8217;t install correctly. Some of the errors that I experienced: Error: Startup task doesn&#8217;t exist. This [...]]]></description>
			<content:encoded><![CDATA[<div>When installing SharePoint, you have to install prerequisites first. If you launch the <strong>SharePoint Prerequisites Installer</strong> from the SharePoint setup GUI (clicking the link), you may notice that most prerequisites (like IIS) installs correctly but there are some that wouldn&#8217;t install correctly. Some of the errors that I experienced:</div>
<ul>
<li>Error: Startup task doesn&#8217;t exist. This is not a continuation after a restart.</li>
<li>Error: This file does not exist</li>
<li>Error: The tool was unable to install Hotfix for <strong>Microsoft Windows (KB976462)</strong>.</li>
</ul>
<p>I searched the Web for the errors I got and it seem that a common recommendation is to simply run prerequisiteinstaller.exe from the command-line:</p>
<ul>
<li>Open up a command window</li>
<li>Go to your SharePoint setup location (like D:\ if running from CD drive)</li>
<li>Enter &#8220;prerequisiteinstaller.exe&#8221; and then press enter</li>
<li>A GUI would popup but just go ahead and proceed. It should finish installation.</li>
<li>Review the log file, located in <em>%DEFAULTUSERPROFILE%\Temp</em> and named <em>PrerequisiteInstaller.[datetime].log</em>. Make sure there are no errors on the latest log file.</li>
</ul>
<div>If no more errors, proceed with SharePoint 2010 installation.</div>
]]></content:encoded>
			<wfw:commentRss>http://spdeveloper.net/2011/05/error-installing-sharepoint-2010-prerequisites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Internal 500 Error When Changing the URL to a Badly-Formed Value</title>
		<link>http://spdeveloper.net/2010/06/internal-500-error-when-changing-the-url-to-a-badly-formed-value/</link>
		<comments>http://spdeveloper.net/2010/06/internal-500-error-when-changing-the-url-to-a-badly-formed-value/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 18:30:44 +0000</pubDate>
		<dc:creator>Gabe Hilado</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[STSADM]]></category>
		<category><![CDATA[WSS 3.0]]></category>

		<guid isPermaLink="false">http://spdeveloper.net/?p=349</guid>
		<description><![CDATA[Interesting issue we had to troubleshoot today. This issue is related to SharePoint 2007.  Say you have a sub-site in a SharePoint site collection (let&#8217;s call it &#8220;Subsite A&#8221;) and the user/admin changes the URL of the site to something malformed, what happens? We start &#8220;Subsite A&#8221; like the following: Then, we change the URL [...]]]></description>
			<content:encoded><![CDATA[<p>Interesting issue we had to troubleshoot today. This issue is related to SharePoint 2007.  Say you have a sub-site in a SharePoint site collection (let&#8217;s call it &#8220;Subsite A&#8221;) and the user/admin changes the URL of the site to something malformed, what happens?</p>
<p>We start &#8220;Subsite A&#8221; like the following:</p>
<p><img class=" alignnone" title="Sample SharePoint Web Site" src="http://spdeveloper.net/wp-content/uploads/2010/06/062410_1829_Internal5001.png" alt="" width="628" height="393" /></p>
<p>Then, we <strong>change the URL into something malformed</strong> (deliberately for this exercise). See the Web Site Address field below? We&#8217;re purposely putting in a bad value (the end-user accidentally did it in the real-world scenario).</p>
<p><img class=" alignnone" title="Changing the Web Site URL with Badly-Formed Value" src="http://spdeveloper.net/wp-content/uploads/2010/06/062410_1829_Internal5002.png" alt="" width="628" height="416" /></p>
<p>After you click the <em>Save</em> button on the <em>Title, Description, and Icon</em> Settings Page, you get the following error on the browser:</p>
<p><strong><em>This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.<br />
</em></strong></p>
<p>Trying to access the site yields HTTP 500 error:</p>
<p><img class=" alignnone" title="Internal 500 error when you try to access the SharePoint site" src="http://spdeveloper.net/wp-content/uploads/2010/06/062410_1829_Internal5003.png" alt="" width="628" height="408" /></p>
<p>You think maybe you can rename using SharePoint Designer. But SP Designer throws you an error message instead:</p>
<p><img class=" alignnone" title="Server error: The version of the Windows SharePoint Services running on the server is more recent than the version of the SharePoint Designer you are using. You need a more recent version of the SharePoint Designer." src="http://spdeveloper.net/wp-content/uploads/2010/06/062410_1829_Internal5004.png" alt="" width="628" height="363" /></p>
<p><strong><em>Server error: The version of the Windows SharePoint Services running on the server is more recent than the version of the SharePoint Designer you are using. You need a more recent version of the SharePoint Designer.</em></strong></p>
<p>But the SharePoint Designer error message is misleading&#8211;the SharePoint site is MOSS 2007. It&#8217;s the bad URL causing this.</p>
<p>You can fix this by using <strong>STSADM renameweb</strong> command. In the screenshot below, I rename the badly-formed URL to its original URL using <strong>STSADM renameWeb</strong>:</p>
<p><img src="http://spdeveloper.net/wp-content/uploads/2010/06/062410_1829_Internal5005.png" alt="" /></p>
<p>The site owner accidentally put in a bad URL and that is why we&#8217;re using STSADM to fix it. It&#8217;s hard to mess-up the site-collection URL. But if you need to change the URL of a site-collection, you can use <strong>STSADM renamesite</strong>.</p>
<p>For more details on how to use these commands, visit:</p>
<ul>
<li><a href="http://support.microsoft.com/kb/939535">How to use the new &#8220;renamesite&#8221; operation to change the URL of a host-named site collection in Windows SharePoint Services 3.0.</a></li>
<li><a href="http://technet.microsoft.com/en-us/library/cc287716(office.12).aspx">Renameweb Stsadm operation (Windows SharePoint Services)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spdeveloper.net/2010/06/internal-500-error-when-changing-the-url-to-a-badly-formed-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 Visual Web Part Project</title>
		<link>http://spdeveloper.net/2010/06/visual-studio-2010-visual-web-part-project/</link>
		<comments>http://spdeveloper.net/2010/06/visual-studio-2010-visual-web-part-project/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 03:06:19 +0000</pubDate>
		<dc:creator>Gabe Hilado</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[MOSS 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Web Parts]]></category>
		<category><![CDATA[WSP]]></category>

		<guid isPermaLink="false">http://spdeveloper.net/?p=334</guid>
		<description><![CDATA[I am in the process of getting up to speed with the new Visual Studio 2010 IDE and how it can be used to develop custom SharePoint 2010 solutions. It’s so easy to do a “Hello World” Web part project now. These days, my Hello World projects typically involve opening up a database table and [...]]]></description>
			<content:encoded><![CDATA[<p>I am in the process of getting up to speed with the new <strong>Visual Studio 2010</strong> IDE and how it can be used to develop custom SharePoint 2010 solutions.</p>
<p>It’s so easy to do a “Hello World” Web part project now. These days, my Hello World projects typically involve opening up a database table and displaying records in a table. I was able to do this with minimal coding and got it up and running—a full blown Web part—in under 15 minutes!</p>
<p>I created a sample project that opens up the <a href="http://msftdbprodsamples.codeplex.com/" target="_blank">AdventureWorks</a> database and displays employee records in a table:</p>
<p style="text-align: center;">
<div class="wp-caption aligncenter" style="width: 344px"><a href="http://spdeveloper.net/wp-content/uploads/2010/06/image1.png"><img style="display: block; border: 0px;" title="Sample Visual Web Part Project using Adventure Works Database" src="http://spdeveloper.net/wp-content/uploads/2010/06/image_thumb1.png" border="0" alt="Sample Visual Web Part Project using Adventure Works Database" width="334" height="430" /></a><p class="wp-caption-text">Sample Visual Web Part Project using Adventure Works Database</p></div>
<p style="text-align: left;">The Web-part looks like the following when used inside SharePoint:</p>
<p style="text-align: center;">
<div class="wp-caption aligncenter" style="width: 733px"><a href="http://spdeveloper.net/wp-content/uploads/2010/06/image2.png"><img style="display: inline; border: 0px;" title="AdventureWorks Employees Web Part" src="http://spdeveloper.net/wp-content/uploads/2010/06/image_thumb2.png" border="0" alt="AdventureWorks Employees Web Part" width="723" height="384" /></a><p class="wp-caption-text">AdventureWorks Employees Web Part So far, I like it!Here are my first impressions:SharePoint project templates come out-of-the-box install of VS 2010. After installing VS 2010, the SharePoint project templates are ready for use. No need to do installations of VS-extensions.SharePoint Project Templates in Visual Studio 2010</p></div>
<p style="text-align: center;"> </p>
<ul>
<li>The <strong>Visual Web Part</strong> project cannot be deployed as a “sandboxed solution”. It has to be deployed as a <strong>farm solution</strong>.</li>
<li><strong>Project-debugging became a lot easier</strong> even with a full-blow farm-deployment. Press F5 in the VS 2010 IDE and Visual Studio will build, package, deploy, and activate your feature, and launch the debug-browser all in one click! When you’re done debugging, terminate Internet Explorer, Visual Studio will deactivate and retract the solution out of SharePoint.</li>
<li>IIS-reset (for the target Web app) even for full-blown deployments when debugging is fast!</li>
<li>Remember in VSeWSS 1.3 where you had to Google first <a href="http://www.google.com/#hl=en&amp;rlz=1W1ADRA_en&amp;q=vsewss+1.3+specify+web+part+group+element.xml&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=vsewss+1.3+specify+web+part+group+element.xml&amp;gs_rfai=&amp;fp=7b315f504f01d538" target="_blank">how to specify the group the Web part appears in</a> because it wasn’t so obvious? Well, it got easier in VS 2010! Now, the E<strong>lements.xml</strong> file has a place-holder for the <strong>Web-part group</strong>. All you have to do, is change it from “<em>Custom</em>” to whatever value you want it to be. It’s so visible now you can’t miss it.</li>
</ul>
<p style="text-align: center;">
<div class="wp-caption aligncenter" style="width: 626px"><a href="http://spdeveloper.net/wp-content/uploads/2010/06/image4.png"><img style="display: block; border: 0px;" title="Web-Part Group Place-Holder in Elements.xml File" src="http://spdeveloper.net/wp-content/uploads/2010/06/image_thumb4.png" border="0" alt="Web-Part Group Place-Holder in Elements.xml File" width="616" height="277" /></a><p class="wp-caption-text">Web-Part Group Place-Holder in Elements.xml File</p></div>
<p style="text-align: center;"> </p>
<ul>
<li>You can now <strong>add Web User Controls (ASCX files) into the project!</strong> As a matter of fact, the project template adds one ASCX file for you. This just made Web Part development a HECK of a lot easier! This is HUGE! Back in VS 2008 developing SharePoint 2007 Web parts, there were no designers available. If developers wanted to use ASCX files, they had to create regular ASP.NET Web apps, design the ASCX files there, write the code-behind, compile the project so the code-behind logic gets packaged with the ASCX files, deploy the ASCX files to UserControls folder within the SharePoint virtual Web app folder, deploy and enable Smart Part, add a Smart Part Web part to the SharePoint pages, then finally, hook-up the Smart Part to the ASCX files. Whew!!! Talk about LOTS of steps! In VS 2010, you don’t need Smart Part or that lengthy way to integrate ASCX file in SharePoint anymore. The challenge of “imagining” what your Web part will look like as you write your C# code is no more. The designer is built in to the Visual Web Part project. Leverage your ASP.NET skills to the max.</li>
<li>Despite all the improvements, Web part development veterans should recognize familiar concepts and project files such as Elements.xml, .webpart file, strong-named key file, packages and features. </li>
</ul>
<p>I have many ASP.NET developer friends who didn’t want to get into SharePoint development because:</p>
<ul>
<li>The Web part project wasn’t easy in SharePoint 2007. No designers, hard to design a visual element.</li>
<li>ASP.NET developers got accustomed to easy debugging of their projects by simply pressing F5 key or the play button on the IDE toolbar. In 2007, ASP.NET developers thought deploying the app and then attaching to the w3wp.exe process (multiple manual steps, not one) was too cumbersome.</li>
<li>It took forever to even debug the code because the SharePoint Web app always recycled on deployments.</li>
</ul>
<p>If you are an ASP.NET developer contemplating if you should try SharePoint development, I highly recommend you try it NOW! SharePoint 2010 development feels like traditional ASP.NET development more than ever!</p>
]]></content:encoded>
			<wfw:commentRss>http://spdeveloper.net/2010/06/visual-studio-2010-visual-web-part-project/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

