<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6363288400368237015</id><updated>2012-02-03T20:40:33.731-05:00</updated><category term='Managed Metadata Service'/><category term='SharePoint 2010 Public Facing Sites'/><category term='Claims Based Authentication'/><category term='SharePoint 2010 Automation'/><category term='SharePoint 2010 Errors'/><category term='SharePoint 2010 Search Customization'/><category term='PowerShell'/><category term='SharePoint 2010 Development'/><category term='LINQ to SharePoint 2010'/><category term='SharePoint 2010 Excel Services'/><category term='CAML'/><category term='SharePoint 2010'/><category term='SharePoint 2010 Content Deployment'/><category term='FBA'/><category term='Code Samples'/><category term='List Joins'/><title type='text'>SharePoint Learning Curve</title><subtitle type='html'>A journey of learning SharePoint 2010, from the viewpoint of a SharePoint 2007 professional.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-4600706265069649837</id><published>2010-11-29T18:08:00.000-05:00</published><updated>2010-11-29T18:08:49.578-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 - Replace missing Publishing Site Columns and Content Types</title><content type='html'>While working on a new content type that inherited from Article Page, I somehow lost a lot of Site Columns. When I tried to view the Article Page content type, it had no columns listed!&lt;br /&gt;&lt;br /&gt;This ended up being a simple fix. Run the following command to reinstall the Site Columns and Content Types that are used by Publishing:&lt;br /&gt;&lt;br /&gt;stsadm -o activatefeature -name PublishingResources -url http://MySharePointSite -force&lt;br /&gt;&lt;br /&gt;Once that operation completes, the missing columns should now be back. Don't forget to fix the feature that caused the problem!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-4600706265069649837?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/4600706265069649837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/11/sharepoint-2010-replace-missing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4600706265069649837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4600706265069649837'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/11/sharepoint-2010-replace-missing.html' title='SharePoint 2010 - Replace missing Publishing Site Columns and Content Types'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-1917432890889321682</id><published>2010-11-24T10:32:00.000-05:00</published><updated>2010-11-24T10:32:23.805-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Public Facing Sites'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Content Deployment'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 - Content Deployment Woes Part 2: Custom Features</title><content type='html'>If you are reading this post, please read through my &lt;a href="http://sharepointlearningcurve.blogspot.com/2010/11/sharepoint-2010-content-deployment-woes.html"&gt;previous post&lt;/a&gt; on this topic to get some background on tricks to solving the "Could not find Feature" issue with built-in SharePoint features.&lt;br /&gt;&lt;br /&gt;If you are still reading, then you have probably built and deployed custom features to your farm, such as a web part. You are then running into problems during Content Deployment jobs between farms that have different SharePoint versions on them, such as deploying from Enterprise to Standard.&lt;br /&gt;&lt;br /&gt;The solution that worked for the built-in features was appropriate because the features that were causing the problems didn't need to be installed on your destination farm. But with custom features, that is not the case. You built them precisely because you need to be able to run them on the destination farm.&lt;br /&gt;&lt;br /&gt;I encountered this same problem and it took me a little while to figure out why it was unhappy. Here are the steps I'd suggest you follow:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Check the 14-hive on the destination Web Front End to verify your feature is there.&lt;/li&gt;&lt;li&gt;Verify that your feature is installed in the destination site. For instance, check the Site Features page for features scoped to the Site level&lt;/li&gt;&lt;li&gt;Try enabling the feature and making sure it doesn't thrown any errors&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Maybe you've done all those things and the feature looks good, but it's still not working? At this point, you should be confused. I know I was. I decided to check the settings on my package in Visual Studio. The Deployment Server Type was set to WebFrontEnd, which was correct. I then checked the 14-hive on the destination App Server, which is where Content Deployment jobs are run. No feature folder there.&lt;br /&gt;&lt;br /&gt;Now I know what you're thinking - isn't that what we want? Solutions that are targeted as WebFrontEnd are marked that way for a reason - they don't need to be on the App Server because it's not serving up those web parts. Well, when it comes to Content Deployment, apparently they &lt;b&gt;DO&lt;/b&gt; need to be there. I assume this is because the Content Deployment job is going through Central Administration, which is living on your App Server.&lt;br /&gt;&lt;br /&gt;The solution I came up with was to enable the Microsoft SharePoint Foundation Web Application service on my App Server, effectively making it a Web Front End as well. This ensures that when I add solutions to my farm that the features get deployed to my App Server as well, effectively squashing the Content Deployment job errors I was receiving.&lt;br /&gt;&lt;br /&gt;My App Server is already segmented off from the Web Front Ends by a firewall to keep it from being accessible from the internet. However, to ensure that my App Server is never used as a Web Front End, I am also making sure it is never listed in the load balancer and I am blocking traffic to port 80 on that box. This means there should be no real impact to the machine and my Content Deployment jobs can now run successfully.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-1917432890889321682?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/1917432890889321682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/11/sharepoint-2010-content-deployment-woes_24.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/1917432890889321682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/1917432890889321682'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/11/sharepoint-2010-content-deployment-woes_24.html' title='SharePoint 2010 - Content Deployment Woes Part 2: Custom Features'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-4526353387479824239</id><published>2010-11-24T10:19:00.000-05:00</published><updated>2010-11-24T10:19:34.818-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Public Facing Sites'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Content Deployment'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 - Content Deployment Woes</title><content type='html'>Lately I've been working a lot with Publishing sites, which means I've been using Content Deployment jobs to move content between my farms. Unfortunately, I've learned the hard way that this part of SharePoint is rather particular about farm setups.&lt;br /&gt;&lt;br /&gt;I have an Enterprise development farm that I use for consulting work. I built some pages on it and then wanted to deploy them to my customer's test farm, which runs a Standard license. This broke on me every single time. Specifically, I kept getting errors that features didn't exist on my destination farm.&lt;br /&gt;&lt;br /&gt;One message I got was "Could not find feature IPFSSiteFeatures". Here are the screenshots from my deployment report: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_0gM-pvb17tc/TO0rQZepZ_I/AAAAAAAAAFA/88skCOEbCto/s1600/4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_0gM-pvb17tc/TO0rQZepZ_I/AAAAAAAAAFA/88skCOEbCto/s1600/4.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_0gM-pvb17tc/TO0q-PyTvuI/AAAAAAAAAE8/bZFv3N2NfLo/s1600/3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="32" src="http://4.bp.blogspot.com/_0gM-pvb17tc/TO0q-PyTvuI/AAAAAAAAAE8/bZFv3N2NfLo/s640/3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;These are all the features that existed on my Enterprise development farm but not on my Standard test farm:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;IPFSSiteFeatures&lt;/li&gt;&lt;li&gt;WACustomReports&lt;/li&gt;&lt;li&gt;PPSWorkspaceCtype&lt;/li&gt;&lt;li&gt;PPSMonDatasourceCtype&lt;/li&gt;&lt;li&gt;PPSWebParts&lt;/li&gt;&lt;li&gt;PPSSiteCollectionMaster&lt;/li&gt;&lt;/ul&gt;To get my content deployment working again, I enabled them temporarily on the destination farm, performed the deployment, and then disabled them again. You might also be able to disable/uninstall those features on your Enterprise farm before doing the content deployment job and achieve success, but I didn't test that option. &lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt;: Make sure you disable these features on your destination farm after deployment, or you may be in violation of your SharePoint license.&lt;br /&gt;&lt;br /&gt;If you made the mistake of installing Excel Services and PerformancePoint Services on your Enterprise environment, your problems are more difficult. If you run &lt;b&gt;Get-SPFeature&lt;/b&gt;, you will see more items in the list that will cause your content deployment to fail, such as BizAppsListTemplates.&lt;br /&gt;&lt;br /&gt;You might be tempted to disable them on your source farm. Unfortunately, when I tried, I learned you cannot disable them with PowerShell because they are still in use. However, those features aren't activated on any of my sites. Because of my failure to disable them on the source farm, I did not test enabling them on the destination farm because I wasn't sure I'd be able to get rid of them and I didn't want to have to rebuild the entire farm again and lose my content.&lt;br /&gt;&lt;br /&gt;I believe these features might be activated inside the service application itself, but I have not found a way to confirm this theory. I tried deleting the Service Application, but the features still couldn't be removed. If you figure this out, let me know.&lt;br /&gt;&lt;h4&gt;Summary&lt;/h4&gt;In short, here are the things to keep in mind if you want to do a Content Deployment job between two farms:&lt;ul&gt;&lt;li&gt;Source and Destination farms should be on the same version of SharePoint&lt;/li&gt;&lt;li&gt;You must deploy solutions that exist on your source farm to your destination farm prior to running the job.&lt;/li&gt;&lt;li&gt;Features that are enabled on your source farm will automatically get enabled on your destination farm, but if you encounter an error with a feature, verify that the feature is installed on the destination&lt;/li&gt;&lt;/ul&gt;There are some additional quirks if you receive the "Could not find feature X" for custom features that you have developed. I'll cover those in a followup post. &lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-4526353387479824239?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/4526353387479824239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/11/sharepoint-2010-content-deployment-woes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4526353387479824239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4526353387479824239'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/11/sharepoint-2010-content-deployment-woes.html' title='SharePoint 2010 - Content Deployment Woes'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_0gM-pvb17tc/TO0rQZepZ_I/AAAAAAAAAFA/88skCOEbCto/s72-c/4.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-5172624599092251936</id><published>2010-10-06T11:42:00.000-04:00</published><updated>2010-10-06T11:42:58.115-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 - Dynamic JavaScript problems with Inline Editing</title><content type='html'>SharePoint 2010 allows inline editing of your HTML on Publishing pages, which is a nice boost to productivity. However, there are some quirks with this feature that can really trip you up if you aren't ready for them.&lt;br /&gt;&lt;br /&gt;Here's a scenario I ran into this week. I have a simple Publishing Page with a Content Editor Web Part on it. Inside this web part, there is an HTML element that I target with some jQuery to display tooltips. The JavaScript here is really quite simple and just dynamically adds a relative positioned div to the page above the target element.&lt;br /&gt;&lt;br /&gt;The code for this is tested and works fine outside of SharePoint. But when you edit a page, you'll find an interesting side-effect. Specially, when editing the page, the JavaScript that adds the dynamic elements to the DOM still runs. When the page is saved, even if you didn't even edit that particular Content Editor Web Part, the updated DOM elements get saved - including the tooltip changes!&lt;br /&gt;&lt;br /&gt;I have tested this with a lot of scenarios, but it's pretty consistent across any SharePoint components that provide inline editing.&lt;br /&gt;&lt;br /&gt;So, how do you allow JavaScript to dynamically update content on publishing pages? This is really going to depend on the nature of your content. Here are a few different scenarios I've employed in my site:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Extract the dynamic content and make it a web part.&lt;br /&gt;&lt;br/&gt;This works well if your content doesn't change that often and has few properties. A great example here would be having a web part that uses swfobject.js to load a flash file rather than placing the script call inside a Content Editor&lt;/li&gt;&lt;li&gt;Skip the JavaScript calls that update your page when in edit or design mode.&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;This works really well for scenarios like my tooltip. You can do this either in JavaScript or C#, depending on how your page works.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Here is an example of checking your page mode with JavaScript, using jQuery:&lt;br /&gt;&lt;pre class="brush:csharp"&gt;if ($('#MSOSPWebPartManager_DisplayModeName').val() == 'Design' || $('#MSOSPWebPartManager_DisplayModeName').val() == 'Edit') {&lt;br /&gt;        alert('Don't do anything');&lt;br /&gt;    } else {&lt;br /&gt;        alert('Safe to run JavaScript');&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-5172624599092251936?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/5172624599092251936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/10/sharepoint-2010-dynamic-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5172624599092251936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5172624599092251936'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/10/sharepoint-2010-dynamic-javascript.html' title='SharePoint 2010 - Dynamic JavaScript problems with Inline Editing'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-5781378701066958108</id><published>2010-07-31T14:04:00.000-04:00</published><updated>2010-07-31T14:04:20.828-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Excel Services'/><title type='text'>SP2010: Unable to publish workbook to Excel Services</title><content type='html'>While trying to publish a workbook to SharePoint 2010 to use with Excel Services, I ran into some problems. Specifically, it appeared that Excel wasn't able to access my Document library. &lt;br /&gt;&lt;br /&gt;To publish my workbook, I followed instructions you might find anywhere on the web, using the Office 2010 Backstage to save to SharePoint. However, none of my libraries showed up by default. Not a problem! I can just type the URL into the address bar, right? Apparently Excel says that it "can't open this location using this program".&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_0gM-pvb17tc/TFRemZMKCsI/AAAAAAAAAEU/KauyeOKX5oI/s1600/es_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="108" src="http://2.bp.blogspot.com/_0gM-pvb17tc/TFRemZMKCsI/AAAAAAAAAEU/KauyeOKX5oI/s320/es_5.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Generally problems like this are permissions related. Well, I was logged into the machine as my farm administrator, who has full rights to the Documents library. I was also able to click on files from SharePoint and have them open Excel automatically. &lt;br /&gt;&lt;br /&gt;I decided to take a new approach. I opened the demo Excel workbook that came with the Business Intelligence Center template. I then made a small update and saved it back to SharePoint. Now when I opened Backstage to save to SharePoint, the Documents library showed up in the Recent Locations section.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_0gM-pvb17tc/TFRe8F1Ka0I/AAAAAAAAAEc/BBS3wrzs6Vw/s1600/es_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="273" src="http://1.bp.blogspot.com/_0gM-pvb17tc/TFRe8F1Ka0I/AAAAAAAAAEc/BBS3wrzs6Vw/s400/es_2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I was hoping by doing this, I could trick Excel into finding the location. So I then tried to save my new workbook by just clicking on that recent location. However, Excel was still not able to do it, and told me it was unable to open my site:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_0gM-pvb17tc/TFRfT9HMmcI/AAAAAAAAAEk/WeM_zVK018w/s1600/es_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_0gM-pvb17tc/TFRfT9HMmcI/AAAAAAAAAEk/WeM_zVK018w/s320/es_3.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After looking around on the web, I found a &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/e717c93c-73b3-4aa6-81e7-6d3d95ae2a03/"&gt;forum post&lt;/a&gt; that seemed promising, as I'm using a Windows Server 2008 R2 machine. I opened Server Manager and installed the Desktop Experience, which required me to install the Ink and Handwriting Services as a prerequisite. I was then prompted to reboot upon completion. After rebooting, I attempted to save my workbook to SharePoint again and it worked.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-5781378701066958108?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/5781378701066958108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/07/sp2010-unable-to-publish-workbook-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5781378701066958108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5781378701066958108'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/07/sp2010-unable-to-publish-workbook-to.html' title='SP2010: Unable to publish workbook to Excel Services'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_0gM-pvb17tc/TFRemZMKCsI/AAAAAAAAAEU/KauyeOKX5oI/s72-c/es_5.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-3452669380562801086</id><published>2010-07-31T13:26:00.002-04:00</published><updated>2010-08-02T12:22:47.906-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Excel Services'/><title type='text'>SP2010: Excel Services Error - Unable to Process the Request</title><content type='html'>I've been playing a lot with Excel Services for the last week and while it is nice, it is also temperamental. Most of this can be chalked up to inexperience on my part as I discover the closest to least privileges you can get for a SharePoint 2010 Excel Services Service Application, in light of the ever popular bug, "&lt;a href="http://blogs.msdn.com/b/jjameson/archive/2010/05/04/the-workbook-cannot-be-opened-error-with-sharepoint-server-2010-and-tfs-2010.aspx"&gt;The workbook cannot be opened&lt;/a&gt;". However, I'm also convinced it's a little more particular than the previous version.&lt;br /&gt;&lt;br /&gt;By default when I installed Excel Services using a PowerShell script, it had an entry for a  Trusted File Location at "http://". After playing with the Business Intelligence Center template for a bit, I created my own workbook that had a PivotTable and a PivotChart that talked to my SSAS installation. Naturally I decided to update  my Trusted File Location settings. So I deleted the default entry and created a more specific one that pointed directly to the Documents library that came with the template. Then I checked on the Excel example that came with the template and found that Excel Services was no longer working because it was "Unable to process the request".&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_0gM-pvb17tc/TFRbo4qPNNI/AAAAAAAAAEM/2g28nS9yYcs/s1600/es_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="285" src="http://1.bp.blogspot.com/_0gM-pvb17tc/TFRbo4qPNNI/AAAAAAAAAEM/2g28nS9yYcs/s400/es_1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Event Viewer showed nonstop critical errors and ULS had some gems in there pinning the blame on the Secure Store Service: "Request for security token failed with exception". I tried refreshing the key figuring that my WFE and App server were out of sync, but that didn't fix the problem. Lacking a better idea, I did an IIS reset on the WFE - and it started working again.&lt;br /&gt;&lt;br /&gt;I'm not sure why it was unhappy, but at least it was only a 10 min troubleshooting span and a simple fix!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-3452669380562801086?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/3452669380562801086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/07/sp2010-excel-services-error-unable-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3452669380562801086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3452669380562801086'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/07/sp2010-excel-services-error-unable-to.html' title='SP2010: Excel Services Error - Unable to Process the Request'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_0gM-pvb17tc/TFRbo4qPNNI/AAAAAAAAAEM/2g28nS9yYcs/s72-c/es_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-8495555130210769396</id><published>2010-07-26T11:48:00.000-04:00</published><updated>2010-07-26T11:48:00.296-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Excel Services'/><title type='text'>SharePoint 2010 - Error Removing Managed Account</title><content type='html'>Recently, while trying to experiment with Excel Services in SharePoint 2010, I decided to remove the service and do a reinstall with a PowerShell script. Since I like my scripts to create managed accounts as well, I removed the account that was running my service. Apparently, SharePoint didn't like this and I received an error stating that my &lt;b&gt;SPManagedAccount could not be deleted because other objects depend on it&lt;/b&gt; when I loaded the Managed Accounts page in Central Administration. Well, not being able to load the page sort of limits my options for correcting the problem, doesn't it, Microsoft?&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_0gM-pvb17tc/TE2pde5nNUI/AAAAAAAAAD8/aNEaUNTuams/s1600/error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="210" src="http://4.bp.blogspot.com/_0gM-pvb17tc/TE2pde5nNUI/AAAAAAAAAD8/aNEaUNTuams/s400/error.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I double checked and the service application had been removed from SharePoint, the Excel Calculation Service had been stopped on the App Server, and the ApplicationPool had even been removed from IIS. Looking up the CorrelationID in the logs also didn't tell me very much.&lt;br /&gt;&lt;br /&gt;I decided to pop open PowerShell and see what I could pull off. Turns out it was a rather simple fix. First, I looked up my Managed Account. I then tried to remove it and found out the dependency was an application pool. After removing the dependency I was about to remove the Managed Account! The PowerShell Commands to do this were:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Get-SPManagedAccount&lt;/li&gt;&lt;li&gt;Get-SPServiceApplicationPool&lt;/li&gt;&lt;li&gt;Remove-SPServiceApplicationPool&lt;/li&gt;&lt;li&gt;Remove-SPManagedAccount&lt;/li&gt;&lt;/ul&gt;Here is a screenshot of the PowerShell at work:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_0gM-pvb17tc/TE2tnzHne-I/AAAAAAAAAEE/MutXFXfNBcc/s1600/ps.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/_0gM-pvb17tc/TE2tnzHne-I/AAAAAAAAAEE/MutXFXfNBcc/s640/ps.png" width="520" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-8495555130210769396?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/8495555130210769396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/07/sharepoint-2010-error-removing-managed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/8495555130210769396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/8495555130210769396'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/07/sharepoint-2010-error-removing-managed.html' title='SharePoint 2010 - Error Removing Managed Account'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_0gM-pvb17tc/TE2pde5nNUI/AAAAAAAAAD8/aNEaUNTuams/s72-c/error.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-3584193992224359806</id><published>2010-06-17T11:24:00.002-04:00</published><updated>2010-06-17T11:26:34.688-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SP2010 Dispose Patterns and Broken WebParts</title><content type='html'>Today I was building a web part for SharePoint 2010 and ran across an interesting problem. The web part was working fine for authenticated users, but was failing for anonymous users. My first thought was that Lockdown might have been the problem, but it turned out after looking through SharePoint log files that I was running into a dispose problem:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Trying to use an SPWeb object that has been closed or disposed and is no longer valid.&lt;/blockquote&gt;&lt;br /&gt;It's an interesting error message, considering that I was disposing of my object, but only after I'd finished with it. I believe the problem wasn't that my code was using a disposed SPWeb object, but rather that I had closed an SPWeb that SharePoint was relying upon.&lt;br /&gt;&lt;br /&gt;Here was the original code, which, according to &lt;a href="http://msdn.microsoft.com/en-us/library/aa973248.aspx"&gt;Best Practices&lt;/a&gt;, was closing objects that don't need to be closed:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;using (SPSite site = SPContext.Current.Site)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (SPWeb web = site.RootWeb)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SPList myList = web.Lists["myList"];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //code here to find a list item&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;And the fix was as simple as changing it to this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;SPSite site = SPContext.Current.Site;&lt;br /&gt;SPWeb web = site.RootWeb;&lt;br /&gt;SPList myList = web.Lists["myList"];&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I'm not so sure this would have broken a SharePont 2007 site, but it's a good reminder to make sure you are following Best Practices for disposing objects!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-3584193992224359806?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/3584193992224359806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/06/sp2010-dispose-patterns-and-broken.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3584193992224359806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3584193992224359806'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/06/sp2010-dispose-patterns-and-broken.html' title='SP2010 Dispose Patterns and Broken WebParts'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-4948318942379521825</id><published>2010-06-03T16:14:00.001-04:00</published><updated>2010-06-03T16:33:50.247-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Public Facing Sites'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 Custom Error Messages for Public Facing Deployments</title><content type='html'>It's a fairly common requirement when building a public facing SharePoint site to make sure all pages share branding elements. This includes the SharePoint error pages. While working on a publishing site, you've probably encountered an article that touches on one of the error pages, but for some reason I haven't seen one that tries to cover all of them. So hopefully this will do the job!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Error Pages&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you are just looking to control the basic error pages, then look no further than the SPWebApplication.SPCustomPage enumeration, which provides a list of commonly updated pages. You use the SPWebApplication.UpdateMappedPage() method to set which pages SharePoint should serve up for each of the values within the enumeration. For a good example of this, see &lt;a href="http://todd-carter.com/post/2010/04/07/An-Expected-Error-Has-Occurred.aspx"&gt;this post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;HTTP 404&lt;/b&gt;&lt;br /&gt;But what about other HTTP status codes? Well the easiest would be the 404. SharePoint already has support for a custom 404 page, as long as it is pure HTML. The default 404 is located in 14\TEMPLATE\LAYOUTS\1033\sps404.html. The quickest way to override this is to use a feature to deploy your own HTML page into the same folder. A feature receiver can then update the SPWebApplication.FileNotFound property with a relative path to your file. There are  just a couple points to keep in mind when you do this:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Your custom page should be greater than 512 bytes. This is because the default feature in Internet Explorer to show "friendly" error messages will sometimes ignore pages smaller than this. You can read more about this problem at &lt;a href="http://support.microsoft.com/kb/218155"&gt;Microsoft Support.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Your custom page, if encoded as UTF-8, should not have a BOM. Even if you save your file as UTF-8 without BOM, editing it later in Visual Studio will add the BOM back, so be careful. You can read more about that problem &lt;a href="http://andreasglaser.net/post/2009/03/15/SharePoint-and-custom-404-Page-Not-Found-and-UTF-8-issue-with-Firefox.aspx"&gt;here.&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;If you'd like to have a custom 404 that performs server side code, such as to include web parts, you'll need to get a little more creative. There are two common ways to handle this. The first would be to have a static html page that performs a client side redirect with either a META tag or javascript. If you'd like to see that approach in action, &lt;a href="http://sharepointsmart404.codeplex.com/"&gt;here is an example&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A more robust solution would be to &lt;a href="http://blog.mastykarz.nl/accessible-404-pagenotfound-in-microsoft-office-sharepoint-server-2007/"&gt;use an HttpModule&lt;/a&gt;. With the HttpModule, you have two more possibilities for how you serve your page. You can use a Response.Redirect, which is what the linked article suggests. The only downside to this is that the URL changes, which may or may not be desired. Alternatively, to keep the URL, you would need to use Response.Write. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;HTTP 401&lt;/b&gt;&lt;br /&gt;Now that you have custom error pages for the SPCustomPage enumered pages as well as a 404 page. But what about a 401? The simplest way you might think to do this would be to edit the web.config CustomErrors element. In any normal ASP.NET application, that would have been sufficient. Unfortunately it doesn't work in SharePoint. &lt;br /&gt;&lt;br /&gt;Your next instinct might be to try IIS, as it provides the ability to set custom error pages. If you edit the property for the 401.2 status code and point it to a custom HTML page on your site, it may or may not work. In testing, it turns out that having Anonymous Access enabled in SharePoint (which then sets it in IIS) prevents a custom 401.2 page from being used. However, if Anonymous Access is disabled, such as with an Intranet site, then the custom page will show just fine. Since we are talking about a public facing deployment you are probably using the Publishing template, so you're going to need a different approach.&lt;br /&gt;&lt;br /&gt;The trick for a custom 401 message when you have Anonymous Access enabled is using a custom http module, much like you could have done for the 404.  &lt;br /&gt;&lt;br /&gt;Here is an example:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:csharp"&gt;public class CustomPageMappingsHttpModule : IHttpModule&lt;br /&gt;{&lt;br /&gt; private const string Custom401File = "/_layouts/1033/Custom401_CSS.htm";&lt;br /&gt;&lt;br /&gt; private HttpApplication _application;&lt;br /&gt;&lt;br /&gt; public void Dispose()&lt;br /&gt; {&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public void Init(HttpApplication context)&lt;br /&gt; {&lt;br /&gt;  this._application = context;&lt;br /&gt;  this._application.PreSendRequestHeaders += new EventHandler(_application_PreSendRequestHeaders);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; protected void _application_PreSendRequestHeaders(object sender, EventArgs e)&lt;br /&gt; {&lt;br /&gt;  HttpResponse response = this._application.Response;&lt;br /&gt;&lt;br /&gt;  if (response.ContentType.Equals("text/html", StringComparison.CurrentCultureIgnoreCase))&lt;br /&gt;  {&lt;br /&gt;   string message = string.Empty;&lt;br /&gt;&lt;br /&gt;   switch (response.StatusCode)&lt;br /&gt;   {&lt;br /&gt;    case 401:&lt;br /&gt;     message = File.ReadAllText(this._application.Server.MapPath(Custom401File));&lt;br /&gt;     this._application.Response.Clear();&lt;br /&gt;     this._application.Response.Write(message);&lt;br /&gt;     break;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Once you hook that up in your web.config, go ahead and try to load http://YourSite/_layouts/settings.aspx. You should get the same authentication prompt you'd expect for an anonymous user, but if you hit cancel you'll now see your custom 401 message. Note that the way you register an HttpModule in 2010 is slightly different. If you add the module to the httpModules element in web.config, it may not work. In testing, I was only able to get my module to work by adding it to the modules element with the other SharePoint HttpModules.&lt;br /&gt;&lt;br /&gt;As a final level of customization, you could consider having no prompt at all on your public site when users request restricted content. The way to do this is to extend the site and have a private site as well. Since we are just talking about two different web sites in IIS (with corresponding settings and web.config files), you can control their authentication and error settings independently while still serving up the same content. The public site could then have Anonymous Access enabled and Windows Authentication disabled. This removes the login prompt when a 401 occurs on the public site. The private site would have Anonymous Access disabled but Windows Authentication enabled, allowing users to log in and manage content as needed. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Quirks&lt;/b&gt;&lt;br /&gt;Since you are probably using the Publishing template, it's worth mentioning the Lockdown feature. This feature stops users from being able to see your Form pages. It also locks down lists and libraries, such as the Style Library. So make sure if you use CSS in your custom error pages that you know whether you have lockdown enabled and plan locations for your assets appropriately.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-4948318942379521825?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/4948318942379521825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/06/sharepoint-2010-custom-error-messages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4948318942379521825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4948318942379521825'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/06/sharepoint-2010-custom-error-messages.html' title='SharePoint 2010 Custom Error Messages for Public Facing Deployments'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-4521135484211987251</id><published>2010-05-26T15:56:00.007-04:00</published><updated>2010-08-10T13:12:54.617-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Public Facing Sites'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Content Deployment'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 Content Deployment Jobs Missing Deployment Options Section</title><content type='html'>I've been working with Content Deployment jobs lately, and noticed that in 2010, the section on the Create Jobs page where you can specify whether to perform an incremental or full content deployment was missing. Just to make sure I wasn't crazy, I looked up the old screen from 2007, which looks like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_0gM-pvb17tc/S_1feRRt3_I/AAAAAAAAADs/T6jhmDcRrgM/s1600/cd2007.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/_0gM-pvb17tc/S_1feRRt3_I/AAAAAAAAADs/T6jhmDcRrgM/s400/cd2007.png" width="397" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;As you can see, there is a section there for setting the types of content that are deployed. The first option, "Deploy only new, changed, or deleted content" is the incremental deployment. The second option, "Deploy all content, including content that has been deployed before", is the full deployment.&lt;br /&gt;&lt;br /&gt;Now compare that screen to the 2010 equivalent:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_0gM-pvb17tc/S_1gFVNnMDI/AAAAAAAAAD0/7eZ6t_EZ5og/s1600/cd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/_0gM-pvb17tc/S_1gFVNnMDI/AAAAAAAAAD0/7eZ6t_EZ5og/s400/cd.png" width="365" /&gt;&lt;/a&gt;&lt;/div&gt;For some reason, the Deployment Options section is missing. This is not gonna work. If you recall from 2007, doing a full deployment after the initial deployment can cause problems. See &lt;a href="http://blogs.technet.com/b/stefan_gossner/archive/2009/10/30/content-deployment-the-complete-guide-part-1-the-basics.aspx"&gt;this article&lt;/a&gt; for more information about why.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, how do we create an incremental job? The answer, courtesy of &lt;a href="http://blog.beckybertram.com/default.aspx"&gt;Becky Bertram, MVP&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;You can't do it through Central Administration, but you can specify whether you want to do a full or incremental deployment using PowerShell. Go to your SharePoint PowerShell prompt and type get-help new-spcontentdeploymentjob -detailed and then take a look at the IncrementalEnabled parameter.&lt;/blockquote&gt;&lt;br /&gt;Here is a simple script to create an incremental content deployment job, assuming you have already defined a content deployment path of "Authoring to Production":&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:csharp;"&gt;New-SPContentDeploymentJob -Name "Authoring to Production - Incremental" &lt;br /&gt;-SPContentDeploymentPath "Authoring to Production" -IncrementalEnabled:$true&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Looking in Central Administration, you'll see your created job, but you still can't see if it's incremental or full. To do that, run &lt;b&gt;Get-SPContentDeploymentJob "Authoring to Production - Incremental"&lt;/b&gt;. You should notice the following line in your output:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;ExportMethodType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : ExportChanges&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;That sounds awfully like an incremental doesn't it? Let's try setting the&amp;nbsp; IncrementalEnabled parameter to false and creating another job:   &lt;br /&gt;&lt;pre class="brush:csharp;"&gt;New-SPContentDeploymentJob -Name "Authoring to Production - Full" &lt;br /&gt;-SPContentDeploymentPath "Authoring to Production" -IncrementalEnabled:$false &lt;br /&gt;&lt;/pre&gt;Now run &lt;b&gt;Get-SPContentDeploymentJob "Authoring to Production - Full"&lt;/b&gt; and you should see a slightly different export method type: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;ExportMethodType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : ExportAll&lt;/li&gt;&lt;/ul&gt;So, this means that your Content Deployment job is going to be incremental by default. The only way to get a full job is to create it via PowerShell. Given the limitations and caveats with full jobs, this seems like a good change.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-4521135484211987251?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/4521135484211987251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/05/sp2010-content-deployment-jobs-missing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4521135484211987251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4521135484211987251'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/05/sp2010-content-deployment-jobs-missing.html' title='SharePoint 2010 Content Deployment Jobs Missing Deployment Options Section'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_0gM-pvb17tc/S_1feRRt3_I/AAAAAAAAADs/T6jhmDcRrgM/s72-c/cd2007.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-9124053236538338401</id><published>2010-05-06T10:06:00.002-04:00</published><updated>2010-05-06T10:07:39.055-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SP 2010 - Web Parts and Embedded Resources Not Working</title><content type='html'>I ran into a problem recently trying to use Embedded Resources with SharePoint 2010 web parts. I was using code I had directly used in non SharePoint ASP.Net server controls, which if you aren't familiar with, is pretty simple. I'll briefly describe how you'd use an embedded resource, then describe my problem and how I fixed it.&lt;br /&gt;&lt;br /&gt;First, you need to just add your resource, which in my case was a stylesheet, to your project. Then, using the properties pane, set the Build Action to Embedded Resource. Once you've done that, you'll need to edit the AssemblyInfo.cs file within your project and enable the embedded resource.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;[assembly: WebResource("MyAssembly.styles.MyStyleSheet.css", "text/css")]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now you have a resource that will be embedded in your DLL. The path to that resource is specified in the WebResourceAttribute above. I usually compile and open my DLL in reflector at this point to confirm that the path I've picked is correct. Once it is, you can include your stylesheet like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;string styleSheetUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(), "MyAssembly.styles.MyStyleSheet.css");&lt;br /&gt;LiteralControl styleSheetLink = new LiteralControl(string.Format("LINK SYNTAX HERE - BLOGGER WONT LET ME EMBED THE HTML", styleSheetUrl));&lt;br /&gt;                Page.Header.Controls.Add(styleSheetLink);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In theory, that should work, right? It works in server controls, and it's worked for me in older web parts for MOSS 2007. But, when I built my 2010 web part, it wasn't working.&lt;br /&gt;&lt;br /&gt;I viewed source on my page and could see that the embedded resource was added to the markup. But when I tried to load that URL myself, I got an error, implying my resource wasn't there at all! I checked and rechecked my path inside the DLL. Everything was right.&lt;br /&gt;&lt;br /&gt;But then I noticed something different about 2010 web parts. They use a LoadControl mechanism. I was accessing my embedded resources, using the above code, directly inside the webpart.ascx.cs, not the webpart.cs file. On a hunch, I moved the code into the webpart.cs file. Success!&lt;br /&gt;&lt;br /&gt;This got me curious, so I looked at the source for the generated HTML and noticed that the generated URL for the embedded resource had changed. Apparently, the path is based somewhat on that first parameter to GetWebResourceUrl(), which is a type. Tinkering a little more, I learned that I could actually leverage the embedded resource from the webpart.ascx.cs by making a minor adjustment.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;string styleSheetUrl = Page.ClientScript.GetWebResourceUrl(this.Parent.GetType(), "MyAssembly.styles.MyStyleSheet.css");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Notice that I'm not passing the type of the parent, which for our webpart.ascx.cs, is the wrapper class that calls LoadControl.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-9124053236538338401?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/9124053236538338401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/05/sp-2010-web-parts-and-embedded.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/9124053236538338401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/9124053236538338401'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/05/sp-2010-web-parts-and-embedded.html' title='SP 2010 - Web Parts and Embedded Resources Not Working'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-5858662103507248219</id><published>2010-05-04T12:09:00.003-04:00</published><updated>2010-05-04T12:14:12.793-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ to SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='CAML'/><category scheme='http://www.blogger.com/atom/ns#' term='List Joins'/><title type='text'>SP 2010 - LINQ versus CAML Joins and the Nuances of Projected Fields</title><content type='html'>When working with relational lists in SharePoint 2010, you have the option to use LINQ to SharePoint or CAML to join those lists to pull data out. While LINQ is easier to use and will leverage CAML under the covers, it is not always capable of performing queries that CAML can directly.&lt;br /&gt;&lt;br /&gt;For instance. Let's say you have a list, called Parent. This list has a single valued lookup column, PrimaryChild, that refers to the Children list. LINQ can very easily perform a query with a where clause based on PrimaryChild:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp;"&gt;var parents = from p in context.Parents&lt;br /&gt;       where p.PrimaryChild.Title == "My First Child"&lt;br /&gt;       select p;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;However, if you were to create a second lookup column, OtherChildren, that allowed multiple values, LINQ would run into difficulties because the lookup is now represented as an EntitySet. With a single valued lookup field, you would instead have just a strongly typed object, with direct access to the fields within that list item.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp;"&gt;var parents = from p in context.Parents&lt;br /&gt;       where p.OtherChildren.Any(c =&amp;gt; c.Title == "My Other Child")&lt;br /&gt;       select p;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Running this query will throw an exception that semi-efficient queries are not allowed. If you recall, this is because LINQ leverages &lt;a href="http://msdn.microsoft.com/en-us/library/ee536585%28office.14%29.aspx"&gt;Two-Stage Queries&lt;/a&gt;. So, you can continue with LINQ and perform the query in two stages, or you can change the query to use CAML.&lt;br /&gt;&lt;br /&gt;Here is the same query in CAML, but this time, the query will not cause an exception.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp;"&gt;using (SPSite site = new SPSite(SPContext.Current.Site))&lt;br /&gt;{&lt;br /&gt; SPWeb web = site.RootWeb;&lt;br /&gt; if (web != null)&lt;br /&gt; {&lt;br /&gt;  SPList list = web.Lists["Parents"];&lt;br /&gt;  if (list != null)&lt;br /&gt;  {&lt;br /&gt;   SPQuery query = new SPQuery();&lt;br /&gt;   StringBuilder sbQuery = new StringBuilder();&lt;br /&gt;   sbQuery.Append("&lt;where&gt;&lt;eq&gt;");&lt;br /&gt;   sbQuery.Append("&lt;fieldref name="\&amp;quot;OtherChildren\&amp;quot;"&gt;");&lt;br /&gt;   sbQuery.Append("&lt;value type="\&amp;quot;LookupMulti\&amp;quot;"&gt;My Other Child&lt;/value&gt;");&lt;br /&gt;   sbQuery.Append("&lt;/fieldref&gt;&lt;/eq&gt;");&lt;br /&gt;   query.Query = sbQuery.ToString();&lt;br /&gt;&lt;br /&gt;   StringBuilder sbJoins = new StringBuilder();&lt;br /&gt;   sbJoins.Append("&lt;join listalias="\&amp;quot;OtherChildren\&amp;quot;" type="\&amp;quot;LEFT\&amp;quot;"&gt;");&lt;br /&gt;   sbJoins.Append("&lt;eq&gt;");&lt;br /&gt;   sbJoins.Append("&lt;fieldref name="\&amp;quot;OtherChildren\&amp;quot;" reftype="\&amp;quot;ID\&amp;quot;"&gt;");&lt;br /&gt;   sbJoins.Append("&lt;fieldref list="\&amp;quot;OtherChildren\&amp;quot;" name="\&amp;quot;ID\&amp;quot;"&gt;");&lt;br /&gt;   sbJoins.Append("&lt;/fieldref&gt; ");&lt;br /&gt;   sbJoins.Append("&lt;/fieldref&gt; ");&lt;br /&gt;   query.Joins = sbJoins.ToString();&lt;br /&gt;&lt;br /&gt;   StringBuilder sbProj = new StringBuilder();&lt;br /&gt;   sbProj.Append("&lt;field list="\&amp;quot;OtherChildren\&amp;quot;" name="\&amp;quot;OtherChildrenNickname\&amp;quot;" showfield="\&amp;quot;Nickname\&amp;quot;" type="\&amp;quot;Lookup\&amp;quot;"&gt;");&lt;br /&gt;   query.ProjectedFields = sbProj.ToString();&lt;br /&gt;&lt;br /&gt;   StringBuilder sbView = new StringBuilder();&lt;br /&gt;   sbView.Append("&lt;fieldref name="\&amp;quot;Title\&amp;quot;"&gt;");&lt;br /&gt;   sbView.Append("&lt;fieldref name="\&amp;quot;OtherChildrenNickname\&amp;quot;"&gt;");&lt;br /&gt;   query.ViewFields = sbView.ToString();&lt;br /&gt;&lt;br /&gt;   if (!string.IsNullOrEmpty(query.Query))&lt;br /&gt;   {&lt;br /&gt;    SPListItemCollection matches = list.GetItems(query);&lt;br /&gt;    foreach (SPListItem match in matches)&lt;br /&gt;    {&lt;br /&gt;     Console.WriteLine(match["Title"]);&lt;br /&gt;&lt;br /&gt;     string rawNickname = (string)match["OtherChildrenNickname"];&lt;br /&gt;     if (!string.IsNullOrEmpty(rawNickname))&lt;br /&gt;     {&lt;br /&gt;      SPFieldLookupValue nickname = new SPFieldLookupValue(rawNickname);&lt;br /&gt;      Console.WriteLine(nickname.LookupValue);&lt;br /&gt;     }&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/fieldref&gt;&lt;/fieldref&gt;&lt;/field&gt;&lt;/eq&gt;&lt;/join&gt;&lt;/where&gt;&lt;/pre&gt;&lt;br /&gt;You'll notice that in the example above I'm performing a CAML join and also leveraging Projected Fields. Here are some guidelines/rules to keep in mind:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The CAML has several attributes that ask for the list name or list alias. This is NOT the actual name of the list. Rather, it is the internal name of the lookup field within your list. So in our example, the list was named Children, and the field was OtherChildren. We used OtherChildren to build the join and projected fields.&lt;/li&gt;&lt;li&gt;Projected Fields used in your query do not have to match up to the Projected Fields you have specified in the Child list. Those are a UI convenience and not used by your CAML.&lt;/li&gt;&lt;li&gt;If you want to display a value from the Child list, you need to make sure you have a Projected Field in your CAML. Only those fields which are projected are eligible to be View fields.&lt;/li&gt;&lt;li&gt;All Projected Fields will become SPFieldLookupValue objects (or perhaps SPFieldLookupValueCollection, though I haven't yet had one of my lists do this). Those lookups will always contain the ID of the child list item, but the value of the selected field within that child item.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-5858662103507248219?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/5858662103507248219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/05/sp-2010-linq-versus-caml-joins-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5858662103507248219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5858662103507248219'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/05/sp-2010-linq-versus-caml-joins-and.html' title='SP 2010 - LINQ versus CAML Joins and the Nuances of Projected Fields'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-6076282124337351285</id><published>2010-04-29T11:29:00.000-04:00</published><updated>2010-04-29T11:29:01.382-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Search Customization'/><title type='text'>SP 2010 - Phonetic Search Only for People Scope?</title><content type='html'>I have a custom scope I've created that I am querying against with the FullTextSqlQuery object. Recently I was asked if we could allow a phonetic search. With all the hype around this new feature in SharePoint 2010, I thought it would be very easy.&lt;br /&gt;&lt;br /&gt;I looked, and sure enough, there is an EnablePhonetic property right on FullTextSqlQuery. I set it to true, ran my search and got back...nothing. I figured maybe it didn't like my query, which had a LIKES keyword. That wasn't it. I tried looking on the web and it seems all the mentions of phonetic search seem to be closer to press releases than coding snippets.&lt;br /&gt;&lt;br /&gt;Finally I found &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.server.search.query.query.enablephonetic%28v=office.14%29.aspx"&gt;this nugget&lt;/a&gt; on MSDN:&lt;br /&gt;&lt;blockquote&gt;For FAST Search Server 2010 for SharePoint, this property is only applicable for People Search. &lt;/blockquote&gt;Well, I'm not using FAST, but I am using a custom search scope. It would appear that might be the limiting factor here. While I am searching for people, they are stored in a custom list, since they are not members of my SharePoint site. Therefore I was using a custom scope to get to them.&lt;br /&gt;&lt;br /&gt;It would seem phonetic search is not available yet to customize in this way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-6076282124337351285?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/6076282124337351285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-phonetic-search-only-for-people.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/6076282124337351285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/6076282124337351285'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-phonetic-search-only-for-people.html' title='SP 2010 - Phonetic Search Only for People Scope?'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-7425872996065027821</id><published>2010-04-28T12:01:00.003-04:00</published><updated>2010-04-28T12:30:14.866-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='Managed Metadata Service'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SP 2010 - Configure and Use a TaxonomyWebTaggingControl</title><content type='html'>If you are using the Managed Metadata Service and developing a custom web part, you may be interested in using that nice term picker that you see when you create a new list item that contains a Managed Metadata Column.&lt;br /&gt;&lt;br /&gt;First, let's cover the bare minimum code you'll need to get the term picker to show up in your web part. First you'll want to add a reference to Microsoft.SharePoint.Taxonomy to your project. Then you'll need a Register directive in your ascx, like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;&amp;lt;%@ Register Tagprefix="Taxonomy" Namespace="Microsoft.SharePoint.Taxonomy" Assembly="Microsoft.SharePoint.Taxonomy, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&amp;gt; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now you can add the picker to your web part just like any other control.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;&lt;taxonomy:taxonomywebtaggingcontrol id="twtcMyTermSet" runat="server"&gt;&lt;br /&gt;&lt;/taxonomy:taxonomywebtaggingcontrol&gt;&lt;/pre&gt;&lt;br /&gt;You'll notice that I didn't set any properties on the TaxonomyWebTaggingControl. Well there are three properties you'll need to set, but we'll do it programatically. Those properties are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; SSPList - This property parses your string and builds a List&lt;guid&gt; to set the SspId property&lt;/guid&gt;&lt;/li&gt;&lt;li&gt;GroupId - A Guid&lt;/li&gt;&lt;li&gt;TermSetList - This property parses your string and builds a List&lt;guid&gt; to set the TermSetId property&lt;/guid&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Now, you can set these properties declaratively if you wish, but it won't be a very portable web part, as the Guids aren't part of the import CSV format for the Managed Metadata Service, nor do any of the Taxonomy Create methods allow setting of Ids. Because of this, it's best to have your web part set these properties on the TaxonomyWebTaggingControl programatically. If you just want to see how you would go about setting these properties declaratively, scroll to the bottom of this post, as I've included it for reference.&lt;br /&gt;&lt;br /&gt;In order to make your web part portable, you're going to need to query the Managed Metadata Service and get these values yourself. Moreover, you're going to have to do it on every load of your web part since these properties are not stored anywhere between page loads.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt;: &lt;i&gt;If you only set these properties on page load, this will work as long as there are no scenarios where you need to redraw the control again, such as having a custom server validator. In that instance, your picker would work before the postback, but the look-ahead feature would be broken after the postback.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In order to make loading our properties a little easier, here is an extension method for TaxonomyWebTaggingControl that allows you to quickly set the properties. The path part of this was &lt;a href="http://pholpar.wordpress.com/2010/02/10/getting-term-by-the-path-in-the-taxonomy-hierarchy/"&gt;inspired by PHolpar&lt;/a&gt;. Also, remember that extension methods must be defined in static classes.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;public static bool Configure(this TaxonomyWebTaggingControl twtc, string termSetPath)&lt;br /&gt;{&lt;br /&gt; bool configured = false;&lt;br /&gt;&lt;br /&gt; TaxonomySession session = new TaxonomySession(SPContext.Current.Site);&lt;br /&gt;&lt;br /&gt; string[] parts = termSetPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);&lt;br /&gt; if (parts.Length &amp;gt; 0)&lt;br /&gt; {&lt;br /&gt;  TermStore termStore = GetTermStore(session, parts[0]);&lt;br /&gt;  if (termStore != null &amp;amp;&amp;amp; parts.Length &amp;gt; 1)&lt;br /&gt;  {&lt;br /&gt;   twtc.SSPList = termStore.Id.ToString();&lt;br /&gt;&lt;br /&gt;   Group group = GetGroup(termStore, parts[1]);&lt;br /&gt;   if (group != null &amp;amp;&amp;amp; parts.Length &amp;gt; 2)&lt;br /&gt;   {&lt;br /&gt;    twtc.GroupId = group.Id;&lt;br /&gt;&lt;br /&gt;    TermSet termSet = GetTermSet(group, parts[2]);&lt;br /&gt;    if (termSet != null)&lt;br /&gt;    {&lt;br /&gt;     twtc.TermSetList = termSet.Id.ToString();&lt;br /&gt;     configured = true;&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; return configured;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In order to load MyTermSet, which lives within MyGroup, which resides within MyTermStore, you will use this extension method similar to the following: &lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt; bool configured = twtcSpecialty.Configure("MyTermStore/MyGroup/MyTermSet");&lt;br /&gt; if (!configured)&lt;br /&gt; {&lt;br /&gt;  throw new ApplicationException("Unable to find target TermSet");&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The result looks just like the picker from other parts of SharePoint, with functioning look-ahead.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_0gM-pvb17tc/S9hibZ9yfGI/AAAAAAAAADo/ZfFhv_ZDwL8/s1600/termpicker.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_0gM-pvb17tc/S9hibZ9yfGI/AAAAAAAAADo/ZfFhv_ZDwL8/s1600/termpicker.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;As promised, here is the markup if you want to configure your TaxonomyWebTaggingControl declaratively.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;&lt;taxonomy:taxonomywebtaggingcontrol groupid="2f5fcd2c-0925-4a9a-bd56-3fac19f85f53" id="twtcMyTermSet" runat="server"&gt;&lt;br /&gt;    &lt;ssplist&gt;0d8382cf-2d63-4421-a37a-b9386d0be5c8&lt;/ssplist&gt;&lt;br /&gt;    &lt;termsetlist&gt;7adeced1-b73e-47dc-b695-82bb28e2f48f&lt;/termsetlist&gt;&lt;br /&gt;&lt;/taxonomy:taxonomywebtaggingcontrol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-7425872996065027821?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/7425872996065027821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-configure-and-use.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/7425872996065027821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/7425872996065027821'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-configure-and-use.html' title='SP 2010 - Configure and Use a TaxonomyWebTaggingControl'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_0gM-pvb17tc/S9hibZ9yfGI/AAAAAAAAADo/ZfFhv_ZDwL8/s72-c/termpicker.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-3070466050897826236</id><published>2010-04-27T10:55:00.000-04:00</published><updated>2010-04-27T10:55:21.363-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Search Customization'/><title type='text'>SP 2010 - Randomize the order of your search results from FullTextSqlQuery</title><content type='html'>I had a need recently to perform a query with FullTextSqlQuery but to limit the results and then display them in a random order. The FullTextSqlQuery class does support a RowLimit property, though this would not work in my case because I didn't want to get the exact same answers everytime.&lt;br /&gt;&lt;br /&gt;Remembering that &lt;a href="http://msdn.microsoft.com/en-us/library/ee536585%28office.14%29.aspx"&gt;LINQ to SharePoint often requires Two-Stage Queries&lt;/a&gt;, I decided to employ a similar approach here and pull back the data I could then perform more culling server side.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;DataTable searchResults = PerformSearch(query, queryRowLimit);&lt;br /&gt;if (searchResults != null &amp;amp;&amp;amp; searchResults.Rows.Count &amp;gt; 0)&lt;br /&gt;{&lt;br /&gt; int limit = 10; //todo: this should be a webpart property&lt;br /&gt; var results = (from row in searchResults.AsEnumerable()&lt;br /&gt;       orderby Guid.NewGuid()&lt;br /&gt;       select row).Take(limit);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The PerformSearch method is just a standard setup for using FullTextSqlQuery to return a DataTable. Note that I limit my resultset as much as I can with the FullTextSqlQuery.QueryText property to try to avoid hitting a throttling exception.&lt;br /&gt;&lt;br /&gt;With the limited results returned, I then want to randomize the order of the records. LINQ allows us to do this the same way we would in SQL, and I just order by a random Guid. Once the results are randomized, we just grab the number of records we need with the Take() extension method.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-3070466050897826236?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/3070466050897826236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-randomize-order-of-your-search.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3070466050897826236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3070466050897826236'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-randomize-order-of-your-search.html' title='SP 2010 - Randomize the order of your search results from FullTextSqlQuery'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-5748927308681348660</id><published>2010-04-23T14:52:00.003-04:00</published><updated>2010-04-23T14:54:15.347-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='Managed Metadata Service'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SP 2010 Managed Metadata TermSet.CreateTerm Throws Error</title><content type='html'>I've been working on importing a set of Terms into my Managed Metadata Term Store from a 3rd party database. However, I ran into a snag. When I execute the following code, I get an error, "&lt;b&gt;There is already a term with the same default label and parent term.&lt;/b&gt;"&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;public static void CreateTermIfNotExists(TermSet termSet, string termName)&lt;br /&gt;{&lt;br /&gt; if (termSet != null &amp;amp;&amp;amp; !string.IsNullOrEmpty(termName))&lt;br /&gt; {&lt;br /&gt;  Term term = null;&lt;br /&gt;&lt;br /&gt;  //This throws an exception if the Term doesn't exist&lt;br /&gt;  try&lt;br /&gt;  {&lt;br /&gt;   term = termSet.Terms[termName];&lt;br /&gt;  }&lt;br /&gt;  catch { }&lt;br /&gt;&lt;br /&gt;  if (term == null)&lt;br /&gt;  {&lt;br /&gt;   Term t = termSet.CreateTerm(termName, 1033);&lt;br /&gt;   termSet.TermStore.CommitAll();&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I attached my debugger and found out that even though I was checking for my term, the code would say it wasn't there, even though it was! The problem, was that the specific term causing me problems had an ampersand. The term name I supplied was "Foo &amp;amp; Bar", but the value put into the TermStore actually contained unicode version of the ampersand.&lt;br /&gt;&lt;br /&gt;Looking through the &lt;a href="http://msdn.microsoft.com/en-us/library/ee577519%28v=office.14%29.aspx"&gt;documentation&lt;/a&gt;, I found this relevant comment:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;The name value will be normailized to trim consecutive spaces into one and replace the &amp;amp; character with the wide character version of the character (\uFF06). The leading and trailing spaces will be trimmed. It must be non-empty and cannot exceed 255 characters, and cannot contain any of the following characters ; "&amp;lt;&amp;gt;|&amp;amp;tab. &lt;/blockquote&gt;&lt;br /&gt;That was indeed the behavior I was seeing. Thinking I had just found a limitation of the TermSet.Terms collection, I changed my code to this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;public static void CreateTermIfNotExists(TermSet termSet, string termName)&lt;br /&gt;{&lt;br /&gt; if (termSet != null &amp;amp;&amp;amp; !string.IsNullOrEmpty(termName))&lt;br /&gt; {&lt;br /&gt;  Term term = null;&lt;br /&gt;&lt;br /&gt;  TermCollection tc = termSet.GetTerms(termName, 1033, true, StringMatchOption.ExactMatch, 1, false);&lt;br /&gt;  if (tc != null &amp;amp;&amp;amp; tc.Count &amp;gt; 0)&lt;br /&gt;  {&lt;br /&gt;   term = tc[0];&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  if (term == null)&lt;br /&gt;  {&lt;br /&gt;   Term t = termSet.CreateTerm(termName, 1033);&lt;br /&gt;   termSet.TermStore.CommitAll();&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I ran again, and this time instead of blowing up on just that one case, my code went crazy trying to insert a bunch of different terms that were working fine before and throwing way more exceptions. A little research on this method led me to &lt;a href="http://stackoverflow.com/questions/2520360/sharepoint-2010-managed-metadata-unable-to-get-term-from-termset"&gt;this post&lt;/a&gt;, which suggests the TermSet.GetTerms method does not work in Beta 2, which seems to be what I just discovered as well.&lt;br /&gt;&lt;br /&gt;I decided to explore the reference to normalizing term names from the MSDN link. My final pass at the code became:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;public static void CreateTermIfNotExists(TermSet termSet, string termName)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (termSet != null &amp;amp;&amp;amp; !string.IsNullOrEmpty(termName))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Term term = null;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; string normalizedTermName = TermSet.NormalizeName(termName);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; term = termSet.Terms[normalizedTermName];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; catch { }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (term == null)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Term t = termSet.CreateTerm(termName, 1033);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; termSet.TermStore.CommitAll();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;} &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Finally, success! Moral of the story - when you query your TermSet for a specific Term you need to normalize your name first, because that is how it will be stored internally.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-5748927308681348660?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/5748927308681348660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-managed-metadata.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5748927308681348660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5748927308681348660'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-managed-metadata.html' title='SP 2010 Managed Metadata TermSet.CreateTerm Throws Error'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-6264867885910594943</id><published>2010-04-19T11:34:00.003-04:00</published><updated>2010-04-19T11:36:38.875-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ to SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SP 2010 - Using LINQ to SharePoint to Find List Items with Specific Managed Metadata Terms</title><content type='html'>Now that I can effectively use LINQ to access my Managed Metadata Columns, I'd like to only pull back those columns that contain values I need. For single valued Managed Metadata Columns, this is very straightforward:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;var examples = from d in context.Examples&lt;br /&gt;      where d.Specialty is TaxonomyFieldValue &amp;&amp; ((TaxonomyFieldValue)d.Specialty).Label == "Value One"&lt;br /&gt;               select d;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;For multi valued Managed Metadata Columns, my first attempt was a bust. I tried the following expression, but received a compiler error, "&lt;b&gt;An expression tree may not contain an anonymous method expression&lt;/b&gt;".&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;var examples = from d in context.Examples&lt;br /&gt;               where ((TaxonomyFieldValueCollection)d.Specialty).Exists(delegate(TaxonomyFieldValue tfv){&lt;br /&gt;             return tfv.Label == "Value One";&lt;br /&gt;               }) != null&lt;br /&gt;      select d;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The hint here from the compiler is that I can do this as long as I don't use an anonymous method. So I created a method to test for the term I wanted and changed my expression to call this method.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;private static bool ContainsMetadataTerm(object o, string termLabel)&lt;br /&gt;{&lt;br /&gt; bool exists = false;&lt;br /&gt;&lt;br /&gt; if (o is TaxonomyFieldValueCollection)&lt;br /&gt; {&lt;br /&gt;  TaxonomyFieldValueCollection tfvc = (TaxonomyFieldValueCollection)o;&lt;br /&gt;  exists = tfvc.Exists(delegate(TaxonomyFieldValue tfv)&lt;br /&gt;  {&lt;br /&gt;   return tfv.Label == termLabel;&lt;br /&gt;  });&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; return exists;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;var examples = from d in context.Examples&lt;br /&gt;      where d.Specialty is TaxonomyFieldValueCollection &amp;&amp; ContainsMetadataTerm(d.Specialty, "Value One")&lt;br /&gt;      select d;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now I can query specifically for list items that use specific terms. Keep in mind that this filtering does not happen until after the list items have been pulled down, so you may want to do some additional filtering to narrow the results so you don't run afoul of the new Throttling feature of SharePoint 2010.&lt;br /&gt;&lt;br /&gt;Here was the CAML generated by the last LINQ query, which shows that the additional filtering for Term was done after the records were pulled.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;view&gt;&lt;br /&gt;  &lt;query&gt;&lt;br /&gt;    &lt;where&gt;&lt;br /&gt;      &lt;beginswith&gt;&lt;br /&gt;        &lt;fieldref Name="ContentTypeId" /&gt;&lt;br /&gt;        &lt;value Type="ContentTypeId"&gt;0x0100&lt;/Value&gt;&lt;br /&gt;      &lt;/BeginsWith&gt;&lt;br /&gt;    &lt;/Where&gt;&lt;br /&gt;  &lt;/Query&gt;&lt;br /&gt;  &lt;ViewFields=""&gt;&lt;br /&gt;    &lt;fieldref Name="First_x0020_Name" /&gt;&lt;br /&gt;    &lt;fieldref Name="Specialty" /&gt;&lt;br /&gt;    &lt;fieldref Name="ExampleId" /&gt;&lt;br /&gt;    &lt;fieldref Name="ID" /&gt;&lt;br /&gt;    &lt;fieldref Name="owshiddenversion" /&gt;&lt;br /&gt;    &lt;fieldref Name="FileDirRef" /&gt;&lt;br /&gt;    &lt;fieldref Name="Title" /&gt;&lt;br /&gt;    &lt;/ViewFields&gt;&lt;br /&gt;    &lt;rowlimit Paged="TRUE"&gt;2147483647&lt;/RowLimit&gt;&lt;br /&gt;&lt;/View&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-6264867885910594943?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/6264867885910594943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-using-linq-to-sharepoint-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/6264867885910594943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/6264867885910594943'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-using-linq-to-sharepoint-to.html' title='SP 2010 - Using LINQ to SharePoint to Find List Items with Specific Managed Metadata Terms'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-4343612523461928088</id><published>2010-04-19T10:59:00.005-04:00</published><updated>2010-04-19T11:03:03.057-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ to SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SP 2010 - Managed Metadata Columns ARE Supported in LINQ to SharePoint</title><content type='html'>I apparently &lt;a href="http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-managed-metadata-columns-not.html"&gt;spoke too soon&lt;/a&gt;! You can get to Managed Metadata Columns in LINQ to SharePoint with SPMetal, just not directly off the command line. You need to supply a parameters option.&lt;br /&gt;&lt;br /&gt;First you'll want to create your parameters file. I've found two different ways to get the Managed Metadata Column to show up. The first attempt I used this XML in my parameter file.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;web xmlns="http://schemas.microsoft.com/SharePoint/2009/spmetal"&gt;&lt;br /&gt;  &lt;list name="Examples"&gt;&lt;br /&gt;    &lt;contenttype class="Example" name="Item"&gt;&lt;br /&gt;      &lt;includehiddencolumns&gt;&lt;br /&gt;    &lt;/includehiddencolumns&gt;&lt;br /&gt;  &lt;/contenttype&gt;&lt;br /&gt;&lt;/list&gt;&lt;br /&gt;&lt;/web&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I saved this file to &lt;b&gt;metaloptions.xml&lt;/b&gt; and then ran the following command.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SPMetal.exe /web:http://mysite /code:SPMySite.cs /namespace:SPMySite /parameters:metaloptions.xml&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The output of that command will include a warning, but it seems to have no impact on LINQ working. I think it's purely informational and not relevant to what we are working with.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Warning: All content types for list Form Templates were excluded.&lt;/blockquote&gt;&lt;br /&gt;Now when I query with LINQ I see the hidden fields that power my Managed Metadata Column, which &lt;a href="http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-site-columns-for.html"&gt;look familiar&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;On my typed list item object, I now had three new fields:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Specialty_0 - String&lt;/li&gt;&lt;li&gt;TaxonomyCatchAllColumnCatchAllData - IList&lt;string&gt;&lt;/string&gt;&lt;/li&gt;&lt;li&gt;TaxonomyCatchAllColumnId - IList&lt;int?&gt;&lt;/int?&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Those fields hold values that look like this, respectively. Unfortunately, this isn't terribly useful.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Value One|e203149a-6852-46fb-9d8e-9c21d350068d&lt;/li&gt;&lt;li&gt;z4KDDWMtIUSjerk4bQvlyA==|0c7eej633Ee2lYK7KOL0jw==|mhQD4lJo+0adjpwh01AGjQ==&lt;/li&gt;&lt;li&gt;4&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I tried another pass on my parameters file. This time I used the following XML. &lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;br /&gt;&lt;web xmlns="http://schemas.microsoft.com/SharePoint/2009/spmetal"&gt;&lt;br /&gt;  &lt;list Name="Examples"&gt;&lt;br /&gt;    &lt;contenttype Name="Item" Class="Example"&gt;&lt;br /&gt;      &lt;column Name="Specialty" /&gt;&lt;br /&gt;    &lt;/ContentType&gt;&lt;br /&gt;  &lt;/List&gt;&lt;br /&gt;&lt;/Web&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;On my typed list item object, I now have the one extra Column that I specified in my parameters file. LINQ will create a property for this field that is just an object. However, if you access this property, you can cast it to a TaxonomyFieldValueCollection or TaxonomyFieldValue, as appropriate. This provides exactly the information we wanted:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;using (SPMySiteDataContext context = new SPMySiteDataContext("http://mysite"))&lt;br /&gt;{&lt;br /&gt; var examples = from d in context.examples&lt;br /&gt;      select d;&lt;br /&gt;&lt;br /&gt; foreach (var example in examples)&lt;br /&gt; {&lt;br /&gt;  if (example.Specialty is TaxonomyFieldValueCollection)&lt;br /&gt;  {&lt;br /&gt;   foreach (TaxonomyFieldValue tfv in (TaxonomyFieldValueCollection)example.Specialty)&lt;br /&gt;   {&lt;br /&gt;    Console.WriteLine(tfv.Label);&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  else if (example.Specialty is TaxonomyFieldValue)&lt;br /&gt;  {&lt;br /&gt;   TaxonomyFieldValue tfv = (TaxonomyFieldValue)example.Specialty;&lt;br /&gt;   Console.WriteLine(tfv.Label);&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-4343612523461928088?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/4343612523461928088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-managed-metadata-columns-are.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4343612523461928088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4343612523461928088'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-managed-metadata-columns-are.html' title='SP 2010 - Managed Metadata Columns ARE Supported in LINQ to SharePoint'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-7210336684289700763</id><published>2010-04-19T10:12:00.001-04:00</published><updated>2010-04-19T11:04:11.915-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ to SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SP 2010 - Managed Metadata Columns Not Supported in LINQ to SharePoint?</title><content type='html'>Today I am playing with LINQ to SharePoint. I created a simple list and added a Managed Metadata Column to my list. I then used SPMetal to generate a DataContext class. My Managed Metadata Column is nowhere to be found. I looked through options for SPMetal to see if maybe it just needed a switch to capture those Managed Metadata Columns, but I don't see one.&lt;br /&gt;&lt;br /&gt;So it appears that Managed Metadata Columns have no support in LINQ to SharePoint. They are also not eligible to be Projected Fields. It would seem Microsoft didn't really flesh out all the ways the new Managed Metadata Service might be used.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update: &lt;a href="http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-managed-metadata-columns-are.html"&gt;I figured out how to do this&lt;/a&gt;.&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-7210336684289700763?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/7210336684289700763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-managed-metadata-columns-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/7210336684289700763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/7210336684289700763'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-managed-metadata-columns-not.html' title='SP 2010 - Managed Metadata Columns Not Supported in LINQ to SharePoint?'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-1839207404032587888</id><published>2010-04-15T16:08:00.001-04:00</published><updated>2010-04-15T16:11:27.406-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SP 2010 - Creating ListItems with Managed Metadata Columns</title><content type='html'>Today I needed to create some list items programatically for a list that contained Managed Metadata columns. Since Managed Metadata columns are specialized SPLookups under the covers, it's a little more difficult to set your field value than just assigning the text value of your Term.&lt;br /&gt;&lt;br /&gt;Here is a method that will set the value for you, and an example of how to use it. Note that in my example the Managed Metadata column is multi-value, even though the example method is only set up to add a single Term. If you have a single-value Managed Metadata column, you can leave out the &lt;b&gt;TaxonomyFieldValueCollection&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;class Program&lt;br /&gt;{&lt;br /&gt; static void Main(string[] args)&lt;br /&gt; {&lt;br /&gt;  using (SPSite site = new SPSite("http://mysite"))&lt;br /&gt;  {&lt;br /&gt;   SPList pl = site.RootWeb.Lists["MyList"];&lt;br /&gt;   if (pl != null)&lt;br /&gt;   {&lt;br /&gt;    TaxonomySession session = new TaxonomySession(site);&lt;br /&gt;    TermStore termStore = session.TermStores["Managed Metadata Service"];&lt;br /&gt;    Group group = termStore.Groups["MyGroup"];&lt;br /&gt;    TermSet termSet = group.TermSets["MyTermSet"];&lt;br /&gt;&lt;br /&gt;    SPListItem li = pl.AddItem();&lt;br /&gt;    li[SPBuiltInFieldId.Title] = "my new item";&lt;br /&gt;&lt;br /&gt;    Term term = termSet.Terms["MyTerm"];&lt;br /&gt;    UpdateListItemTermColumn(li, "MyMetadataField", term);&lt;br /&gt;&lt;br /&gt;    li.Update();&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; static void UpdateListItemTermColumn(SPListItem li, string fieldName, Term term)&lt;br /&gt; {&lt;br /&gt;  SPField termField = li.Fields[fieldName];&lt;br /&gt;&lt;br /&gt;  TaxonomyFieldValueCollection tfvc = new TaxonomyFieldValueCollection(termField);&lt;br /&gt;  tfvc.Add( new TaxonomyFieldValue(termField));&lt;br /&gt;  li[fieldName] = tfvc;&lt;br /&gt;&lt;br /&gt;  TaxonomyField taxonomyField = termField as TaxonomyField;&lt;br /&gt;  if (taxonomyField != null)&lt;br /&gt;  {&lt;br /&gt;   taxonomyField.SetFieldValue(li, term);&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-1839207404032587888?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/1839207404032587888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-creating-listitems-with-managed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/1839207404032587888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/1839207404032587888'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-creating-listitems-with-managed.html' title='SP 2010 - Creating ListItems with Managed Metadata Columns'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-3555412576146437206</id><published>2010-04-15T11:33:00.000-04:00</published><updated>2010-04-15T11:33:39.651-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SP 2010 - Empty Logs Versus Least Permissions Install</title><content type='html'>Earlier this week I was having &lt;a href="http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-uls-problems-logs-are.html"&gt;problems with my SharePoint logs being empty&lt;/a&gt;. At the time, the only fix I could discover was giving my AppPool identity Administrator rights on the machine. Obviously the reason the account lacked such permissions was because I had given it no rights when I created it - the same way I would have when I install MOSS 2007.&lt;br /&gt;&lt;br /&gt;Well giving Administrator rights to your AppPool identities in SharePoint 2010 is also a bad thing, as shown by the new Health Monitoring:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_0gM-pvb17tc/S8cxK5qeSbI/AAAAAAAAADg/wBs3YMvn2fo/s1600/error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="48" src="http://3.bp.blogspot.com/_0gM-pvb17tc/S8cxK5qeSbI/AAAAAAAAADg/wBs3YMvn2fo/s640/error.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;However, at this time, I can't seem to find what permission set is needed for ULS to be accessible by my AppPool account. Right now my choices are to upset Health Monitoring or to have logs. Having both is apparently a luxury.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-3555412576146437206?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/3555412576146437206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-empty-logs-versus-least.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3555412576146437206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3555412576146437206'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sp-2010-empty-logs-versus-least.html' title='SP 2010 - Empty Logs Versus Least Permissions Install'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_0gM-pvb17tc/S8cxK5qeSbI/AAAAAAAAADg/wBs3YMvn2fo/s72-c/error.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-2956531063522813479</id><published>2010-04-14T14:06:00.007-04:00</published><updated>2010-04-14T14:13:32.612-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Search Customization'/><title type='text'>SharePoint 2010 - Can't Open Crawled Properties</title><content type='html'>I have been working on building some custom Search components, which will leverage my own Managed Properties. However, early on in the process I hit a snag.&lt;br /&gt;&lt;br /&gt;I created some sample content and then running a full index of my farm. SharePoint was able to discover some new Crawled Properties during this process, which I was hoping to turn into Managed Properies. However, when clicking on any of the new Crawled Properties, I get an error &lt;b&gt;"Unable to cast object of type 'System.DBNull' to type 'System.String'"&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_0gM-pvb17tc/S8YEB5rqQkI/AAAAAAAAADY/hAKwIofemUM/s1600/error_cropped.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="176" src="http://2.bp.blogspot.com/_0gM-pvb17tc/S8YEB5rqQkI/AAAAAAAAADY/hAKwIofemUM/s400/error_cropped.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Using my &lt;a href="http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-uls-problems-logs-are.html"&gt;newly working SharePoint logs&lt;/a&gt;, I found the following error message:&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left:25px;"&gt;&lt;b&gt;SchemaDatabase.GetSamples:Error occurred when reading [SampleUrl] System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Server.Search.Administration.SchemaDatabase.GetSamples(CrawledProperty crawledProperty, Int32 sampleCount)&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I then opened up Reflector to find what was going on in that method. It turns out to be a very simple method that just calls a stored procedure. I fired up SQL Server Profiler and tracked down this call, which ultimately was breaking the page:&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left:25px;"&gt;&lt;b&gt;exec dbo.proc_MSS_GetCrawledPropertySamplesByPropertyID @CrawledPropertyId=334,@SampleCount=5&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So, as it turns out, this SProc does handle NULLs, just not as robustly as we might want! Here is the SProc, which I found in the &lt;b&gt;Search_Service_Application_PropertyStoreDB_{GUID}&lt;/b&gt; database:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;CREATE PROCEDURE dbo.proc_MSS_GetCrawledPropertySamplesByPropertyID&lt;br /&gt;@CrawledPropertyId  int,        &lt;br /&gt;@SampleCount        int&lt;br /&gt;AS&lt;br /&gt;        set RowCount @SampleCount&lt;br /&gt;     SELECT&lt;br /&gt;           ( DP.strVal + ISNULL(cast(DP.strVal2 AS nvarchar(2000)), '') ) as 'SampleURL'&lt;br /&gt;     FROM &lt;br /&gt;            dbo.MSSDocProps as DP         &lt;br /&gt;        INNER JOIN &lt;br /&gt;            dbo.MSSCrawledPropSamples as CPS&lt;br /&gt;            on CPS.DocId = DP.DocId&lt;br /&gt;     WHERE&lt;br /&gt;         CPS.CrawledPropertyId = @CrawledPropertyId&lt;br /&gt;            AND DP.Pid          = 7&lt;br /&gt;        ORDER BY DP.strVal&lt;br /&gt;        set RowCount 0&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Normally I wouldn't dream of altering a SharePoint SProc, but seeing as we are still in beta and I'm approaching a deadline, I decided to make a slight adjustment:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;alter PROCEDURE dbo.proc_MSS_GetCrawledPropertySamplesByPropertyID&lt;br /&gt;@CrawledPropertyId  int,        &lt;br /&gt;@SampleCount        int&lt;br /&gt;AS&lt;br /&gt;        set RowCount @SampleCount&lt;br /&gt;     SELECT&lt;br /&gt;           ( ISNULL(DP.strVal,'') + ISNULL(cast(DP.strVal2 AS nvarchar(2000)), '') ) as 'SampleURL'&lt;br /&gt;     FROM &lt;br /&gt;            dbo.MSSDocProps as DP         &lt;br /&gt;        INNER JOIN &lt;br /&gt;            dbo.MSSCrawledPropSamples as CPS&lt;br /&gt;            on CPS.DocId = DP.DocId&lt;br /&gt;     WHERE&lt;br /&gt;         CPS.CrawledPropertyId = @CrawledPropertyId&lt;br /&gt;            AND DP.Pid          = 7&lt;br /&gt;        ORDER BY DP.strVal&lt;br /&gt;        set RowCount 0&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;Now, when clicking on my Crawled Property, I get a proper page:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_0gM-pvb17tc/S8YDtIGL45I/AAAAAAAAADQ/EDog7lFpjsA/s1600/fixed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="497" src="http://4.bp.blogspot.com/_0gM-pvb17tc/S8YDtIGL45I/AAAAAAAAADQ/EDog7lFpjsA/s640/fixed.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-2956531063522813479?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/2956531063522813479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-cant-open-crawled.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/2956531063522813479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/2956531063522813479'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-cant-open-crawled.html' title='SharePoint 2010 - Can&apos;t Open Crawled Properties'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_0gM-pvb17tc/S8YEB5rqQkI/AAAAAAAAADY/hAKwIofemUM/s72-c/error_cropped.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-5340134330617105047</id><published>2010-04-14T13:24:00.000-04:00</published><updated>2010-04-14T13:24:45.498-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>Sharepoint 2010 ULS Problems - Logs are Empty!</title><content type='html'>I've been noticing since my install that SharePoint 2010 seems to not be logging much. It was logging some, but most of the logs were very small. Contrast this with SharePoint 2007 where you could easily generated several hundred kilobytes of logging within a few minute span and you can tell something is wrong.&lt;br /&gt;&lt;br /&gt;I tried a lot of things to get to the root of my problem. The question I was trying to answer was why sometimes I'd get logs, and other times not. And why were none of my Correlation IDs found? I tried a lot of different things, including:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Disabling the Windows Firewall&lt;/li&gt;&lt;li&gt; Stopping and restarting the Windows SharePoint Services Tracing V4 service.&lt;/li&gt;&lt;li&gt; Running commands from stsadm or Powershell to see if they could log.&lt;/li&gt;&lt;/ul&gt;While doing this, I started reading the log entries I was receiving and noticed something. Each of the entries listed the process that was adding the entry. I saw entries from the following processes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; STSADM.EXE&lt;/li&gt;&lt;li&gt;PowerShell.exe&lt;/li&gt;&lt;li&gt;wsstracing.exe &lt;/li&gt;&lt;li&gt;vssphost4.exe&lt;/li&gt;&lt;li&gt;psconfigui.exe&lt;/li&gt;&lt;/ul&gt;Surprisingly, I didn't see a single entry for w3wp.exe. I decided to check permissions for the LOGS folder. The user who runs my AppPool, sp_Farm looks like he has almost every permission there is, and should be able to do almost anything to the log files. It didn't make sense.&lt;br /&gt;&lt;br /&gt;In frustration I put all my AppPool accounts in the Administrators group and rebooted the machine. Suddenly my logs are going wild.&lt;br /&gt;&lt;br /&gt;I'm not entirely sure why my AppPool accounts couldn't write to the logs when they are already in WSS_ADMIN_WPG, but there is clearly some missing permission somewhere. I'll have to break out procmon when I have some free time to figure out what the permission was missing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-5340134330617105047?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/5340134330617105047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-uls-problems-logs-are.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5340134330617105047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5340134330617105047'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-uls-problems-logs-are.html' title='Sharepoint 2010 ULS Problems - Logs are Empty!'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-1035800035168773961</id><published>2010-04-13T14:15:00.001-04:00</published><updated>2010-04-13T14:15:55.890-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>How Not to Run SharePoint 2010 Successfully</title><content type='html'>I'm still waiting on some new RAM to arrive in the mail, so currently my development machine for SharePoint 2010 is a Core2Duo 2Ghz laptop running a VM with 2Gigs of RAM. Needless to say, I've gotten used to looking at this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_0gM-pvb17tc/S8S0gjJ4RsI/AAAAAAAAACc/hpihAUALLgg/s1600/100percent.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="603" src="http://1.bp.blogspot.com/_0gM-pvb17tc/S8S0gjJ4RsI/AAAAAAAAACc/hpihAUALLgg/s640/100percent.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-1035800035168773961?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/1035800035168773961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/how-not-to-run-sharepoint-2010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/1035800035168773961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/1035800035168773961'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/how-not-to-run-sharepoint-2010.html' title='How Not to Run SharePoint 2010 Successfully'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_0gM-pvb17tc/S8S0gjJ4RsI/AAAAAAAAACc/hpihAUALLgg/s72-c/100percent.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-8147340788840211938</id><published>2010-04-13T10:52:00.003-04:00</published><updated>2010-05-04T12:17:13.019-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SP 2010 - Adding Metadata Columns to Content Type Programatically</title><content type='html'>I have a feature that provisions a few Site Columns and a Content Type that will use those Site Columns. This was easy enough to achieve with some XML packaged into a Feature. However, my Content Type also needed to have a Managed Metadata column, which doesn't work with XML.&lt;br /&gt;&lt;br /&gt;The reasons you can't do a Managed Metadata Site Column through XML are the same reasons Lookup columns don't work - the GUIDs that refer to the underlying objects change between environments, so you can't hardcode them into the XML. If you wanted to write the XML by hand to do this and already knew the GUIDs, it would of course work, but that's more effort than it's worth for such a limited solution.&lt;br /&gt;&lt;br /&gt;My first thought when trying this was that I knew when I had exported my Content Type that I created through the GUI I found out that my Managed Metadata Site Column as provisioned ended up being &lt;a href="http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-site-columns-for.html"&gt;several different SPFields under the covers&lt;/a&gt;. So in my first pass, I tried to create all of these fields. That ended up breaking my site because I was unable to remove all the SPFields/SPContentTypes after the fact!&lt;br /&gt;&lt;br /&gt;Well, it turns out the answer isn't so hard after you try all the wrong ways first. I ended up having my Feature that provisions the base Site Columns and Content Type via XML. I then created a Feature Receiver that creates the Managed Metadata Site Column and then adds it to the Content Type. Here is the code:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;public enum Operation&lt;br /&gt;{&lt;br /&gt; Add,&lt;br /&gt; Remove&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;[Guid("367cb65f-cd86-440a-8f39-1bfa2a9ab1f6")]&lt;br /&gt;public class MyContentTypeEventReceiver : SPFeatureReceiver&lt;br /&gt;{&lt;br /&gt; /*&lt;br /&gt;  * On feature activation, we are going to provision a site column that points to the Managed MetaData Service used by this site.&lt;br /&gt;  * We have to do this because managed metadata columns work like lookups do under the covers and are keyed to the store they were&lt;br /&gt;  * created with.&lt;br /&gt;  * &lt;br /&gt;  * After creating the site column, we will then update our content type to include the new site column.&lt;br /&gt;  */&lt;br /&gt; public override void FeatureActivated(SPFeatureReceiverProperties properties)&lt;br /&gt; {&lt;br /&gt;  ProvisionMetadataSiteColumn("Managed Metadata Service", "MyGroup", "MyTermSet", "MyField", "MyFieldGroup", true, true);&lt;br /&gt;  UpdateContentType("MyContentType", "MyField", Operation.Add);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public override void FeatureDeactivating(SPFeatureReceiverProperties properties)&lt;br /&gt; {&lt;br /&gt;  UpdateContentType("MyContentType", "MyField", Operation.Remove);&lt;br /&gt;  RemoveSiteColumn("MyField");&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; #region Helper Methods&lt;br /&gt;&lt;br /&gt; private bool ProvisionMetadataSiteColumn(string termStoreName, string termGroupName, string termSetName, string fieldName, string fieldGroupName, bool isRequired, bool allowMultipleValues)&lt;br /&gt; {&lt;br /&gt;  bool added = false;&lt;br /&gt;  using(SPSite site = SPContext.Current.Site)&lt;br /&gt;  {&lt;br /&gt;   if(GetSiteColumn(site.RootWeb, fieldName) == null)&lt;br /&gt;   {&lt;br /&gt;    //this can time out which would cause it to be returned with no term stores; might be a fluke or very situational&lt;br /&gt;    TaxonomySession session = new TaxonomySession(site);&lt;br /&gt;&lt;br /&gt;    TermStore termStore = GetTermStore(session, termStoreName);&lt;br /&gt;    if (termStore != null)&lt;br /&gt;    {&lt;br /&gt;     Group group = GetTermGroup(termStore, termGroupName);&lt;br /&gt;     if (group != null)&lt;br /&gt;     {&lt;br /&gt;      TermSet termSet = GetTermSet(group, termSetName);&lt;br /&gt;      if (termSet != null)&lt;br /&gt;      {&lt;br /&gt;       string fieldType = (allowMultipleValues ? "TaxonomyFieldTypeMulti" : "TaxonomyFieldType");&lt;br /&gt;&lt;br /&gt;       TaxonomyField field = (TaxonomyField)site.RootWeb.Fields.CreateNewField(fieldType, fieldName);&lt;br /&gt;       field.SspId = termStore.Id;&lt;br /&gt;       field.TermSetId = termSet.Id;&lt;br /&gt;       field.AllowMultipleValues = allowMultipleValues;&lt;br /&gt;       field.Group = fieldGroupName;&lt;br /&gt;       field.Required = isRequired;&lt;br /&gt;&lt;br /&gt;       site.RootWeb.Fields.Add(field);&lt;br /&gt;       site.RootWeb.Update();&lt;br /&gt;&lt;br /&gt;       added = true;&lt;br /&gt;      }&lt;br /&gt;     }&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  return added;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; private void UpdateContentType(string contentTypeName, string fieldName, Operation operation)&lt;br /&gt; {&lt;br /&gt;  using (SPSite site = SPContext.Current.Site)&lt;br /&gt;  {&lt;br /&gt;   SPContentType contentType = GetContentType(site.RootWeb, contentTypeName);&lt;br /&gt;   if (contentType != null)&lt;br /&gt;   {&lt;br /&gt;    SPField field = GetSiteColumn(site.RootWeb, fieldName);&lt;br /&gt;    if (field != null)&lt;br /&gt;    {&lt;br /&gt;     bool hasFieldLink = HasFieldLink(contentType, field.Id);&lt;br /&gt;&lt;br /&gt;     if (operation == Operation.Add &amp;&amp; !hasFieldLink)&lt;br /&gt;     {&lt;br /&gt;      SPFieldLink link = new SPFieldLink(field);&lt;br /&gt;      contentType.FieldLinks.Add(link);&lt;br /&gt;      contentType.Update();&lt;br /&gt;     }&lt;br /&gt;     else if (operation == Operation.Remove &amp;&amp; hasFieldLink)&lt;br /&gt;     {&lt;br /&gt;      contentType.FieldLinks.Delete(field.Id);&lt;br /&gt;      contentType.Update();&lt;br /&gt;     }&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; private bool RemoveSiteColumn(string fieldName)&lt;br /&gt; {&lt;br /&gt;  bool deleted = false;&lt;br /&gt;&lt;br /&gt;  using(SPSite site = SPContext.Current.Site)&lt;br /&gt;  {&lt;br /&gt;   SPField field = GetSiteColumn(site.RootWeb, fieldName);&lt;br /&gt;   if (field != null)&lt;br /&gt;   {&lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;     field.Delete();&lt;br /&gt;     deleted = true;&lt;br /&gt;    }&lt;br /&gt;    catch { }&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  return deleted;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; #endregion&lt;br /&gt;&lt;br /&gt; #region Helper Methods to allow NULL checks with SharePoint&lt;br /&gt;&lt;br /&gt; private SPField GetSiteColumn(SPWeb web, Guid fieldId)&lt;br /&gt; {&lt;br /&gt;  SPField field = null;&lt;br /&gt;&lt;br /&gt;  try&lt;br /&gt;  {&lt;br /&gt;   field = web.Fields[fieldId];&lt;br /&gt;  }&lt;br /&gt;  catch { }&lt;br /&gt;&lt;br /&gt;  return field;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; private SPField GetSiteColumn(SPWeb web, string fieldName)&lt;br /&gt; {&lt;br /&gt;  SPField field = null;&lt;br /&gt;&lt;br /&gt;  try&lt;br /&gt;  {&lt;br /&gt;   field = web.Fields[fieldName];&lt;br /&gt;  }&lt;br /&gt;  catch { }&lt;br /&gt;&lt;br /&gt;  return field;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; private SPContentType GetContentType(SPWeb web, string contentTypeName)&lt;br /&gt; {&lt;br /&gt;  SPContentType contentType = null;&lt;br /&gt;&lt;br /&gt;  try&lt;br /&gt;  {&lt;br /&gt;   contentType = web.ContentTypes[contentTypeName];&lt;br /&gt;  }&lt;br /&gt;  catch { }&lt;br /&gt;&lt;br /&gt;  return contentType;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; private bool HasFieldLink(SPContentType contentType, Guid fieldId)&lt;br /&gt; {&lt;br /&gt;  bool found = false;&lt;br /&gt;  foreach (SPFieldLink fl in contentType.FieldLinks)&lt;br /&gt;  {&lt;br /&gt;   if (fl.Id == fieldId)&lt;br /&gt;   {&lt;br /&gt;    found = true;&lt;br /&gt;    break;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  return found;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; private TermStore GetTermStore(TaxonomySession session, string termStoreName)&lt;br /&gt; {&lt;br /&gt;  TermStore termStore = null;&lt;br /&gt;&lt;br /&gt;  try&lt;br /&gt;  {&lt;br /&gt;   termStore = session.TermStores[termStoreName];&lt;br /&gt;  }&lt;br /&gt;  catch { }&lt;br /&gt;&lt;br /&gt;  return termStore;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; private Group GetTermGroup(TermStore termStore, string termGroupName)&lt;br /&gt; {&lt;br /&gt;  Group group = null;&lt;br /&gt;&lt;br /&gt;  try&lt;br /&gt;  {&lt;br /&gt;   group = termStore.Groups[termGroupName];&lt;br /&gt;  }&lt;br /&gt;  catch { }&lt;br /&gt;&lt;br /&gt;  return group;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; private TermSet GetTermSet(Group group, string termSetName)&lt;br /&gt; {&lt;br /&gt;  TermSet termSet = null;&lt;br /&gt;&lt;br /&gt;  try&lt;br /&gt;  {&lt;br /&gt;   termSet = group.TermSets[termSetName];&lt;br /&gt;  }&lt;br /&gt;  catch { }&lt;br /&gt;&lt;br /&gt;  return termSet;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; #endregion&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-8147340788840211938?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/8147340788840211938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/adding-metadata-columns-to-content-type.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/8147340788840211938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/8147340788840211938'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/adding-metadata-columns-to-content-type.html' title='SP 2010 - Adding Metadata Columns to Content Type Programatically'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-7232667080172996656</id><published>2010-04-13T09:36:00.000-04:00</published><updated>2010-04-13T09:36:40.628-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>TaxonomySession doesn't show my Term Stores</title><content type='html'>I ran into an issue yesterday that I haven't completely figured out just yet. Specifically, I had a feature receiver that was querying a Term Store to create a Site Column. Unfortunately, it kept failing. When I attached a debugger to the process it eventually showed me that TaxonomySession.TermStores was empty.&lt;br /&gt;&lt;br /&gt;After playing with it a bit, I finally got it to work by opening up Central Administration and going to the Managed Metadata Service page to "warm" up the Taxonomy service. I'm not sure if it was a web service time out issue or not, but that seems likely. I believe that the worker process powering the Taxonomy web service was taking too long to spin up on my resource starved laptop, which was causing TaxonomySession to give up on loading any TermStores.&lt;br /&gt;&lt;br /&gt;Unfortunately, ULS shut itself down for some reason during this period, and I was unable to find any logging event that would give me more insight.&lt;br /&gt;&lt;br /&gt;If I find out anymore, I'll post about it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-7232667080172996656?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/7232667080172996656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/taxonomysession-doesnt-show-my-term.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/7232667080172996656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/7232667080172996656'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/taxonomysession-doesnt-show-my-term.html' title='TaxonomySession doesn&apos;t show my Term Stores'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-3274700462047373227</id><published>2010-04-12T09:34:00.002-04:00</published><updated>2010-04-13T10:56:00.731-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 Site Columns for Managed Metadata</title><content type='html'>I'm still not 100% sure how references to the Managed Metadata Term Stores work. But the Content Type I recently created used one and I'm hoping to get a chance to digest this further soon.&lt;br /&gt;&lt;br /&gt;For instance, if I make a feature that pushes out this Site Column, will the GUIDs line up with the external Term Store as long as I use the export/import feature on the Managed Metadata Service?&lt;br /&gt;&lt;br /&gt;While I ponder those things, here is the XML for what a site column that refers to the term store. As you can see, it's split across several SPFields.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;field Type="Note" DisplayName="Specialty_0" StaticName="SpecialtyTaxHTField0" Name="SpecialtyTaxHTField0" ID="{d9c15c13-8073-48ff-9a0c-1fdfe0707693}" ShowInViewForms="FALSE" Required="FALSE" Hidden="TRUE" CanToggleHidden="TRUE" SourceID="{4a7053be-a764-4e83-9366-c9721748ed4c}" Customization="" ColName="ntext2" RowOrdinal="0"/&gt;&lt;br /&gt;      &lt;field Type="LookupMulti" DisplayName="Taxonomy Catch All Column" StaticName="TaxCatchAll" Name="TaxCatchAll" ID="{f3b0adf9-c1a2-4b02-920d-943fba4b3611}" ShowInViewForms="FALSE" List="{5af1712a-00ab-41e7-8026-74775b06f817}" WebId="4a7053be-a764-4e83-9366-c9721748ed4c" Required="FALSE" Hidden="TRUE" CanToggleHidden="TRUE" ShowField="CatchAllData" SourceID="{4a7053be-a764-4e83-9366-c9721748ed4c}" Mult="TRUE" Sortable="FALSE" AllowDeletion="TRUE" Sealed="TRUE" Version="2" Customization="" ColName="int1" RowOrdinal="0"/&gt;&lt;br /&gt;      &lt;field Type="LookupMulti" DisplayName="Taxonomy Catch All Column1" StaticName="TaxCatchAllLabel" Name="TaxCatchAllLabel" ID="{8f6b6dd8-9357-4019-8172-966fcd502ed2}" ShowInViewForms="FALSE" List="{5af1712a-00ab-41e7-8026-74775b06f817}" WebId="4a7053be-a764-4e83-9366-c9721748ed4c" Required="FALSE" Hidden="TRUE" CanToggleHidden="TRUE" ShowField="CatchAllDataLabel" FieldRef="{F3B0ADF9-C1A2-4b02-920D-943FBA4B3611}" SourceID="{4a7053be-a764-4e83-9366-c9721748ed4c}" ReadOnly="TRUE" Mult="TRUE" Sortable="FALSE" AllowDeletion="TRUE" Sealed="TRUE" Version="2" Customization=""/&gt;&lt;br /&gt;      &lt;field Type="TaxonomyFieldTypeMulti" DisplayName="Specialty" List="{5af1712a-00ab-41e7-8026-74775b06f817}" WebId="4a7053be-a764-4e83-9366-c9721748ed4c" ShowField="Term1033" Required="FALSE" Mult="TRUE" Sortable="FALSE" Group="Actors" ID="{747934d3-c3f0-47cf-af57-f8944e13539d}" SourceID="{4a7053be-a764-4e83-9366-c9721748ed4c}" StaticName="Specialty" Name="Specialty" Version="2" Customization="" ColName="int2" RowOrdinal="0"&gt;&lt;br /&gt;        &lt;Default/&gt;&lt;br /&gt;        &lt;customization&gt;&lt;br /&gt;          &lt;arrayofproperty&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;SspId&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q1="http://www.w3.org/2001/XMLSchema" p4:type="q1:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;0d8382cf-2d63-4421-a37a-b9386d0be5c8&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;GroupId&lt;/Name&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;TermSetId&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q2="http://www.w3.org/2001/XMLSchema" p4:type="q2:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;7adeced1-b73e-47dc-b695-82bb28e2f48f&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;AnchorId&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q3="http://www.w3.org/2001/XMLSchema" p4:type="q3:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;00000000-0000-0000-0000-000000000000&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;UserCreated&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q4="http://www.w3.org/2001/XMLSchema" p4:type="q4:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;false&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;Open&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q5="http://www.w3.org/2001/XMLSchema" p4:type="q5:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;false&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;TextField&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q6="http://www.w3.org/2001/XMLSchema" p4:type="q6:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;{d9c15c13-8073-48ff-9a0c-1fdfe0707693}&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;IsPathRendered&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q7="http://www.w3.org/2001/XMLSchema" p4:type="q7:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;false&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;IsKeyword&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q8="http://www.w3.org/2001/XMLSchema" p4:type="q8:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;false&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;TargetTemplate&lt;/Name&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;CreateValuesInEditForm&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q9="http://www.w3.org/2001/XMLSchema" p4:type="q9:boolean" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;false&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;FilterAssemblyStrongName&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q10="http://www.w3.org/2001/XMLSchema" p4:type="q10:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;Microsoft.SharePoint.Taxonomy, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;FilterClassName&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q11="http://www.w3.org/2001/XMLSchema" p4:type="q11:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;Microsoft.SharePoint.Taxonomy.TaxonomyField&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;FilterMethodName&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q12="http://www.w3.org/2001/XMLSchema" p4:type="q12:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;GetFilteringHtml&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;            &lt;property&gt;&lt;br /&gt;              &lt;name&gt;FilterJavascriptProperty&lt;/Name&gt;&lt;br /&gt;              &lt;value xmlns:q13="http://www.w3.org/2001/XMLSchema" p4:type="q13:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"&gt;FilteringJavascript&lt;/Value&gt;&lt;br /&gt;            &lt;/Property&gt;&lt;br /&gt;          &lt;/ArrayOfProperty&gt;&lt;br /&gt;        &lt;/Customization&gt;&lt;br /&gt;      &lt;/Field&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-3274700462047373227?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/3274700462047373227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-site-columns-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3274700462047373227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3274700462047373227'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-site-columns-for.html' title='SharePoint 2010 Site Columns for Managed Metadata'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-7611577833996585078</id><published>2010-04-12T09:28:00.001-04:00</published><updated>2010-04-12T09:28:40.530-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 Content Type Features</title><content type='html'>Today I decided to create a Content Type for SharePoint 2010. As far as I can tell, while there has been a lot of effort in building in taxonomy improvements, such as tagging, the Content Type is still alive and well and works the same.&lt;br /&gt;&lt;br /&gt;The easiest way to create a Content Type feature in MOSS 2007 was to create it in the UI first and then extract it. Normally I use a tool for that, but decided this time I'd give it a shot and write code to do it myself. In the process I could see if the API had changed in this area. It appears to work the same, so experience in MOSS 2007 will apply directly.&lt;br /&gt;&lt;br /&gt;Here is the code if you want to try it yourself. The last line will be the contents of your Elements.xml file.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            GetContentType();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private static void GetContentType()&lt;br /&gt;        {&lt;br /&gt;            //we'd pull from SPContext.Current.Site, so wouldn't need to do this&lt;br /&gt;            using (SPSite site = new SPSite("http://sharepoint"))&lt;br /&gt;            {&lt;br /&gt;                string ctype = "0x0100420995776E88234093C72FC85E59E4A8"; //from querystring. you could also loop through the RootWeb.ContentTypes collection and find by name&lt;br /&gt;                SPContentTypeId id = new SPContentTypeId(ctype);&lt;br /&gt;&lt;br /&gt;                bool includeSiteColumns = true;&lt;br /&gt;&lt;br /&gt;                XmlDocument xdElements = new XmlDocument();&lt;br /&gt;                XmlElement xeElementRoot = xdElements.CreateElement("Elements");&lt;br /&gt;&lt;br /&gt;                XmlAttribute xaNamespace = xdElements.CreateAttribute("xmlns");&lt;br /&gt;                xaNamespace.Value = "http://schemas.microsoft.com/sharepoint/";&lt;br /&gt;                xeElementRoot.Attributes.Append(xaNamespace);&lt;br /&gt;&lt;br /&gt;                xdElements.AppendChild(xeElementRoot);&lt;br /&gt;&lt;br /&gt;                SPWeb web = site.RootWeb;&lt;br /&gt;                SPContentType ctMatch = web.ContentTypes[id];&lt;br /&gt;                if (ctMatch != null)&lt;br /&gt;                {&lt;br /&gt;                    XmlDocument xdSchema = new XmlDocument();&lt;br /&gt;                    xdSchema.LoadXml(ctMatch.SchemaXml);&lt;br /&gt;&lt;br /&gt;                    //move the field nodes - otherwise we won't pass the validation of an Elements node for our feature&lt;br /&gt;                    //these will become Site Columns&lt;br /&gt;                    XmlNode xnFields = xdSchema.SelectSingleNode("//Fields");&lt;br /&gt;                    if (xnFields != null)&lt;br /&gt;                    {&lt;br /&gt;                        xnFields.ParentNode.RemoveChild(xnFields);&lt;br /&gt;&lt;br /&gt;                        if (includeSiteColumns)&lt;br /&gt;                        {&lt;br /&gt;                            XmlDocumentFragment xdfFields = xdElements.CreateDocumentFragment();&lt;br /&gt;                            xdfFields.InnerXml = xnFields.InnerXml;&lt;br /&gt;                            xeElementRoot.AppendChild(xdfFields);&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    XmlDocumentFragment xdfContentType = xdElements.CreateDocumentFragment();&lt;br /&gt;                    xdfContentType.InnerXml = xdSchema.FirstChild.OuterXml;&lt;br /&gt;&lt;br /&gt;                    //inject FeildRefs to refer to the fields above&lt;br /&gt;                    XmlNode xnFieldRefs = xdElements.CreateElement("FieldRefs");&lt;br /&gt;&lt;br /&gt;                    StringBuilder sbFieldRefs = new StringBuilder();&lt;br /&gt;                    foreach (SPFieldLink fr in ctMatch.FieldLinks)&lt;br /&gt;                    {&lt;br /&gt;                        sbFieldRefs.Append(fr.SchemaXml);&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    XmlDocumentFragment xdfFieldReferences = xdElements.CreateDocumentFragment();&lt;br /&gt;                    xdfFieldReferences.InnerXml = sbFieldRefs.ToString();&lt;br /&gt;                    xnFieldRefs.AppendChild(xdfFieldReferences);&lt;br /&gt;&lt;br /&gt;                    xdfContentType.FirstChild.AppendChild(xnFieldRefs);&lt;br /&gt;&lt;br /&gt;                    xeElementRoot.AppendChild(xdfContentType);&lt;br /&gt;&lt;br /&gt;                    string s = xeElementRoot.OuterXml;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-7611577833996585078?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/7611577833996585078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-content-type-features.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/7611577833996585078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/7611577833996585078'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-content-type-features.html' title='SharePoint 2010 Content Type Features'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-4658037403645234754</id><published>2010-04-08T14:43:00.000-04:00</published><updated>2010-04-08T14:43:14.800-04:00</updated><title type='text'>SharePoint 2010 Random Publishing Error</title><content type='html'>Just got this lovely error when clicking the Edit button on a page that was pending approval on my publishing site. The joy of beta software!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_0gM-pvb17tc/S74ju_q6d6I/AAAAAAAAACU/SpA9qeu-9Tg/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="392" src="http://2.bp.blogspot.com/_0gM-pvb17tc/S74ju_q6d6I/AAAAAAAAACU/SpA9qeu-9Tg/s400/1.png" width="400" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-4658037403645234754?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/4658037403645234754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-random-publishing-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4658037403645234754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/4658037403645234754'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-random-publishing-error.html' title='SharePoint 2010 Random Publishing Error'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_0gM-pvb17tc/S74ju_q6d6I/AAAAAAAAACU/SpA9qeu-9Tg/s72-c/1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-874447948582986526</id><published>2010-04-08T14:38:00.001-04:00</published><updated>2010-04-08T14:39:13.407-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 Publishing Workflows Need the State Service!</title><content type='html'>In learning SharePoint 2010, I'm trying to take a minimalist approach, and only install services that I need. The problem is I don't yet know what those services are!&lt;br /&gt;&lt;br /&gt;So far, on my new installation I have a Managed Metadata Service and a Search Service Application. Thinking to test Search, I edited one of the default pages and then tried to publish it and got the following message:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_0gM-pvb17tc/S74gNWVRY1I/AAAAAAAAAB0/wz1jTL_ToLA/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_0gM-pvb17tc/S74gNWVRY1I/AAAAAAAAAB0/wz1jTL_ToLA/s320/1.png" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I suppose that the State Service needs to go on my list of required services. So, I went to install it from the Manage Service Applications page. For some reason, however, it was not listed!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_0gM-pvb17tc/S74hUM6mgrI/AAAAAAAAAB8/TSAFHm7Nu_s/s1600/list.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_0gM-pvb17tc/S74hUM6mgrI/AAAAAAAAAB8/TSAFHm7Nu_s/s320/list.png" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Of course, given my problems with the Managed Metadata Service, I now know that the true magic in SharePoint comes from the Farm Configuration Wizard. I opened it up and was not disappointed when I found this guy:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_0gM-pvb17tc/S74hiw9OP4I/AAAAAAAAACE/VSCJxW6feyA/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_0gM-pvb17tc/S74hiw9OP4I/AAAAAAAAACE/VSCJxW6feyA/s320/3.png" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Which leaves me with the following now running in my environment, and publishing workflows that can display properly.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_0gM-pvb17tc/S74ionSkMBI/AAAAAAAAACM/HsmDiYxCYsg/s1600/confirmation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="141" src="http://3.bp.blogspot.com/_0gM-pvb17tc/S74ionSkMBI/AAAAAAAAACM/HsmDiYxCYsg/s400/confirmation.png" width="400" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-874447948582986526?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/874447948582986526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-publishing-workflows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/874447948582986526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/874447948582986526'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-publishing-workflows.html' title='SharePoint 2010 Publishing Workflows Need the State Service!'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_0gM-pvb17tc/S74gNWVRY1I/AAAAAAAAAB0/wz1jTL_ToLA/s72-c/1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-5905859738563911611</id><published>2010-04-08T12:58:00.013-04:00</published><updated>2010-04-08T13:30:50.970-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 Pages Used to Create a New Managed Service</title><content type='html'>Here is the list of pages that are displayed inside the popup windows when you choose to create a new managed service. See &lt;a href="http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-create-new-managed.html"&gt;this post&lt;/a&gt; to see how I got this information.&lt;br /&gt;&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" style="font-size:.8em;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th width="210"&gt;Application Type&lt;/th&gt; &lt;th&gt;Create Application Link URL&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Access Database Service&lt;/td&gt;&lt;td&gt;/_admin/AccessServerCreateApplication.aspx&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Business Data Connectivity&lt;/td&gt;&lt;td&gt;/_admin/bdc/managebdcserviceapp.aspx?scenarioid=bdcservice&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Excel Calculation Services&lt;/td&gt;&lt;td&gt;/_admin/ExcelServerCreateApplication.aspx?scenarioid=ExcelServicesCreateApplication&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Managed Metadata Web Service&lt;/td&gt;&lt;td&gt;/_admin/ManageMetadataService.aspx&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PerformancePoint Service&lt;/td&gt;&lt;td&gt;/_admin/CreatePpsMaServiceAppData.aspx?scenarioId=CreatePpsMaApp&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SearchQueryAndSiteSettingsService&lt;/td&gt;&lt;td&gt;/_admin/search/TopologyAppSettings.aspx&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Secure Store Service&lt;/td&gt;&lt;td&gt;/_admin/sssvc/createsssvcapplication.aspx?scenarioid=createsssvcapp&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;User Profile Service&lt;/td&gt;&lt;td&gt;/_admin/NewProfileServiceApplicationSettings.aspx?scenarioid=CreateNewProfileServiceApplication&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Visio Graphics Service&lt;/td&gt;&lt;td&gt;/_admin/VisioServiceApplications.aspx&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Web Analytics Web Service&lt;/td&gt;&lt;td&gt;/_admin/WebAnalyticsConfigWizardNewAppPage.aspx&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Word Automation Services&lt;/td&gt;&lt;td&gt;/_admin/WordServerCreate.aspx&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-5905859738563911611?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/5905859738563911611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-pages-used-to-create.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5905859738563911611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/5905859738563911611'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-pages-used-to-create.html' title='SharePoint 2010 Pages Used to Create a New Managed Service'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-9222658250816075313</id><published>2010-04-08T12:49:00.002-04:00</published><updated>2010-04-08T13:31:20.273-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Code Samples'/><title type='text'>SharePoint 2010 Create New Managed Service Popup Windows</title><content type='html'>While exploring SharePoint I often read through Microsoft's code. With 2010, they added a lot of popup windows, and it's not always obvious which page is actually building the content of those popup windows.&lt;br /&gt;&lt;br /&gt;In this particular case, I wanted to know what the page was when I was trying to create a new Service Application. If you click the New button in the Ribbon, you'll get a nice flyout menu with a bunch of services to choose from. But where do they go?&lt;br /&gt;&lt;br /&gt;Here is a snippet that will get that answer for you:&lt;br /&gt;&lt;pre class="brush: csharp"&gt;class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            ShortDisplay();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        internal class HeaderColumn&lt;br /&gt;        {&lt;br /&gt;            public string Title { get; set; }&lt;br /&gt;            public int Width { get; set; }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        static HeaderColumn[] headers = new HeaderColumn[] { &lt;br /&gt;             new HeaderColumn{ Title="Application Type", Width=35 }, &lt;br /&gt;             new HeaderColumn{ Title="Create Application Link URL", Width=45 }&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        static string headerString = string.Empty;&lt;br /&gt;        static string lineFormatString = string.Empty;&lt;br /&gt;&lt;br /&gt;        static List&lt;spservice&gt; administrationServices = new List&lt;spservice&gt;();&lt;br /&gt;&lt;br /&gt;        private static void FormatHeader()&lt;br /&gt;        {&lt;br /&gt;            for (int i = 0; i &lt; headers.Length; i++)&lt;br /&gt;            {&lt;br /&gt;                headerString += string.Format("{0,-" + headers[i].Width.ToString() + "}", headers[i].Title);&lt;br /&gt;                lineFormatString += "{" + i.ToString() + ",-" + headers[i].Width.ToString() + "}";&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private static void FindAdministrationServices()&lt;br /&gt;        {&lt;br /&gt;            foreach (SPService service in SPFarm.Local.Services)&lt;br /&gt;            {&lt;br /&gt;                IServiceAdministration administration = service as IServiceAdministration;&lt;br /&gt;                if (administration != null)&lt;br /&gt;                {&lt;br /&gt;                    if (!administrationServices.Contains(service))&lt;br /&gt;                    {&lt;br /&gt;                        administrationServices.Add(service);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private static List&lt;SPAdministrationLink&gt; GetAdministrationLinks(IServiceAdministration administration)&lt;br /&gt;        {&lt;br /&gt;            List&lt;spadministrationlink&gt; administrationLinks = new List&lt;spadministrationlink&gt;();&lt;br /&gt;&lt;br /&gt;            foreach (Type type in administration.GetApplicationTypes())&lt;br /&gt;            {&lt;br /&gt;                SPPersistedTypeDescription applicationTypeDescription = administration.GetApplicationTypeDescription(type);&lt;br /&gt;                if (applicationTypeDescription != null)&lt;br /&gt;                {&lt;br /&gt;                    SPAdministrationLink createApplicationLink = administration.GetCreateApplicationLink(type);&lt;br /&gt;                    if ((createApplicationLink != null) &amp;&amp; !string.IsNullOrEmpty(createApplicationLink.Url))&lt;br /&gt;                    {&lt;br /&gt;                        administrationLinks.Add(createApplicationLink);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return administrationLinks;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static void ShortDisplay()&lt;br /&gt;        {&lt;br /&gt;            FormatHeader();&lt;br /&gt;            FindAdministrationServices();&lt;br /&gt;            &lt;br /&gt;            Console.WriteLine(headerString);&lt;br /&gt;            foreach (SPService service in administrationServices)&lt;br /&gt;            {&lt;br /&gt;                string displayName = (string.IsNullOrEmpty(service.DisplayName) ? service.TypeName : service.DisplayName);&lt;br /&gt;                //not very reusable, but good enough for now&lt;br /&gt;                if (displayName.Length &gt; 35)&lt;br /&gt;                {&lt;br /&gt;                    int lastDot = displayName.LastIndexOf('.');&lt;br /&gt;                    if (lastDot &gt;= 0 &amp;&amp; displayName.Length &gt; lastDot)&lt;br /&gt;                    {&lt;br /&gt;                        displayName = displayName.Substring(lastDot + 1, displayName.Length - lastDot - 1);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                IServiceAdministration administration = service as IServiceAdministration;&lt;br /&gt;                List&lt;spadministrationlink&gt; administrationLinks = GetAdministrationLinks(administration);&lt;br /&gt;                foreach(SPAdministrationLink createApplicationLink in administrationLinks)&lt;br /&gt;                {&lt;br /&gt;                    Console.WriteLine(lineFormatString, displayName, createApplicationLink.Url);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And here is the output:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_0gM-pvb17tc/S74I4mK3sMI/AAAAAAAAABs/gIvsK8qdkUY/s1600/services.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="113" src="http://2.bp.blogspot.com/_0gM-pvb17tc/S74I4mK3sMI/AAAAAAAAABs/gIvsK8qdkUY/s640/services.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-9222658250816075313?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/9222658250816075313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-create-new-managed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/9222658250816075313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/9222658250816075313'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-create-new-managed.html' title='SharePoint 2010 Create New Managed Service Popup Windows'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_0gM-pvb17tc/S74I4mK3sMI/AAAAAAAAABs/gIvsK8qdkUY/s72-c/services.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-6798421830734309357</id><published>2010-04-08T12:29:00.004-04:00</published><updated>2010-05-04T12:18:37.800-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Code Samples'/><title type='text'>SharePoint 2010 AppPool DropDownList</title><content type='html'>While playing around trying to figure out how SharePoint 2010 populates that wonderful drop down list of AppPools, as seen in the screeshot just below, I noticed that all the classes it uses are marked internal sealed.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_0gM-pvb17tc/S74DseDhhVI/AAAAAAAAABc/uRpP-sSTP4A/s1600/ddl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_0gM-pvb17tc/S74DseDhhVI/AAAAAAAAABc/uRpP-sSTP4A/s320/ddl.png" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;Since I wanted to learn more about how this control worked, I decided to use reflector to poke around. Here is the small amount of info I discovered of the items in the list:&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_0gM-pvb17tc/S74EIY2pFcI/AAAAAAAAABk/ujYZMG8xoAM/s1600/output.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_0gM-pvb17tc/S74EIY2pFcI/AAAAAAAAABk/ujYZMG8xoAM/s320/output.png" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;And here is the code that produces that output.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;public class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            DiscoverAppPools();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public class AppPoolInfo&lt;br /&gt;        {&lt;br /&gt;            public string Name { get; set; }&lt;br /&gt;            public string IISObjectName { get; set; }&lt;br /&gt;            public IdentityType IdentityType { get; set; }&lt;br /&gt;            public string Username { get; set; }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //Queries the farm to find the list of AppPools to display in an IisWebServiceApplicationPoolSection control&lt;br /&gt;        public static void DiscoverAppPools()&lt;br /&gt;        {&lt;br /&gt;            List&lt;apppoolinfo&gt; discoveredAppPools = new List&lt;apppoolinfo&gt;();&lt;br /&gt;&lt;br /&gt;            Assembly assembly = Assembly.Load("Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c");&lt;br /&gt;            Type typeSPIisWebServiceSettings = assembly.GetType("Microsoft.SharePoint.Administration.SPIisWebServiceSettings");&lt;br /&gt;&lt;br /&gt;            /*&lt;br /&gt;             * There are a few other interesting properties that we aren't pulling, but might be handy to peek at.&lt;br /&gt;             * oSettings.IisSiteName&lt;br /&gt;             * oSettings.HttpPort&lt;br /&gt;             * oSettings.HttpsPort&lt;br /&gt;             * oAppPool.Id&lt;br /&gt;             * oAppPool.Status&lt;br /&gt;             * oAppPool.ProcessAccount.SecurityIdentifier.Value&lt;br /&gt;             */&lt;br /&gt;            object oSettings = SPFarm.Local.GetObject("SharePoint Web Services", SPFarm.Local.Id, typeSPIisWebServiceSettings);&lt;br /&gt;            if (oSettings != null)&lt;br /&gt;            {&lt;br /&gt;                Type typeSPIisWebServiceApplicationPoolCollection = assembly.GetType("Microsoft.SharePoint.Administration.SPIisWebServiceApplicationPoolCollection");&lt;br /&gt;                ConstructorInfo constructor = typeSPIisWebServiceApplicationPoolCollection.GetConstructor(&lt;br /&gt;                    BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeSPIisWebServiceSettings }, null);&lt;br /&gt;&lt;br /&gt;                object oAppPools = null;                &lt;br /&gt;                if (constructor != null)&lt;br /&gt;                {&lt;br /&gt;                    oAppPools = constructor.Invoke(new object[] {oSettings});&lt;br /&gt;                    if (oAppPools != null)&lt;br /&gt;                    {&lt;br /&gt;                        Type typeSPIisWebServiceApplicationPool = assembly.GetType("Microsoft.SharePoint.Administration.SPIisWebServiceApplicationPool");&lt;br /&gt;&lt;br /&gt;                        IEnumerable appPools = (IEnumerable)oAppPools;&lt;br /&gt;                        if (appPools != null)&lt;br /&gt;                        {&lt;br /&gt;                            IEnumerator enumerator = appPools.GetEnumerator();&lt;br /&gt;                            while (enumerator.MoveNext())&lt;br /&gt;                            {&lt;br /&gt;                                AppPoolInfo api = new AppPoolInfo();&lt;br /&gt;&lt;br /&gt;                                object oAppPool = enumerator.Current;&lt;br /&gt;                                PropertyInfo piName = typeSPIisWebServiceApplicationPool.GetProperty("Name");&lt;br /&gt;                                if (piName != null)&lt;br /&gt;                                {&lt;br /&gt;                                    api.Name = (string)piName.GetValue(oAppPool, null);&lt;br /&gt;                                }&lt;br /&gt;&lt;br /&gt;                                PropertyInfo piIisObjectName = typeSPIisWebServiceApplicationPool.GetProperty("IisObjectName", BindingFlags.Instance | BindingFlags.NonPublic);&lt;br /&gt;                                if (piIisObjectName != null)&lt;br /&gt;                                {&lt;br /&gt;                                    api.IISObjectName = (string)piIisObjectName.GetValue(oAppPool, null);&lt;br /&gt;                                }&lt;br /&gt;&lt;br /&gt;                                //not terribly useful; really only gives a SID. Maybe good if you wanted their credentials as a SecureString&lt;br /&gt;                                //PropertyInfo piProcessAccount = typeSPIisWebServiceApplicationPool.GetProperty("ProcessAccount");&lt;br /&gt;                                //if (piProcessAccount != null)&lt;br /&gt;                                //{&lt;br /&gt;                                //    object o = piProcessAccount.GetValue(oAppPool, null);&lt;br /&gt;                                //}&lt;br /&gt;&lt;br /&gt;                                PropertyInfo piCurrentIdentityType = typeSPIisWebServiceApplicationPool.GetProperty("CurrentIdentityType", BindingFlags.Instance | BindingFlags.NonPublic);&lt;br /&gt;                                if (piCurrentIdentityType != null)&lt;br /&gt;                                {&lt;br /&gt;                                    api.IdentityType = (IdentityType)piCurrentIdentityType.GetValue(oAppPool, null);&lt;br /&gt;                                }&lt;br /&gt;&lt;br /&gt;                                PropertyInfo piManagedAccount = typeSPIisWebServiceApplicationPool.GetProperty("ManagedAccount", BindingFlags.Instance | BindingFlags.NonPublic);&lt;br /&gt;                                if (piManagedAccount != null)&lt;br /&gt;                                {&lt;br /&gt;                                    object oManagedAccount = piManagedAccount.GetValue(oAppPool, null);&lt;br /&gt;                                    if (oManagedAccount != null)&lt;br /&gt;                                    {&lt;br /&gt;                                        PropertyInfo piUsername = oManagedAccount.GetType().GetProperty("Username");&lt;br /&gt;                                        if (piUsername != null)&lt;br /&gt;                                        {&lt;br /&gt;                                            api.Username = (string)piUsername.GetValue(oManagedAccount, null);&lt;br /&gt;                                        }&lt;br /&gt;                                    }&lt;br /&gt;                                }&lt;br /&gt;&lt;br /&gt;                                discoveredAppPools.Add(api);&lt;br /&gt;                            }&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            Console.WriteLine("SharePoint knows about the following AppPools");&lt;br /&gt;            foreach(AppPoolInfo api in discoveredAppPools)&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine("\nAppPool: {0}", api.Name);&lt;br /&gt;                Console.WriteLine("  IIS Object Name: {0}", api.IISObjectName);&lt;br /&gt;                Console.WriteLine("  Identity Type: {0}", api.IdentityType);&lt;br /&gt;                Console.WriteLine("  Username: {0}", api.Username );&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-6798421830734309357?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/6798421830734309357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-apppool-dropdownlist.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/6798421830734309357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/6798421830734309357'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-apppool-dropdownlist.html' title='SharePoint 2010 AppPool DropDownList'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_0gM-pvb17tc/S74DseDhhVI/AAAAAAAAABc/uRpP-sSTP4A/s72-c/ddl.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-3001159179141235950</id><published>2010-04-08T10:23:00.008-04:00</published><updated>2010-04-19T13:57:25.893-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Development'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>Random SharePoint 2010 Coding Discoveries - AppPool DropDownList</title><content type='html'>While tinkering with my &lt;a href="http://sharepointlearningcurve.blogspot.com/2010/04/managed-metadata-service-fails-to-work_08.html"&gt;Managed Metadata Service issues&lt;/a&gt; this week, I noticed that the drop down list of Application Pools in SharePoint does not always match the Application Pools listed in IIS. I decided to dig and find out how SharePoint populates that list. &lt;br /&gt;I started by opening the page that creates the Managed Metadata Service, ManageMetadataService.aspx, located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\ADMIN,&amp;nbsp;since I knew it had the list of AppPools on it already. I found the control in there, IisWebServiceApplicationPoolSection, which lives in IisWebServiceApplicationPoolSection.ascx.&lt;br /&gt;&lt;br /&gt;That class for that control exists in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\Microsoft.SharePoint.dll assembly. Inside it I found the method that was doing the work, PopulateApplicationPoolDropDownList, and gave it a look. Here are the important lines:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;SPIisWebServiceSettings settings = SPIisWebServiceSettings.Default;&lt;br /&gt;if (null != settings) {&lt;br /&gt; foreach (SPIisWebServiceApplicationPool pool in settings.ApplicationPools)  {&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The key there is that the property, SPIisWebServiceSettings.Default, will ultimately return this: &lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;return (SPIisWebServiceSettings) farm.GetObject("SharePoint Web Services", farm.Id, typeof(SPIisWebServiceSettings));&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;That method, as you might guess, simply returns an SPPersistedObject, which is just a serialized object stored as an XML blob in the configuration database. In other words, the list is not being pulled directly from IIS, hence why SharePoint thinks I have an AppPool that IIS does not! &lt;br /&gt;&lt;br /&gt;A little more investigating has led me to this little gem, which I will have to look into further in the future, as it may help me fill in some of the missing pieces of how the AppPools eventually make their way into IIS: &lt;br /&gt;&lt;br /&gt;SPIisWebServiceApplicationPoolProvisioningJobDefinition.Execute(), which calls SPIisWebServiceApplicationPool.ProvisionLocal()&lt;br /&gt;&lt;br /&gt;I am done exploring for now, but at least I know I'm not crazy - just because SharePoint thinks there is an AppPool doesn't mean there actually is one! My current theory is that the job to create my AppPool didn't run or errored out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-3001159179141235950?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/3001159179141235950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/random-sharepoint-coding-discoveries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3001159179141235950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3001159179141235950'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/random-sharepoint-coding-discoveries.html' title='Random SharePoint 2010 Coding Discoveries - AppPool DropDownList'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-3349018888409109925</id><published>2010-04-08T09:46:00.003-04:00</published><updated>2010-04-08T09:48:57.628-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>Managed Metadata Service fails to work and missing AppPool, Round 2</title><content type='html'>As you might recall from &lt;a href="http://sharepointlearningcurve.blogspot.com/2010/04/managed-metadata-service-fails-to-work.html"&gt;this post&lt;/a&gt;, I have been trying to figure out why provisioning a Managed Metadata Service keeps failing. I know that my AppPool isn't getting created, which is strange, as SharePoint is usually good about creating AppPools whenever it asks you if you'd like one.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As my first two attempts both attempts ended with the same issue, I decided to try some different approaches. For my third attempt, I still chose to create the service myself (as opposed to using the Farm Configuration Wizard), but rather than selecting a new AppPool, I chose an existing one, SharePoint Web Services. Surprise, surprise, that doesn't work either. Exact same error message, even though we know this AppPool exists.&lt;br /&gt;&lt;br /&gt;In frustration, I restored from a snapshot again, but this time used the Farm Configuration Wizard with only the Managed Metadata Service checked. At the step for creating a Site Collection, I clicked Skip. And magically, it worked. How interesting that I can't use the GUI to provision a service but the wizard can. I decided to poke around and see what was different.&lt;br /&gt;&lt;br /&gt;So far I've noticed:&lt;br /&gt;&lt;br /&gt;In IIS&lt;br /&gt;&lt;ul&gt;&lt;li&gt;An AppPool with a GUID name, running with the Managed Account I specified in the wizard.&lt;/li&gt;&lt;li&gt;If I right click on the AppPool and choose "View Applications" I see a Virtual Directory that points to&amp;nbsp; C:\Program Files\Microsoft Office Servers\14.0\WebServices\Metadata.&lt;/li&gt;&lt;li&gt;The Virtual Directory lives under the SharePoint Web Services site.&lt;/li&gt;&lt;li&gt;An AppPool named "SharePoint - 80", also running with that Managed Account.&lt;/li&gt;&lt;li&gt;If I right click on this AppPool and choose "View Applications", I see a site that points to C:\inetpub\wwwroot\wss\VirtualDirectories\80 &lt;/li&gt;&lt;/ul&gt;In Central Administration&lt;br /&gt;&lt;ul&gt;&lt;li&gt; A new Web Application, "SharePoint - 80", corresponding to the site in IIS&lt;/li&gt;&lt;li&gt;There are no site collections in this Web Application, which is to be expected since I skipped that step in the wizard.&lt;/li&gt;&lt;li&gt;Under Manage Service Applications, my Managed Metadata Service is now listed. &lt;/li&gt;&lt;li&gt;Clicking on the Managed Metadata Service under Manage Service Applications displays the management screen without any errors.&lt;/li&gt;&lt;/ul&gt;In SQL Server&lt;br /&gt;&lt;ul&gt;&lt;li&gt; A new database, named "Managed Metadata Service_{GUID}", with a very unattractive GUID in the name, of course.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;So, there are two possible choices for what caused the magic, and it could be both of them. It's possible I have to create the AppPool myself. I find this unlikely, however, as the screen to provision the Managed Metadata service does prompt me to create the AppPool. I'm going to take SharePoint at its word that it is capable of creating this. The other possibility is that even if there is no existing Site Collection in your Farm, you at least need a Web Application created before you can provision the Managed Metadata service.&lt;br /&gt;&lt;br /&gt;I plan on digging through the code of the Farm Configuration Wizard later to determine which of those steps was key.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-3349018888409109925?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/3349018888409109925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/managed-metadata-service-fails-to-work_08.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3349018888409109925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/3349018888409109925'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/managed-metadata-service-fails-to-work_08.html' title='Managed Metadata Service fails to work and missing AppPool, Round 2'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-6861375132442084883</id><published>2010-04-07T12:38:00.000-04:00</published><updated>2010-04-07T12:38:34.510-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 Installation has Missing server side dependencies errors</title><content type='html'>I've configured SharePoint with a PowerShell script at least 4 times in the last 24 hours from a clean install, and only once has it NOT had the Missing Server side dependency errors. I don't even have any services installed in the Farm yet, so the common fix of "&lt;a href="http://blogs.architectingconnectedsystems.com/blogs/cjg/archive/2009/12/09/Missing-Server-Side-Dependencies-_2D00_-8d6034c4_2D00_a416_2D00_e535_2D00_281a_2D00_6b714894e1aa.aspx"&gt;tricking&lt;/a&gt;" SharePoint by opening one of the Search configuration pages is not doable. Furthermore, the list of web parts that do not have their tp_Assembly populated is quite long. The annoying part is that SharePoint actually does know where the classes live; it just can't seem to populate that column in other tables:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;select nvarchar7 'Web Part', nvarchar8 'Assembly', nvarchar9 'Class' from alluserdata where tp_listid in (select tp_id from alllists where tp_title = 'Web Part Gallery')&lt;/blockquote&gt;I don't know if the configuration of SharePoint is just that flakey, or if it's specifically tied to trying to automate the configuration rather than using the SharePoint 2010 Products Configuration Wizard, but it's very frustrating. Right now the only consistent configuration experience I can get is from creating the databases with Powershell and then running the SharePoint 2010 Products Configuration Wizard to do the rest.&lt;br /&gt;&lt;br /&gt;I've read that this is a bug that may be fixed in the RTM version of SharePoint 2010, but time will tell.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-6861375132442084883?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/6861375132442084883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-installation-has.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/6861375132442084883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/6861375132442084883'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-installation-has.html' title='SharePoint 2010 Installation has Missing server side dependencies errors'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-6054871076723772459</id><published>2010-04-06T16:08:00.002-04:00</published><updated>2010-04-06T16:40:33.995-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>Managed Metadata Service fails to work and missing AppPool</title><content type='html'>Took my first pass at installing the Managed Metadata Service. It of course failed, with a very common error of "The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator."&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_0gM-pvb17tc/S7uTpCVOMzI/AAAAAAAAABE/BXOQ3YXKbtI/s1600/8cropped.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="20" src="http://4.bp.blogspot.com/_0gM-pvb17tc/S7uTpCVOMzI/AAAAAAAAABE/BXOQ3YXKbtI/s400/8cropped.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;First thing I checked was that the service was running by going to Services on Server. It was not, so I started it, which gave no errors. Checked again and still got the error. I decided the Application Pool could be the problem since I selected to create a new one to use during installation of the Managed Metadata Service. Unfortunely, the Application Pool is not in IIS 7. I have no idea why, as if I try to provision another service it shows my Application Pool in the drop down list of available ones.&lt;br /&gt;&lt;br /&gt;At this point the only thing I'm sure of is that I missed installing the WCF patch, &lt;a href="http://support.microsoft.com/kb/976462"&gt;KB976462&lt;/a&gt;. Going to reload from a snapshot and try again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-6054871076723772459?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/6054871076723772459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/managed-metadata-service-fails-to-work.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/6054871076723772459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/6054871076723772459'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/managed-metadata-service-fails-to-work.html' title='Managed Metadata Service fails to work and missing AppPool'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_0gM-pvb17tc/S7uTpCVOMzI/AAAAAAAAABE/BXOQ3YXKbtI/s72-c/8cropped.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-862074521369851945</id><published>2010-04-06T14:34:00.001-04:00</published><updated>2010-04-06T16:40:22.459-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>Document Sets</title><content type='html'>Interesting post from &lt;a href="http://blog.stanliu.com/sharepoint/2010/3/28/sharepoint-2010-document-sets.html"&gt;Stan Liu on Document Sets&lt;/a&gt;. Specifically, I find this idea very interesting, since it is very similar to a concept used in 2007 to have auto-inherited values for columns based on their parent folder.&lt;br /&gt;&lt;blockquote&gt;If you have a few columns that are Managed Metadata type (this is a new column type that looks up taxonomy terms from the new Term Store), you can choose those to be Shared Columns so that all the documents within that Document Set will inherit those same attributes.&amp;nbsp;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-862074521369851945?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/862074521369851945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/document-sets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/862074521369851945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/862074521369851945'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/document-sets.html' title='Document Sets'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-8105165278078467398</id><published>2010-04-06T12:24:00.003-04:00</published><updated>2010-04-06T16:40:06.293-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='PowerShell'/><title type='text'>Installation Account can't run SharePoint PowerShell cmdlets, Round 2</title><content type='html'>&lt;a href="http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-installation-account.html" target="_blank"&gt;Part 1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Okay, explored this a little further since the error about needing to be Farm Administrator to run some cmdlets when you were, in fact, a Farm Administrator was bugging me.&lt;br /&gt;&lt;br /&gt;I created a new account, sp_Farmadmin2. I added him to the Administrators group on my SharePoint server. Logged in as him and tried to run the SharePoint 2010 Management Shell and got my familiar error, "The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered". Note that it would also not work if I right clicked and chose "Run as Administrator".&lt;br /&gt;&lt;br /&gt;I then ran the &lt;span style="font-weight: bold;"&gt;Add-SPShellAdmin&lt;/span&gt;  command and specified sp_Farmadmin2. Switched back to sp_Farmadmin2 and tried to run the SharePoint 2010 Management Shell again. Same error. However, this time when I right clicked and chose "Run as Administrator", it worked.&lt;br /&gt;&lt;br /&gt;Note that sp_Farmadmin2 is NOT a member of the &lt;b style="font-weight: normal;"&gt;WSS_Admin_WPG group in Active Directory. Nor are they a member of the the Farm Administrators group in SharePoint, though as an administrator for the machine, they can get into Central Administration.&lt;/b&gt;&lt;br /&gt;&lt;b style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b style="font-weight: normal;"&gt;It seems there are only three keys to getting the cmdlets to work:&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;b style="font-weight: normal;"&gt;Must be an administrator on the SharePoint server.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b style="font-weight: normal;"&gt;Must be in the &lt;/b&gt;SharePoint_Shell_Access role in the SP_Config database.&lt;/li&gt;&lt;li&gt;Must right-click and chose "Run as Administrator" to start the SharePoint 2010 Management Shell.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-8105165278078467398?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/8105165278078467398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/installation-account-cant-run.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/8105165278078467398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/8105165278078467398'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/installation-account-cant-run.html' title='Installation Account can&apos;t run SharePoint PowerShell cmdlets, Round 2'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-7085233135627918661</id><published>2010-04-06T10:10:00.000-04:00</published><updated>2010-04-06T10:16:16.729-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Claims Based Authentication'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='FBA'/><title type='text'>SharePoint 2010 FBA</title><content type='html'>Apparently FBA in 2010 requires setting up your Web Application to use Claims Based Authentication rather than Classic Mode Authentication.&lt;br /&gt;&lt;br /&gt;I can't help but have flashbacks to the presentation on Claims Based Authentication in the SharePoint Ignite sessions. Even though everyone in that room was an experienced SharePoint implementer/developer, there was a sea of mostly bewildered faces. I'm hoping that was just due to how detailed the presentation was and that the configuration of FBA is going to be much easier than trying to understand all the nuances of the theory of Claims Based Authentication.&lt;br /&gt;&lt;br /&gt;Relevant linkage: &lt;a href="http://blogs.msdn.com/chunliu/archive/2010/03/13/forms-based-authentication-on-a-claim-based-web-app.aspx"&gt;Chun Liu on SharePoint&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-7085233135627918661?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/7085233135627918661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-fba.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/7085233135627918661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/7085233135627918661'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-fba.html' title='SharePoint 2010 FBA'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-820623726408435826</id><published>2010-04-05T11:36:00.000-04:00</published><updated>2010-04-06T11:49:43.821-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Automation'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>Automating SharePoint 2010 Configuration</title><content type='html'>Found a great &lt;a href="http://stsadm.blogspot.com/2009/10/sharepoint-2010-psconfig-and-powershell.html"&gt;blog post&lt;/a&gt; from Gary Lapointe on automating some of the SharePoint 2010 configuration. Gave his script a whirl.&lt;br /&gt;&lt;br /&gt;First pass I mistyped the farm account password and I got a halfway installed Farm. I ended up blowing it away to start again clean.&lt;br /&gt;&lt;br /&gt;Second pass it installed everything with no error messages. Then I logged into the newly created Central Administration site and found the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_0gM-pvb17tc/S7tWISpVQHI/AAAAAAAAAAk/3BD8E7_CJKk/s1600/1cropped.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 163px;" src="http://4.bp.blogspot.com/_0gM-pvb17tc/S7tWISpVQHI/AAAAAAAAAAk/3BD8E7_CJKk/s320/1cropped.png" alt="" id="BLOGGER_PHOTO_ID_5457050073933627506" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I clicked the link and was taken to the SharePoint Health Analyzer Reports screen, which shows a problem with the SPTimerService.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_0gM-pvb17tc/S7tWWsyK-HI/AAAAAAAAAAs/dzRgUXHHVVI/s1600/2cropped.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 70px;" src="http://2.bp.blogspot.com/_0gM-pvb17tc/S7tWWsyK-HI/AAAAAAAAAAs/dzRgUXHHVVI/s320/2cropped.png" alt="" id="BLOGGER_PHOTO_ID_5457050321468192882" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Clicking to see the details showed this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_0gM-pvb17tc/S7tWjeLqCNI/AAAAAAAAAA8/hJ3wP01K6f0/s1600/3cropped.png"&gt;&lt;img style="cursor: pointer; width: 273px; height: 320px;" src="http://1.bp.blogspot.com/_0gM-pvb17tc/S7tWjeLqCNI/AAAAAAAAAA8/hJ3wP01K6f0/s320/3cropped.png" alt="" id="BLOGGER_PHOTO_ID_5457050540886853842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So that's pretty interesting, since the script from Gary had this line in it:&lt;blockquote&gt;Install-SPFeature -AllExistingFeatures&lt;/blockquote&gt;&lt;br /&gt;I'll have to give it another run and also compare the script to what is in &lt;a href="http://autospinstaller.codeplex.com/"&gt;AutoSPInstaller&lt;/a&gt;, the so-called "Franken-script" over on CodePlex.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-820623726408435826?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/820623726408435826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/automating-sharepoint-2010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/820623726408435826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/820623726408435826'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/automating-sharepoint-2010.html' title='Automating SharePoint 2010 Configuration'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_0gM-pvb17tc/S7tWISpVQHI/AAAAAAAAAAk/3BD8E7_CJKk/s72-c/1cropped.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-1384795040214699048</id><published>2010-04-05T10:16:00.001-04:00</published><updated>2010-04-06T12:25:16.770-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='PowerShell'/><title type='text'>SharePoint 2010 Installation Account can't run SharePoint PowerShell cmdlets</title><content type='html'>With SharePoint 2007 it was common practice to use an installation account rather than your personal one to install SharePoint. This was due to some quirks with the way installation worked where users added after the fact, even as Farm Administrators, would get permission errors in places like SSP Admin.&lt;br /&gt;&lt;br /&gt;Well, trying that with SharePoint 2010 has had some interesting side effects. I created a user, sp_Farmadmin, dropped him in the Administrators group for my SharePoint box and then gave him sysadmin in SQL Server. In theory this should be securityadmin and dbcreator, according to &lt;a href="http://technet.microsoft.com/en-us/library/ee662513%28office.14%29.aspx"&gt;Technet&lt;/a&gt;, but surely I didn't give them too little permission to do the job.&lt;br /&gt;&lt;br /&gt;I ran the install as sp_Farmadmin, then ran the SharePoint 2010 Products Configuration Wizard. After it finished I opened Central Administration and all looked good.&lt;br /&gt;&lt;br /&gt;When I tried to open the SharePoint 2010 Management Shell, however, I got the error "The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered".&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_0gM-pvb17tc/S7tF8e8iudI/AAAAAAAAAAM/l5-jT7jzZJs/s1600/1cropped.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5457032278890953170" src="http://1.bp.blogspot.com/_0gM-pvb17tc/S7tF8e8iudI/AAAAAAAAAAM/l5-jT7jzZJs/s320/1cropped.png" style="cursor: pointer; float: left; height: 33px; margin: 0pt 10px 10px 0pt; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I googled a bit and found some hints that it had to do with permissions. I found this gem on &lt;a href="http://technet.microsoft.com/en-us/library/ee806878%28office.14%29.aspx"&gt;Technet&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;A user cannot run Windows PowerShell cmdlets in a farm unless you have used this cmdlet to add the user to the &lt;span style="font-weight: bold;"&gt;SharePoint_Shell_Access&lt;/span&gt; role. When a user has been added to the &lt;span style="font-weight: bold;"&gt;SharePoint_Shell_Access&lt;/span&gt; role and is a member of the &lt;span style="font-weight: bold;"&gt;WSS_Admin_WPG&lt;/span&gt; local group, then the user can run Windows PowerShell in a multiple-server farm environment.&lt;/blockquote&gt;&lt;br /&gt;I went and checked. Yep, sp_Farmadmin was a member of WSS_Admin_WPG. And in SQL Server, the login had a User Mapping to dbo in the SP_Config database. Within that database, dbo owned the SharePoint_Shell_Access role, but wasn't a member.&lt;br /&gt;&lt;br /&gt;Seemed like a slam dunk from there. I logged into the machine again as the domain administrator account (who, as an admin with no specific privileges &lt;span style="font-style: italic;"&gt;can&lt;/span&gt; run the SharePoint 2010 Management Shell successfully). I ran the &lt;span style="font-weight: bold;"&gt;Add-SPShellAdmin&lt;/span&gt;  command and got a nice error "Cannot add domain\sp_Farmadmin to SharePoint_Shell_Access role of the database SP_Config. Possible cause of the error is when the user is the owner of the role."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_0gM-pvb17tc/S7tKw8SRBEI/AAAAAAAAAAU/owU3q2IYwqI/s1600/saerrorcropped.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5457037578166404162" src="http://2.bp.blogspot.com/_0gM-pvb17tc/S7tKw8SRBEI/AAAAAAAAAAU/owU3q2IYwqI/s320/saerrorcropped.png" style="cursor: pointer; height: 107px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So they can't be a member of a role they own. I confirmed it by trying to manually add the user to the role in SQL Server. Definitely can't be done. That's inconvenient. I tried to remove the User Mapping, but you can't do that, either. After playing with it a bit I realized the problem is that the user who created the database is mapped to dbo, and since dbo is a privileged identity, you do not want just anybody to be mapped to dbo.&lt;br /&gt;&lt;br /&gt;As it turns out, the key to fixing this is to just make sure that the SP_Config database is created by the administrator and not by any special accounts you might want to use for administering SharePoint. Since it's preferable to control the naming of the Central Administration content database anyway, you can kill two birds with one stone by using PowerShell to create the config database using the &lt;span style="font-weight: bold;"&gt;New-SPConfigurationDatabase&lt;/span&gt; command. You can then run the SharePoint 2010 Products Configuration Wizard and when prompted to modify server farm settings, make sure you do not disconnect from the server farm.&lt;br /&gt;&lt;br /&gt;Once SharePoint is configured, make sure to use &lt;span style="font-weight: bold;"&gt;Add-SPShellAdmin &lt;/span&gt;to let your users run the SharePoint Powershell cmdlets. This will add them to the SharePoint_Shell_Access role in the SP_Config database. It's supposed to also add them to the &lt;b style="font-weight: normal;"&gt;WSS_Admin_WPG&lt;/b&gt; role as well, but that didn't happen for me so I had to do it manually. Once both of these permissions were in place, the user should then be able to run SharePoint cmdlets. Keep in mind some of the cmdlets require Farm Administrator privileges, although just adding them to the Farm Administrator group is apparently not enough...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_0gM-pvb17tc/S7tUiaEd-KI/AAAAAAAAAAc/8fILAPJq4DI/s1600/sortof.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5457048323579836578" src="http://4.bp.blogspot.com/_0gM-pvb17tc/S7tUiaEd-KI/AAAAAAAAAAc/8fILAPJq4DI/s320/sortof.png" style="cursor: pointer; height: 102px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'll keep digging on that one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-1384795040214699048?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/1384795040214699048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-installation-account.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/1384795040214699048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/1384795040214699048'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-installation-account.html' title='SharePoint 2010 Installation Account can&apos;t run SharePoint PowerShell cmdlets'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_0gM-pvb17tc/S7tF8e8iudI/AAAAAAAAAAM/l5-jT7jzZJs/s72-c/1cropped.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6363288400368237015.post-529534487551552261</id><published>2010-04-02T16:34:00.000-04:00</published><updated>2010-04-06T16:39:28.394-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010 Errors'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><title type='text'>SharePoint 2010 Products Configuration Wizard errors</title><content type='html'>Was trying to install SharePoint 2010 with an installation account, sp_Farmadmin. Got an error message saying that "An error has occurred while validation the configuration settings. The errorData argument cannot be null or zero length."&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_0gM-pvb17tc/S7ubXZumNFI/AAAAAAAAABU/ggd3ApUqLsA/s1600/23.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_0gM-pvb17tc/S7ubXZumNFI/AAAAAAAAABU/ggd3ApUqLsA/s320/23.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I had to dig through the SharePoint logs in the 14-hive to figure this out, but it ended up being that the installation account didn't have permissions in SQL Server to provision the SP_Config database. Gave my user sysadmin permission in the database (should have beeen securityadmin and dbcreator, actually), and tried again and succeeded.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6363288400368237015-529534487551552261?l=sharepointlearningcurve.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointlearningcurve.blogspot.com/feeds/529534487551552261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-products-configuration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/529534487551552261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6363288400368237015/posts/default/529534487551552261'/><link rel='alternate' type='text/html' href='http://sharepointlearningcurve.blogspot.com/2010/04/sharepoint-2010-products-configuration.html' title='SharePoint 2010 Products Configuration Wizard errors'/><author><name>Mike</name><uri>http://www.blogger.com/profile/09866285427297333913</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_0gM-pvb17tc/S7ubXZumNFI/AAAAAAAAABU/ggd3ApUqLsA/s72-c/23.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
