<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Corey Roth - DotNetMafia.com - Tip of the Day</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/default.aspx</link><description>Bringing you the latest time saving tips for SharePoint 2010, MOSS 2007, ASP.NET, LINQ, and Visual Studio 2010</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CoreysDotNetTipOfTheDay" /><feedburner:info uri="coreysdotnettipoftheday" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>How to: Use the Chart Web Part with Excel Services</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/C0WDFziw2T4/how-to-use-the-chart-web-part-with-excel-services.aspx</link><pubDate>Thu, 02 Sep 2010 20:04:35 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3978</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3978</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/09/02/how-to-use-the-chart-web-part-with-excel-services.aspx#comments</comments><description>&lt;p&gt;Hopefully, you were able to impress the boss with my last post on the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/02/24/impress-the-boss-with-the-sharepoint-2010-chart-web-part.aspx"&gt;Chart Web Part&lt;/a&gt;.&amp;#160; I explained how to use the BCS with the Chart Web Part to display great looking charts using external data.&amp;#160; Another option is to use Excel Services.&amp;#160; Excel Services is pretty easy to setup now and you usually don’t have to do much configuration out of the box.&amp;#160; Let’s see what we can do.&amp;#160; This assumes you have Excel Services installed and configured to trust spreadsheets from your SharePoint server.&lt;/p&gt;  &lt;p&gt;First, let’s start with my super awesome spreadsheet.&amp;#160; It&amp;#39;s a simple example, but hopefully you get the idea.&amp;#160; If you have Excel Services working, you should have the View in Browser option when you are looking at a file in a document library.&amp;#160; Viewing Office documents in the browser might even be your default if you have installed Office Web Apps.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ExcelServicesViewInBrowser_4F4E266C.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ExcelServicesViewInBrowser" border="0" alt="ExcelServicesViewInBrowser" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ExcelServicesViewInBrowser_thumb_29E432FE.png" width="455" height="248" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Clicking on that link, shows us the Excel document we are working with.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ExcelServicesView_6222AA16.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ExcelServicesView" border="0" alt="ExcelServicesView" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ExcelServicesView_thumb_419B6A64.png" width="490" height="223" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;SharePoint 2010 has much better support for a wide variety of Excel documents.&amp;#160; For the most part it will render most documents even if they have unsupported features in them.&amp;#160; This &lt;a href="http://blogs.msdn.com/b/excel/archive/2009/11/19/excel-services-in-sharepoint-2010-feature-support.aspx"&gt;post&lt;/a&gt; has some details on what is supported and what is not.&lt;/p&gt;  &lt;p&gt;To use Excel Services with the Chart Web Part, we need the URL to the Excel document.&amp;#160; You can get this in a number of ways.&amp;#160; Just be aware if you try to copy a link from the document library it might give you a link to the xlviewer.aspx which will not work in the Chart Web Part.&amp;#160; Make sure you get a link that references the .xslx file directly from your SharePoint server.&lt;/p&gt;  &lt;p&gt;For example, this link will &lt;em&gt;not&lt;/em&gt; work in the Chart Web Part:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;http://sp2010/ECM/_layouts/xlviewer.aspx?id=/ECM/Company%20Documents/2010%20Budget.xlsx&amp;amp;Source=http%3A%2F%2Fsp2010%2FECM%2FCompany%2520Documents%2FForms%2FAllItems%2Easpx&amp;amp;DefaultItemOpen=1&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;This link will work in the Chart Web Part:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;http://sp2010/ECM/Company%20Documents/2010%20Budget.xlsx&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Once you have the link to your spreadsheet, edit a page and add a Chart Web Part to it.&amp;#160; If you don’t remember how, you can find the details on it on my previous &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/02/24/impress-the-boss-with-the-sharepoint-2010-chart-web-part.aspx"&gt;Chart Web Part&lt;/a&gt; post.&amp;#160; Now, click the &lt;em&gt;Data &amp;amp; Appearance&lt;/em&gt; link and then &lt;em&gt;Connect Chart to Data&lt;/em&gt;.&amp;#160; Now choose Excel Services.&amp;#160; You will then be presented with a screen prompting you for the Excel Web Service URL, Excel Workbook Path, and Range Name.&amp;#160; The Excel Web Service URL should already be filled out for you.&amp;#160; It will look something like this.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;http://sp2010/_vti_bin/excelservice.asmx&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Now you need to provide a path to the workbook.&amp;#160; Use a complete URL like the one I used above.&amp;#160; The last thing you need to provide is the range of the spreadsheet you want to use.&amp;#160; Here you need to know some Excel basics.&amp;#160; You start by specifying the sheet name followed by the first cell using the !, $, and : delimiters.&amp;#160; In my case I want A1 through B5 on Sheet1, it looks like this:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Sheet1!$A$1:$B$5&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;If&amp;#160; the first row of your spreadsheet has column names, check the box.&amp;#160; Here is what it looks like completed.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ChartWebPartExcelServicesConfig2_4BEC8EC4.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ChartWebPartExcelServicesConfig2" border="0" alt="ChartWebPartExcelServicesConfig2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ChartWebPartExcelServicesConfig2_thumb_79017B92.png" width="476" height="146" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Click Next and if Excel Services like your spreadsheet, it should give you a preview of the data.&amp;#160; If it doesn’t like it, it might give you a user friendly error or it might give you a &lt;em&gt;Exception has been thrown by the target of an invocation&lt;/em&gt; error.&amp;#160; If that is the case, there is likely an unsupported feature such as a chart that you need to remove for the spreadsheet to work.&amp;#160; Here is what the preview looks like.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ChartWebPartExcelServicesConfig3_515AFF68.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ChartWebPartExcelServicesConfig3" border="0" alt="ChartWebPartExcelServicesConfig3" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ChartWebPartExcelServicesConfig3_thumb_3EA605B1.png" width="473" height="154" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Click next, and you will choose the Axis and other settings for the chart.&amp;#160; Change any settings you want and then you are done.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ChartWebPartExcelServicesConfig4_7E03B941.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ChartWebPartExcelServicesConfig4" border="0" alt="ChartWebPartExcelServicesConfig4" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ChartWebPartExcelServicesConfig4_thumb_4F3E009F.png" width="462" height="267" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Once you click finish you should be able to see your data using the default chart.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ChartWebPartExcelServicesComplete_0E9BB430.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ChartWebPartExcelServicesComplete" border="0" alt="ChartWebPartExcelServicesComplete" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ChartWebPartExcelServicesComplete_thumb_74C77E00.png" width="335" height="276" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Of course if you want another type of chart, you can click &lt;em&gt;Data &amp;amp; Appearance &lt;/em&gt;and pick another type from the &lt;em&gt;Customize your Chart &lt;/em&gt;link.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ChartWebPartExcelServicesComplete2_62128449.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ChartWebPartExcelServicesComplete2" border="0" alt="ChartWebPartExcelServicesComplete2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ChartWebPartExcelServicesComplete2_thumb_2C99C224.png" width="241" height="244" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;One thing to note is that Excel Services does cache data for a while so if you change data in the spreadsheet, it might take a few minutes for the graph to reflect your changes.&amp;#160; This was a simple example, but as you can see it’s not very complicated to get a nice looking chart up and running quickly.&amp;#160; If you do run into issues, I recommend tearing your spreadsheet apart and look for unsupported features.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3978" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/C0WDFziw2T4" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Excel+Services/default.aspx">Excel Services</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/09/02/how-to-use-the-chart-web-part-with-excel-services.aspx</feedburner:origLink></item><item><title>Querying Multiple Federated Locations in Enterprise Search with the QueryManager class</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/pL89GQ6yECE/querying-multiple-federated-locations-in-enterprise-search-with-the-querymanager-class.aspx</link><pubDate>Wed, 25 Aug 2010 16:54:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3962</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3962</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/25/querying-multiple-federated-locations-in-enterprise-search-with-the-querymanager-class.aspx#comments</comments><description>&lt;p&gt;Last week, I showed you how to use the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/15/how-to-use-the-querymanager-class-to-query-sharepoint-2010-enterprise-search.aspx"&gt;QueryManager&lt;/a&gt; class to query SharePoint Enterprise Search.&amp;nbsp; In that post, I mentioned that we can actually use the QueryManger class to harness the true power of federated search and query multiple locations at once.&amp;nbsp; As you will see today, it’s pretty easy to do, but you might have to do some work with the XML you get back.&amp;nbsp; We’ll start with the code from last week, and then add the search results from the included Bing.com Internet Search Results provider.&amp;nbsp; To add another location, we just add another location to the &lt;em&gt;LocationList &lt;/em&gt;object.&lt;/p&gt;
&lt;div style="FONT-FAMILY:consolas;BACKGROUND:white;COLOR:black;FONT-SIZE:10pt;"&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:#2b91af;"&gt;Location&lt;/span&gt; internetLocation = &lt;span style="COLOR:blue;"&gt;new&lt;/span&gt; &lt;span style="COLOR:#2b91af;"&gt;Location&lt;/span&gt;(&lt;span style="COLOR:#a31515;"&gt;&amp;quot;InternetSearchResults&amp;quot;&lt;/span&gt;, searchProxy);&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;locationList.Add(internetLocation);&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Remember that the name of the Location comes from the Location Name field on the federated location.&amp;nbsp; Refer to the table in the QueryManager post for more information.&amp;nbsp;&amp;nbsp; Using the code from last week, we put all this together and it looks like this:&lt;/p&gt;
&lt;div style="FONT-FAMILY:consolas;BACKGROUND:white;COLOR:black;FONT-SIZE:10pt;"&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:green;"&gt;// get the query and settings service proxy&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:#2b91af;"&gt;SearchQueryAndSiteSettingsServiceProxy&lt;/span&gt; settingsProxy = &lt;span style="COLOR:#2b91af;"&gt;SPFarm&lt;/span&gt;.Local.ServiceProxies.GetValue&amp;lt;&lt;span style="COLOR:#2b91af;"&gt;SearchQueryAndSiteSettingsServiceProxy&lt;/span&gt;&amp;gt;();&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:green;"&gt;// get the search service application proxy by name&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:#2b91af;"&gt;SearchServiceApplicationProxy&lt;/span&gt; searchProxy = settingsProxy.ApplicationProxies.GetValue&amp;lt;&lt;span style="COLOR:#2b91af;"&gt;SearchServiceApplicationProxy&lt;/span&gt;&amp;gt;(&lt;span style="COLOR:#a31515;"&gt;&amp;quot;Search Service Application&amp;quot;&lt;/span&gt;);&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:#2b91af;"&gt;QueryManager&lt;/span&gt; queryManager = &lt;span style="COLOR:blue;"&gt;new&lt;/span&gt; &lt;span style="COLOR:#2b91af;"&gt;QueryManager&lt;/span&gt;();&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:green;"&gt;// add the federated location we want&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:#2b91af;"&gt;LocationList&lt;/span&gt; locationList = &lt;span style="COLOR:blue;"&gt;new&lt;/span&gt; &lt;span style="COLOR:#2b91af;"&gt;LocationList&lt;/span&gt;();&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:#2b91af;"&gt;Location&lt;/span&gt; localSearchLocation = &lt;span style="COLOR:blue;"&gt;new&lt;/span&gt; &lt;span style="COLOR:#2b91af;"&gt;Location&lt;/span&gt;(&lt;span style="COLOR:#a31515;"&gt;&amp;quot;LocalSearchIndex&amp;quot;&lt;/span&gt;, searchProxy);&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;locationList.Add(localSearchLocation);&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:green;"&gt;// add results from bing&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:#2b91af;"&gt;Location&lt;/span&gt; internetLocation = &lt;span style="COLOR:blue;"&gt;new&lt;/span&gt; &lt;span style="COLOR:#2b91af;"&gt;Location&lt;/span&gt;(&lt;span style="COLOR:#a31515;"&gt;&amp;quot;InternetSearchResults&amp;quot;&lt;/span&gt;, searchProxy);&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;locationList.Add(internetLocation);&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;queryManager.UserQuery = &lt;span style="COLOR:#a31515;"&gt;&amp;quot;accounting&amp;quot;&lt;/span&gt;;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;queryManager.Add(locationList);&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;queryManager.IsTriggered(locationList);&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:#2b91af;"&gt;XmlDocument&lt;/span&gt; xmlDocument = queryManager.GetResults(locationList);&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;System.IO.&lt;span style="COLOR:#2b91af;"&gt;File&lt;/span&gt;.WriteAllText(&lt;span style="COLOR:#a31515;"&gt;&amp;quot;results.xml&amp;quot;&lt;/span&gt;, xmlDocument.InnerXml);&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(xmlDocument.InnerXml);&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:#2b91af;"&gt;Console&lt;/span&gt;.ReadLine();&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;As you can see, it’s pretty simple to add another location.&amp;nbsp; What do the search results look like though?&amp;nbsp; Well, the results may not be what you expected.&amp;nbsp; It just appends the second location’s results to the XML document.&amp;nbsp; What is bad is that the schema isn’t the same. Since Bing results are coming in via an OpenSearch provider, it just gives you the raw RSS feed of the results.&amp;nbsp; I won’t post the entire XML document here, but you should get the idea of what I mean.&lt;/p&gt;
&lt;div style="FONT-FAMILY:consolas;BACKGROUND:white;COLOR:black;FONT-SIZE:10pt;"&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;isdocument&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;False&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;isdocument&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;picturethumbnailurl&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;picturethumbnailurl&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;serverredirectedurl&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;serverredirectedurl&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;Result&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;TotalResults&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;24&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;TotalResults&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;NumberOfResults&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;10&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;NumberOfResults&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;channel&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;title&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;Bing: &lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;title&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;link&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;http://www.bing.com:80/search?q=accounting&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;link&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;description&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;Search results&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;description&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;image&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;url&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;http://www.bing.com:80/s/a/rsslogo.gif&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;url&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;title&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;accounting&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;title&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;link&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;http://www.bing.com:80/search?q=accounting&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;link&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;image&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;copyright&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;Copyright © 2010 Microsoft. All rights reserved. These XML results may not be used, reproduced or transmitted in any manner or for any purpose other than rendering Bing results within an RSS aggregator for your personal, non-commercial use. Any other use of these results requires express written permission from Microsoft Corporation. By accessing this web page or using these results in any manner whatsoever, you agree to be bound by the foregoing restrictions.&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;copyright&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;item&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;title&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;Accountancy - Wikipedia, the free encyclopedia&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;title&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;link&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;http://en.wikipedia.org/wiki/Accounting&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;link&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;description&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;Accountancy is the art of communicating financial information about a business entity to users such as shareholders and managers. [1] The communication is generally in the ...&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;description&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;pubDate&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;Tue, 24 Aug 2010 08:47:00 GMT&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;pubDate&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN:0px;"&gt;&lt;span style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;item&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;This may not be ideal, but if you need the data, you can get it.&amp;nbsp; You may just have to work with the XML a bit.&amp;nbsp; Luckily LINQ to XML makes that pretty easy.&amp;nbsp; What about if you add a third location?&amp;nbsp; Well it just appends it right onto the end.&amp;nbsp; I added another SharePoint location and it simple adding &lt;em&gt;Result &lt;/em&gt;elements right onto the document.&amp;nbsp; What I don’t like about it is that there is nothing in the &lt;em&gt;Result &lt;/em&gt;element that tells you what location it came from.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;You know reading that copyright message on the Bing results makes me wonder.&amp;nbsp; It specifically says that the results can only be used with an RSS aggregator for personal, non-commercial use.&amp;nbsp; I would venture to say most uses of SharePoint are commercial.&amp;nbsp; Does this mean we are not supposed to use Bing results there?&amp;nbsp; Perhaps that is a question for the forums.&lt;/p&gt;
&lt;p&gt;Even if you have to work with the XML a bit to get the results you need, I think this is very powerful.&amp;nbsp; It’s nice that you can get results from more than one location so easily.&amp;nbsp; I’ve attached an XML file to this post with the complete result set from three locations if you want to examine it further.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3962" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/pL89GQ6yECE" height="1" width="1"/&gt;</description><enclosure url="http://www.dotnetmafia.com/blogs/dotnettipoftheday/attachment/3962.ashx" length="32638" type="text/xml" /><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/25/querying-multiple-federated-locations-in-enterprise-search-with-the-querymanager-class.aspx</feedburner:origLink></item><item><title>Adding a link to a document’s folder in SharePoint 2010 Enterprise Search</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/GowTCdZHDUw/adding-a-link-to-a-document-s-folder-in-sharepoint-2010-enterprise-search.aspx</link><pubDate>Mon, 23 Aug 2010 16:19:44 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3954</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3954</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/23/adding-a-link-to-a-document-s-folder-in-sharepoint-2010-enterprise-search.aspx#comments</comments><description>&lt;p&gt;One request I have seen a lot from people since MOSS 2007 is the desire to add a link to the subfolder of a document on the search results page.&amp;#160; This is useful when the user wants to see what else is in that folder or if they want to perform other operations on that document (such as viewing properties or compliance details).&amp;#160; In SharePoint 2007, I wrote the &lt;a href="http://mosssearchlinks.codeplex.com/"&gt;Document Link Handler&lt;/a&gt; to help with this.&amp;#160; It simply looked up the details on the item and redirected the user to the appropriate page.&amp;#160; In SharePoint 2010, this is not necessary any more since they added the new &lt;em&gt;sitename&lt;/em&gt; column in the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/15/how-to-use-the-querymanager-class-to-query-sharepoint-2010-enterprise-search.aspx"&gt;search results XML document&lt;/a&gt;.&amp;#160; Today we will customize the look of the search results page.&amp;#160; All we have to do is use the new &lt;em&gt;sitename &lt;/em&gt;column in the XSL that displays the results.&lt;/p&gt;  &lt;p&gt;There are two ways to go about this.&amp;#160; If you only want this new link to show up on certain results pages, you can edit the CoreResultsWebPart in a given search center.&amp;#160; If you want the link to be global and to appear on all search centers, you can edit the &lt;em&gt;Local Search Results&lt;/em&gt; federated location.&amp;#160; Today we’ll demonstrate modifying the federated location, but if you want to just change a specific page, edit it, and then edit the Core Results Web Part.&amp;#160; You will then click the XSL editor button and make the same changes as we are about to do in the federated location.&amp;#160; &lt;/p&gt;  &lt;p&gt;To edit the federated location go to your Search Service Application –&amp;gt; Federated Locations, then edit &lt;em&gt;Local Search Results&lt;/em&gt;.&amp;#160; Expand the Display Information and scroll down to the &lt;em&gt;Core Search Results Display Metadata &lt;/em&gt;section.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchFolderLinkFederatedLocation_1C17271E.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="EnterpriseSearchFolderLinkFederatedLocation" border="0" alt="EnterpriseSearchFolderLinkFederatedLocation" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchFolderLinkFederatedLocation_thumb_7AB78181.png" width="647" height="216" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Ensure &lt;em&gt;Use Default Formatting&lt;/em&gt; is not checked and click the button next to the XSL textbox.&amp;#160; I found that the best place to add the link is near the location where the &lt;em&gt;View in Browser&lt;/em&gt; link normally appears.&amp;#160; The place in the file is more than half way down.&amp;#160; If you see the &lt;em&gt;ViewInBrowser &lt;/em&gt;link you know you are near the right spot.&amp;#160; Here is what it looks like.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchFolderLinkXSL1_570ABF57.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchFolderLinkXSL1" border="0" alt="EnterpriseSearchFolderLinkXSL1" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchFolderLinkXSL1_thumb_47F3E07D.png" width="379" height="382" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, what do we add there?&amp;#160; It’s pretty simple.&amp;#160; We use XSL to create a link and pass the value of the &lt;em&gt;sitename &lt;/em&gt;element.&amp;#160; However, I recommend that you only show the link for documents.&amp;#160; The &lt;em&gt;sitename &lt;/em&gt;element is always populated but you might find that it has less relevance on things like non-SharePoint sites or for list items.&amp;#160; It’s up to you if you want to include it or not though.&amp;#160; Here is the code that you will want to add.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#2b91af;"&gt;xsl:if&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;test&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;isdocument = &amp;#39;True&amp;#39;&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;a&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#2b91af;"&gt;xsl:attribute&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;href&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#2b91af;"&gt;xsl:value-of&lt;/span&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;select&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;sitename&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color:#2b91af;"&gt;xsl:attribute&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; View Folder&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;a&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#2b91af;"&gt;xsl:if&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;One thing to note is that in SharePoint 2007, you used to compare &lt;em&gt;isdocument&lt;/em&gt; to a value of 1.&amp;#160; That doesn’t work anymore.&amp;#160; You have to compare it to &lt;em&gt;True&lt;/em&gt; or &lt;em&gt;False&lt;/em&gt;.&amp;#160; That’s really all you have to do.&amp;#160; Here is what it looks like together.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchFolderLinkXSL2_192E27DB.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchFolderLinkXSL2" border="0" alt="EnterpriseSearchFolderLinkXSL2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchFolderLinkXSL2_thumb_38049BB9.png" width="373" height="381" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Once you have the change complete, click OK and then save your changes to the federated location.&amp;#160; It usually takes about a minute for your changes to show up when you do search.&amp;#160; So wait a bit and then go to your search center and give it a try.&amp;#160; Here is what the link looks like on my results screen.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchFolderLinkResults_59945F1A.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="EnterpriseSearchFolderLinkResults" border="0" alt="EnterpriseSearchFolderLinkResults" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchFolderLinkResults_thumb_584FC63B.png" width="758" height="428" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If the link doesn’t show up for you, try another search term.&amp;#160; If you still have issues, try removing the isocument xsl:test element and see if the link shows up then.&amp;#160; This link is pretty easy to add, so give it a try today.&amp;#160; I think the link to the document’s folder is really handy and I think your users will appreciate it.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3954" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/GowTCdZHDUw" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/23/adding-a-link-to-a-document-s-folder-in-sharepoint-2010-enterprise-search.aspx</feedburner:origLink></item><item><title>How to: Use the QueryManager class to query SharePoint 2010 Enterprise Search</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/_Wf336TJbKQ/how-to-use-the-querymanager-class-to-query-sharepoint-2010-enterprise-search.aspx</link><pubDate>Mon, 16 Aug 2010 02:46:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3931</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3931</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/15/how-to-use-the-querymanager-class-to-query-sharepoint-2010-enterprise-search.aspx#comments</comments><description>&lt;p&gt;Last week, I talked about the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/12/how-to-use-the-sharepoint-2010-enterprise-search-keywordquery-class.aspx"&gt;KeywordQuery&lt;/a&gt; class and how to use it in SharePoint 2010.&amp;#160; I mentioned that a new way to query also existed using the QueryManager class.&amp;#160; This class is extremely powerful and can allow us to issue federated queries to multiple locations at one time.&amp;#160; For example, you could make one call and get results back simultaneously from Enterprise Search, FAST, and an OpenSearch provider like Bing.&amp;#160; You can still use the KeywordQuery class but I think the best practice is likely to be the QueryManager class because of the added flexibility.&amp;#160; Another thing I like about the QueryManager class is that the results are returned as XML instead of a ResutlsTableCollection.&amp;#160; Now, in reality if you are just querying one source such as Local Search Results, QueryManager might add a little overhead since it turns around and calls the KeywordQuery class, but I think the the benefits that QueryManager brings are worth it.&lt;/p&gt;  &lt;p&gt;Before we begin, let’s take a look at our Federated Locations in the Search Service Application.&amp;#160; In a typical out-of-the-box SharePoint 2010 install, you will have five Federated Locations.&amp;#160; We can query any of these locations using the QueryManager class.&amp;#160; However, we have to know the proper name to pass to the QueryManager to specify the location.&amp;#160; We’ll talk about that here in a bit.&amp;#160; Here is what your federated locations might look like.&amp;#160; In my case, I have an extra federated location that I created myself that queries search on DotNetMafia.com.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/FederatedLocationsList_049A4336.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="FederatedLocationsList" border="0" alt="FederatedLocationsList" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/FederatedLocationsList_thumb_78985301.png" width="648" height="165" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;For our first example, we will just issue a simple query against the Local Search Results location.&amp;#160; Our first couple of lines are just like the ones we used with the KeywordQuery claass.&amp;#160; We need a reference to the Search Service Application.&amp;#160; In my case, I have named my application &lt;em&gt;Search Service Application&lt;/em&gt;.&amp;#160; Change the name of the string to match the name of your service application.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// get the query and settings service proxy&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SearchQueryAndSiteSettingsServiceProxy&lt;/span&gt; settingsProxy = &lt;span style="color:#2b91af;"&gt;SPFarm&lt;/span&gt;.Local.ServiceProxies.GetValue&amp;lt;&lt;span style="color:#2b91af;"&gt;SearchQueryAndSiteSettingsServiceProxy&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// get the search service application proxy by name&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SearchServiceApplicationProxy&lt;/span&gt; searchProxy = settingsProxy.ApplicationProxies.GetValue&amp;lt;&lt;span style="color:#2b91af;"&gt;SearchServiceApplicationProxy&lt;/span&gt;&amp;gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Search Service Application&amp;quot;&lt;/span&gt;);&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;We now need to create an instance of the &lt;em&gt;QueryManager&lt;/em&gt; object as well as an object to keep track of the locations we are searching (&lt;em&gt;LocationList&lt;/em&gt;).&amp;#160; The &lt;em&gt;QueryManager &lt;/em&gt;is kind of an interesting object because it really is just a &lt;em&gt;LocationList&lt;/em&gt; with a few extra properties.&amp;#160; There are very few settings you can specify on it other than the query.&amp;#160;&amp;#160; Both of these just use default constructors, we pass in the proxy once we start creating new Location objects.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;QueryManager&lt;/span&gt; queryManager = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;QueryManager&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;LocationList&lt;/span&gt; locationList = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;LocationList&lt;/span&gt;();&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Now, we want to create an instance of a &lt;em&gt;Location&lt;/em&gt; object which takes the internal name of the location of the federated location as well as our &lt;em&gt;SearchServiceApplicationProxy&lt;/em&gt;.&amp;#160; The example in the &lt;a href="http://msdn.microsoft.com/en-us/library/ee558338.aspx"&gt;SDK&lt;/a&gt; had a heap of code, that loops through all of the locations on the server.&amp;#160; I found that it was kind of overkill and can simply be replaced with a single line of code to create the Location object.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;Location&lt;/span&gt; localSearchLocation = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Location&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;LocalSearchIndex&amp;quot;&lt;/span&gt;, searchProxy);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;As you can see here, I specified &lt;em&gt;LocalSearchIndex&lt;/em&gt; for the name of my Location.&amp;#160; You might be wondering where I got that value.&amp;#160; This is the internal name of the federated location (not to be confused with the display name).&amp;#160; You can get this value by looking at the details of the location.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/FederatedLocationLocalSearchIndex_17DAF9D5.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="FederatedLocationLocalSearchIndex" border="0" alt="FederatedLocationLocalSearchIndex" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/FederatedLocationLocalSearchIndex_thumb_501970ED.png" width="704" height="214" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Here is a table with the internal names of all of the out-of-the-box federated locations for future reference.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;strong&gt;Display Name&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Internal Name&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Internet Search Results&lt;/td&gt;        &lt;td&gt;InternetSearchResults&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Internet Search Suggestions&lt;/td&gt;        &lt;td&gt;InternetSearchSuggestions&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Local Search Results&lt;/td&gt;        &lt;td&gt;LocalSearchIndex&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Local People Search Results&lt;/td&gt;        &lt;td&gt;LocalPeopleSearchIndex&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Local FAST Search Results&lt;/td&gt;        &lt;td&gt;FASTSearch&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;As you can see there is not a lot of consistency between the internal names so I thought this table would be useful.&amp;#160; Remember, we can query FAST using the same API as we do Enterprise Search.&amp;#160; We just specify FASTSearch as the location.&amp;#160; We’ll talk about that more in a future post as well.&amp;#160; Now, we need to add the location to the LocationList.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;locationList.Add(localSearchLocation);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Once we have a location set, we can actually specify our query.&amp;#160; We’ll stick with my usual example of querying for &lt;em&gt;accounting&lt;/em&gt; documents.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;queryManager.UserQuery = &lt;span style="color:#a31515;"&gt;&amp;quot;accounting&amp;quot;&lt;/span&gt;;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Now we just need to add our LocationList to our QueryManager and we’re ready to query.&amp;#160; We also have to pass it to the IsTriggered method as well.&amp;#160; I’m not fully sure of the reason behind this, but I think if you don’t set it, the location will be added but not executed.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;queryManager.Add(locationList);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;queryManager.IsTriggered(locationList); &lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Now we execute the query using the &lt;em&gt;GetResults &lt;/em&gt;method.&amp;#160; It returns an XmlDocument class.&amp;#160; I am kind of surprised this isn’t an XDocument, but I guess it’s easy enough to get from one to the other.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;XmlDocument&lt;/span&gt; xmlDocument = queryManager.GetResults(locationList);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;If you have everything configured successfully, you should get some XML with results.&amp;#160; Let’s take a look at what one of the results looks like.&amp;#160; I make use of the File object’s &lt;em&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2004/12/09/file-readall-and-file-writeall.aspx"&gt;WriteAll&lt;/a&gt;&lt;/em&gt; method to quickly dump the results into an XML file so I can look at it.&amp;#160; That was one of my first blog posts there more than five years ago. :-)&amp;#160; This way I can open it with Visual Studio and use the Format Document (Ctrl+K, Ctrl+D) command to make it readable.&amp;#160; Here is what one of the results looks like.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Result&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;2&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;workid&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;125&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;workid&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;rank&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;76221694&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;rank&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;title&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;Accounting Procedures 2009&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;title&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;author_multival&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;Craig Johnson&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;author_multival&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;author_multival&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;Windows User&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;author_multival&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;author&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;Craig Johnson;Windows User&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;author&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;size&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;22341&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;size&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;url&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;http://sp2010/ECM/Company Documents/Accounting Procedures 2009.docx&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;url&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;urlEncoded&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;http%3A%2F%2Fsp2010%2FECM%2FCompany%20Documents%2FAccounting%20Procedures%202009%2Edocx&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;urlEncoded&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;description&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;description&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;write&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;7/20/2010&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;write&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sitename&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;http://sp2010/ECM/Company Documents&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sitename&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;collapsingstatus&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;0&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;collapsingstatus&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;hithighlightedsummary&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; This document details all &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;c0&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;accounting&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;c0&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt; policies and procedures for fiscal year 2009.&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;hithighlightedsummary&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;hithighlightedproperties&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;HHTitle&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;c0&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;Accounting&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;c0&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt; Procedures 2009&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;HHTitle&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;HHUrl&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; http://sp2010/ECM/Company Documents/&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;c0&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;Accounting&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;c0&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt; Procedures 2009.docx&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;HHUrl&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;hithighlightedproperties&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;contentclass&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;STS_ListItem_DocumentLibrary&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;contentclass&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;isdocument&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;True&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;isdocument&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;picturethumbnailurl&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;picturethumbnailurl&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;serverredirectedurl&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;http://sp2010/ECM/_layouts/WordViewer.aspx?id=/ECM/Company%20Documents/Accounting%20Procedures%202009.docx&lt;span style="color:red;"&gt;&amp;amp;amp;&lt;/span&gt;DefaultItemOpen=1&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;serverredirectedurl&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Result&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;This is all of the data you get back without specifying any custom managed properties.&amp;#160; If you are familiar with querying Enterprise Search from MOSS 2007, you will know that there is a lot more data returned.&amp;#160; I’ll point out some of the interesting elements.&amp;#160; When a document has multiple authors, we see them all in &lt;em&gt;author&lt;/em&gt; element delimited by a semicolor (;).&amp;#160; Each author is also available separately in the &lt;em&gt;author_multival &lt;/em&gt;element.&amp;#160; Of course, we have the usual things such as a URL, the size, modification date (&lt;em&gt;write&lt;/em&gt;), whether it is a document or not, and it’s content class.&amp;#160; The &lt;em&gt;sitename &lt;/em&gt;element is particularly interesting.&amp;#160; It actually gives us the folder that the file exists in.&amp;#160; You don’t know how much I wanted that feature in MOSS 2007.&amp;#160; That is why I wrote the &lt;a href="http://mosssearchlinks.codeplex.com/"&gt;document link handler&lt;/a&gt; to help get the folder name of documents.&amp;#160; If you use Excel Services or Office Web Apps, the &lt;em&gt;serverredirectedurl&lt;/em&gt; will provide the path to open the document using Office Web Apps.&lt;/p&gt;  &lt;p&gt;I would be a bad blogger if I didn’t tell you how to specify your own managed properties.&amp;#160; Unfortunately, this works exactly like it did in SharePoint 2007.&amp;#160; If you specify one managed property, you lose all of the defaults.&amp;#160; You’ll see what I mean here in a minute.&amp;#160; You specify your managed properties on the &lt;em&gt;Location &lt;/em&gt;object using the &lt;em&gt;RequestedProperties&lt;/em&gt; StringCollection.&amp;#160; Just set the property on the Location before adding it to the LocationList.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;localSearchLocation.RequestedProperties = &lt;span style="color:blue;"&gt;new&lt;/span&gt; System.Collections.Specialized.&lt;span style="color:#2b91af;"&gt;StringCollection&lt;/span&gt;() { &lt;span style="color:#a31515;"&gt;&amp;quot;DocumentType&amp;quot;&lt;/span&gt; };&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Since I didn’t specify any other managed properties, the only thing I get back is the Id and the DocumentType managed properties.&amp;#160; See below.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Result&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;2&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;documenttype&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;Accounting&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;documenttype&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Result&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&amp;#160;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Not very useful.&amp;#160; So instead, you have to pass the values of all of the fields you want.&amp;#160; I have found that most of the elements you see in the first XML document, you can pass to the &lt;em&gt;RequestedProperties&lt;/em&gt; parameter but not all of them.&amp;#160; For example, to get the value of the URL, you actually specify the manager property path, and it gives you both &lt;em&gt;url &lt;/em&gt;and &lt;em&gt;urlEncoded&lt;/em&gt;.&amp;#160; Here is what the line might look to get all of your managed properties and the new one.&amp;#160; &lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;localSearchLocation.RequestedProperties = &lt;span style="color:blue;"&gt;new&lt;/span&gt; System.Collections.Specialized.&lt;span style="color:#2b91af;"&gt;StringCollection&lt;/span&gt;()&lt;/p&gt;    &lt;p style="margin:0px;"&gt;{ &lt;span style="color:#a31515;"&gt;&amp;quot;workid&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;rank&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;title&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;author&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;size&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;write&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;path&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;sitename&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;description&amp;quot;&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#a31515;"&gt;&amp;quot;CollapsingStatus&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;HitHighlightedSummary&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;HitHighlightedProperties&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;ContentClass&amp;quot;&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#a31515;"&gt;&amp;quot;IsDocument&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;PictureThumbnailURL&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;PopularSocialTags&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;PictureWidth&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;PictureHeight&amp;quot;&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#a31515;"&gt;&amp;quot;DatePictureTaken&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;ServerRedirectedURL&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;DocumentType&amp;quot;&lt;/span&gt; };&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;How did I know all of those properties?&amp;#160; Well the URL thing I remember from working with the KeywordQuery class in the past.&amp;#160; The rest, I just got from the CoreResutlsWebPart.&amp;#160; You can also look at the Local Search Results federated location.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/FederatedLocationLocalSearchIndexManagedProperties_1D496A79.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="FederatedLocationLocalSearchIndexManagedProperties" border="0" alt="FederatedLocationLocalSearchIndexManagedProperties" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/FederatedLocationLocalSearchIndexManagedProperties_thumb_006045A4.png" width="697" height="235" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I was planning on showing the code to do multiple locations too, but this post is already getting long, so I think I will include it in the next post.&amp;#160; It’s cool enough to deserve its own post. :-)&amp;#160; I will show you two other properties that are important to know about.&amp;#160; These properties allow us to do paging.&amp;#160; On the &lt;em&gt;Location&lt;/em&gt; object we can set the &lt;em&gt;ItemsPerPage &lt;/em&gt;and &lt;em&gt;StartItem&lt;/em&gt; property to set the number of items per page and what item to start on.&amp;#160; For example, to start on item #21 and show 20 items, we would add the following before the Location is added to the LocationList.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;localSearchLocation.ItemsPerPage = 20;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;localSearchLocation.StartItem = 21;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;When you get results back, the XML contains the total number of results as well as the number of results returned.&amp;#160; In my case I only had two results in my set since there were only 22 items in the entire set.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TotalResults&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;22&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TotalResults&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;NumberOfResults&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;2&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;NumberOfResults&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;All_Results&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;I assume these number are estimates in Enterprise Search, but I could be wrong.&amp;#160; I need to test more.&amp;#160; If you know for sure, please leave a comment.&amp;#160; &lt;/p&gt;  &lt;p&gt;One more thing I will mention is that exceptions are returned by the Location object.&amp;#160; So if you don’t get results back, check Location.Exception to see what the details are.&amp;#160; It won’t actually throw an exception.&amp;#160; It will just return null.&lt;/p&gt;  &lt;p&gt;I know some people (including myself) like to see all of the code together, so here it is.&amp;#160; This is the complete example with our DocumentType managed property included with paging.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// get the query and settings service proxy&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SearchQueryAndSiteSettingsServiceProxy&lt;/span&gt; settingsProxy = &lt;span style="color:#2b91af;"&gt;SPFarm&lt;/span&gt;.Local.ServiceProxies.GetValue&amp;lt;&lt;span style="color:#2b91af;"&gt;SearchQueryAndSiteSettingsServiceProxy&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// get the search service application proxy by name&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SearchServiceApplicationProxy&lt;/span&gt; searchProxy = settingsProxy.ApplicationProxies.GetValue&amp;lt;&lt;span style="color:#2b91af;"&gt;SearchServiceApplicationProxy&lt;/span&gt;&amp;gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Search Service Application&amp;quot;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// create QueryManager and LocationList objects&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;QueryManager&lt;/span&gt; queryManager = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;QueryManager&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;LocationList&lt;/span&gt; locationList = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;LocationList&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// add the federated location we want&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;Location&lt;/span&gt; localSearchLocation = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Location&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;LocalSearchIndex&amp;quot;&lt;/span&gt;, searchProxy);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// set the start page and page size&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;localSearchLocation.ItemsPerPage = 20;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;localSearchLocation.StartItem = 21;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// add our managed properties&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;localSearchLocation.RequestedProperties = &lt;span style="color:blue;"&gt;new&lt;/span&gt; System.Collections.Specialized.&lt;span style="color:#2b91af;"&gt;StringCollection&lt;/span&gt;()&lt;/p&gt;    &lt;p style="margin:0px;"&gt;{ &lt;span style="color:#a31515;"&gt;&amp;quot;workid&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;rank&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;title&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;author&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;size&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;write&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;path&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;sitename&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;description&amp;quot;&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#a31515;"&gt;&amp;quot;CollapsingStatus&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;HitHighlightedSummary&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;HitHighlightedProperties&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;ContentClass&amp;quot;&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#a31515;"&gt;&amp;quot;IsDocument&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;PictureThumbnailURL&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;PopularSocialTags&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;PictureWidth&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;PictureHeight&amp;quot;&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#a31515;"&gt;&amp;quot;DatePictureTaken&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;ServerRedirectedURL&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;DocumentType&amp;quot;&lt;/span&gt; };&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// add the Location to the LocationList&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;locationList.Add(localSearchLocation);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// set the query&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;queryManager.UserQuery = &lt;span style="color:#a31515;"&gt;&amp;quot;accounting&amp;quot;&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;queryManager.Add(locationList);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;queryManager.IsTriggered(locationList);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// make the call to search&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;XmlDocument&lt;/span&gt; xmlDocument = queryManager.GetResults(locationList);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// write out the results&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;System.IO.&lt;span style="color:#2b91af;"&gt;File&lt;/span&gt;.WriteAllText(&lt;span style="color:#a31515;"&gt;&amp;quot;results.xml&amp;quot;&lt;/span&gt;, xmlDocument.InnerXml);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(xmlDocument.InnerXml);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.ReadLine();&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;The QueryManager class is very powerful for interacting with Enterprise Search.&amp;#160; I hope you found this post useful.&amp;#160; In my next post, we’ll query multiple locations at a time.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3931" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/_Wf336TJbKQ" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/FAST+Search/default.aspx">FAST Search</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/15/how-to-use-the-querymanager-class-to-query-sharepoint-2010-enterprise-search.aspx</feedburner:origLink></item><item><title>How to: Use the SharePoint 2010 Enterprise Search KeywordQuery Class</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/HSPwKolWyOA/how-to-use-the-sharepoint-2010-enterprise-search-keywordquery-class.aspx</link><pubDate>Thu, 12 Aug 2010 21:49:10 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3925</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3925</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/12/how-to-use-the-sharepoint-2010-enterprise-search-keywordquery-class.aspx#comments</comments><description>&lt;p&gt;By now, I’m sure you know that there have been a ton of changes and improvements in SharePoint 2010 Enterprise Search.&amp;#160; The underlying architecture of Enterprise Search has been ripped out of the old SSP model and is now based on Service Applications.&amp;#160; Although, Microsoft abstracted a lot of this away for us so that our old code still works, it’s worth noting and being aware of the changes.&amp;#160; When it came to querying search programmatically in SharePoint 2007, we had a choice of using the API, &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/07/17/how-to-query-search-using-the-web-service.aspx"&gt;Web Services&lt;/a&gt;, or using the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/06/23/exposing-enterprise-search-results-using-rss.aspx"&gt;RSS&lt;/a&gt; feed.&amp;#160; When using the search API, we typically used the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/02/19/how-to-use-the-moss-enterprise-search-keywordquery-class.aspx"&gt;KeywordQuery&lt;/a&gt; or &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/03/06/how-to-use-the-moss-enterprise-search-fulltextsqlquery-class.aspx"&gt;FullTextSqlQuery&lt;/a&gt; classes.&amp;#160; To this day, those two posts are still in the top 20 on DotNetMafia.com.&amp;#160; This tells me that people must be pretty interested in querying search using their own code.&lt;/p&gt;  &lt;p&gt;Today I am going to talk about the KeywordQuery class in SharePoint 2010.&amp;#160; Your code from 2007 will still probably work, but I thought I would tell you about some of the changes.&amp;#160; This also sets the ground for a series of future posts that are coming about querying Enterprise Search.&amp;#160; We’ll talk about the federated query model using the QueryManager class as well as how to use FQL to do advanced queries in FAST.&amp;#160; Today though, we’ll stick to the KeywordQuery class.&lt;/p&gt;  &lt;p&gt;In SharePoint 2007, we often got a reference to the KeywordQuery class by passing the URL of a site collection to the constructor.&amp;#160; We can still do that, however, I think the new best practice will be to pass a reference to the &lt;em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.server.search.administration.searchserviceapplicationproxy.aspx"&gt;SearchServiceApplicationProxy&lt;/a&gt;&lt;/em&gt;.&amp;#160; The trick of course is getting that reference.&amp;#160; First, you need to determine the name of your Search Service Application.&amp;#160; For a typical Enterprise Search installation it is called &lt;em&gt;Search Service Application&lt;/em&gt;.&amp;#160; However, it can be called anything depending on how you configured SharePoint.&amp;#160; For FAST, it might be called something like &lt;em&gt;FAST Content SSA&lt;/em&gt;.&amp;#160; Go to Central Administration –&amp;gt; Service Applications and take a look.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchServiceApplicationAndProxy_1C5D285A.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="SearchServiceApplicationAndProxy" border="0" alt="SearchServiceApplicationAndProxy" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchServiceApplicationAndProxy_thumb_1B84C270.png" width="767" height="45" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The proxy will usually have the same name as the Service Application, so in my case here the name of my proxy is &lt;em&gt;Search Service Application&lt;/em&gt;.&amp;#160; Now we just can’t get a reference to the SearchServiceApplicationProxy directly.&amp;#160; We have to go through the &lt;em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.server.search.administration.searchqueryandsitesettingsserviceproxy.aspx"&gt;SearchQueryAndSiteSettingsServiceProxy&lt;/a&gt;&lt;/em&gt; class first.&amp;#160; According to the SDK, the function of going through this service is to ensure queries are load balanced.&amp;#160; Here is how you get a reference to the query and settings proxy.&amp;#160; It also assumes this code is executing on one of the servers in the farm.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SearchQueryAndSiteSettingsServiceProxy&lt;/span&gt; settingsProxy = &lt;span style="color:#2b91af;"&gt;SPFarm&lt;/span&gt;.Local.ServiceProxies.GetValue&amp;lt;&lt;span style="color:#2b91af;"&gt;SearchQueryAndSiteSettingsServiceProxy&lt;/span&gt;&amp;gt;();&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Now that we have a reference to the settings proxy, we can get a reference to the &lt;em&gt;SearchServiceApplicationProxy &lt;/em&gt;with the name of the proxy that we saw above.&amp;#160; Change the name to match whatever yours is called.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;SearchServiceApplicationProxy&lt;/span&gt; searchProxy = settingsProxy.ApplicationProxies.GetValue&amp;lt;&lt;span style="color:#2b91af;"&gt;SearchServiceApplicationProxy&lt;/span&gt;&amp;gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Search Service Application&amp;quot;&lt;/span&gt;);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;Now you can pass this proxy to the constructor of the KeywordQuery.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;KeywordQuery&lt;/span&gt; keywordQuery = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;KeywordQuery&lt;/span&gt;(searchProxy);&lt;/p&gt; &lt;/div&gt;   &lt;p&gt;The rest is pretty much the same.&amp;#160; There is one new parameter that you may want to consider setting when you have multiple search providers (i.e.: FAST for documents and SharePoint Enterprise Search for People).&amp;#160; This parameter is &lt;em&gt;ResultsProvider&lt;/em&gt;.&amp;#160; It’s an enum with a value of &lt;em&gt;Default&lt;/em&gt;, &lt;em&gt;FASTSearch&lt;/em&gt;, and &lt;em&gt;SharePointSearch&lt;/em&gt;.&amp;#160; However, I believe you can use this to switch between FAST and SharePoint Search when you don’t specify the SearchServiceApplicationProxy (i.e.: you used the site collection URL).&amp;#160; So for example when you had FAST installed, if you wanted to query People, you might set it to &lt;em&gt;SharePointSearch.&amp;#160; &lt;/em&gt;The examples I have seen so far leave this to default. &lt;em&gt;&amp;#160; &lt;/em&gt;Here is what the rest looks like.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;     &lt;p style="margin:0px;"&gt;keywordQuery.QueryText = &lt;span style="color:#a31515;"&gt;&amp;quot;accounting&amp;quot;&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin:0px;"&gt;keywordQuery.ResultsProvider = &lt;span style="color:#2b91af;"&gt;SearchProvider&lt;/span&gt;.Default;&lt;/p&gt;      &lt;p style="margin:0px;"&gt;keywordQuery.ResultTypes = &lt;span style="color:#2b91af;"&gt;ResultType&lt;/span&gt;.RelevantResults;&lt;/p&gt;      &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;ResultTableCollection&lt;/span&gt; resultsTableCollection = keywordQuery.Execute();&lt;/p&gt;      &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;      &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;ResultTable&lt;/span&gt; searchResultsTable = resultsTableCollection[&lt;span style="color:#2b91af;"&gt;ResultType&lt;/span&gt;.RelevantResults];&lt;/p&gt;      &lt;p style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;DataTable&lt;/span&gt; resultsDataTable = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;DataTable&lt;/span&gt;();&lt;/p&gt;      &lt;p style="margin:0px;"&gt;resultsDataTable.TableName = &lt;span style="color:#a31515;"&gt;&amp;quot;Results&amp;quot;&lt;/span&gt;;&lt;/p&gt;      &lt;p style="margin:0px;"&gt;resultsDataTable.Load(searchResultsTable, &lt;span style="color:#2b91af;"&gt;LoadOption&lt;/span&gt;.OverwriteChanges);&lt;/p&gt;   &lt;/div&gt; &lt;/div&gt;   &lt;p&gt;I can then use the data visualizer to see my results.&amp;#160; There are a few new managed properties that you get by default in the search results.&amp;#160; I’ll talk about these more when we look at using the QueryManager in an upcoming post.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchKeywordQueryDataVisualizer_53C33988.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchKeywordQueryDataVisualizer" border="0" alt="EnterpriseSearchKeywordQueryDataVisualizer" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchKeywordQueryDataVisualizer_thumb_2A8B7B7D.png" width="541" height="275" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;There are a lot of new properties on the KeywordQuery class and I have only begun to explore them, but here are some of the ones I’ve looked at so far.&amp;#160; The first is &lt;em&gt;EnableFQL.&amp;#160; &lt;/em&gt;This allows you to submit queries using &lt;a href="http://msdn.microsoft.com/en-us/library/ff394606.aspx"&gt;FAST Query Language&lt;/a&gt;.&amp;#160; That’s a whole series of posts by itself.&amp;#160; Just know that you can submit FQL queries using the KeywordQuery class.&amp;#160; Two other interesting properties are &lt;em&gt;EnableNicknames&lt;/em&gt; and &lt;em&gt;EnablePhonetic&lt;/em&gt;.&amp;#160; This allows you to turn off the cool people search features that are so great at finding peoples names &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/03/11/a-quick-look-at-phonetic-people-search-in-sharepoint-2010.aspx"&gt;phonetically&lt;/a&gt;.&amp;#160; I’ll talk about more options with the KeywordQuery class in the future.&amp;#160; Anyhow, I hope this gets you started using it in SharePoint 2010.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3925" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/HSPwKolWyOA" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/FAST+Search/default.aspx">FAST Search</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/12/how-to-use-the-sharepoint-2010-enterprise-search-keywordquery-class.aspx</feedburner:origLink></item><item><title>Creating a Content Source Scope Rule using PowerShell</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/x_BbEuK1R5Y/creating-a-content-source-scope-rule-using-powershell.aspx</link><pubDate>Wed, 11 Aug 2010 18:33:03 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3910</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>7</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3910</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/11/creating-a-content-source-scope-rule-using-powershell.aspx#comments</comments><description>&lt;p&gt;Two weeks ago, I posted about how to create scopes and scope rules using &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/29/creating-enterprise-search-scopes-with-powershell.aspx"&gt;PowerShell&lt;/a&gt;.&amp;#160; At the end of the post I mentioned that there was no rule type for creating scope rules by content type.&amp;#160; I knew there had to be a way to do this, so I created a scope rule using the UI and then I used the Get-SPEnterpriseSearchQueryScopeRule cmdlet to return all the scope rules on my content source.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;$searchapp = Get-SPEnterpriseSearchServiceApplication &amp;quot;Search Service Application&amp;quot;      &lt;br /&gt;$scope = Get-SPEnterpriseSearchQueryScope -Identity &amp;quot;File Share&amp;quot; -SearchApplication $searchapp       &lt;br /&gt;Get-SPEnterpriseSearchQueryScopeRule -Scope $scope&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellGetScopeRulesContentSource_2F2221C0.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="EnterpriseSearchPowerShellGetScopeRulesContentSource" border="0" alt="EnterpriseSearchPowerShellGetScopeRulesContentSource" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellGetScopeRulesContentSource_thumb_030524CF.png" width="512" height="123" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;From this result, the answer was immediately obvious to me.&amp;#160; &lt;em&gt;ContentSource&lt;/em&gt; is a managed property and we already know how to create scope rules like that using the &lt;em&gt;PropertyQuery&lt;/em&gt; rule type.&amp;#160; Remember how we can &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/20/some-handy-keywords-you-might-find-useful-in-sharepoint-enterprise-search.aspx"&gt;query by content source&lt;/a&gt;?&amp;#160; Let’s give it a try and see what happens.&amp;#160; I am going to create a new scope and have it use my BCS content source called &lt;em&gt;Products&lt;/em&gt;.&amp;#160; Here is what the syntax looks like.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;$searchapp = Get-SPEnterpriseSearchServiceApplication &amp;quot;Search Service Application&amp;quot;      &lt;br /&gt;$scope = New-SPEnterpriseSearchQueryScope -Name &amp;quot;My Scope&amp;quot; -Description &amp;quot;My scope created in PowerShell&amp;quot; -SearchApplication $searchapp -DisplayInAdminUI $true       &lt;br /&gt;New-SPEnterpriseSearchQueryScopeRule -RuleType PropertyQuery -ManagedProperty ContentSource -PropertyValue Products -FilterBehavior Include -url &lt;a href="http://sp2010"&gt;http://sp2010&lt;/a&gt; -scope $scope -SearchApplication $searchapp&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;I’ll only mention the relevant parameters today.&amp;#160; If you are curious about the other ones, see the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/29/creating-enterprise-search-scopes-with-powershell.aspx"&gt;previous post&lt;/a&gt; where I go into detail on each one.&amp;#160; On the &lt;em&gt;New-SPEnterpriseSearchQueryScopeRule &lt;/em&gt;method, we set the &lt;em&gt;RuleType&lt;/em&gt; parameter to &lt;em&gt;ContentSource&lt;/em&gt;.&amp;#160; Then, we set the &lt;em&gt;PropertyValue&lt;/em&gt; to the name of the content source.&amp;#160; In my case, I set it to &lt;em&gt;Products&lt;/em&gt;.&amp;#160; Executing the script above, I get the following result.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScopeRuleContentSource_094BFB5D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="EnterpriseSearchPowerShellNewScopeRuleContentSource" border="0" alt="EnterpriseSearchPowerShellNewScopeRuleContentSource" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScopeRuleContentSource_thumb_48A9AEED.png" width="514" height="121" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;It appears to have worked, but let’s verify it in the UI.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScopeRuleContentSourceUI_210332C3.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="EnterpriseSearchPowerShellNewScopeRuleContentSourceUI" border="0" alt="EnterpriseSearchPowerShellNewScopeRuleContentSourceUI" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScopeRuleContentSourceUI_thumb_0B394A66.png" width="690" height="356" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Excellent.&amp;#160; The new scope was created with the content source rule and it has 43 items included.&amp;#160; Now, I can pretty much script all of my search settings in PowerShell.&amp;#160; Once you have your scopes created, if you want to create scope display groups be sure and check out the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/09/introducing-the-sharepoint-powershell-community-toolkit.aspx"&gt;SharePoint PowerShell Community Toolkit&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3910" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/x_BbEuK1R5Y" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/11/creating-a-content-source-scope-rule-using-powershell.aspx</feedburner:origLink></item><item><title>SharePoint PowerShell Community Toolkit Updated</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/22BsJIH7ElU/sharepoint-powershell-community-toolkit-updated.aspx</link><pubDate>Wed, 11 Aug 2010 15:01:32 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3909</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3909</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/11/sharepoint-powershell-community-toolkit-updated.aspx#comments</comments><description>&lt;p&gt;I’m excited to see that we’ve already got some community contribution to the SharePoint PowerShell Community Toolkit.&amp;#160; Pete Cuttriss provided us with two new methods useful for working with scope display groups.&amp;#160; I also have the source code checked into the CodePlex TFS server now.&amp;#160; Source control is a good thing. :-)&amp;#160; Version 1.0.1.1 was released last night with the following new cmdlets.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://sppsck.codeplex.com/wikipage?title=Get-SPEnterpriseSearchQueryScopeDisplayGroup"&gt;Get-SPEnterpriseSearchQueryScopeDisplayGroup&lt;/a&gt; – Returns a scope display group&lt;/li&gt;    &lt;li&gt;&lt;a href="http://sppsck.codeplex.com/wikipage?title=Remove-SPEnterpriseSearchQueryScopeDisplayGroup"&gt;Remove-SPEnterpriseSearchQueryScopeDisplayGroup&lt;/a&gt; – Removes a scope display group&lt;/li&gt;    &lt;li&gt;&lt;a href="http://sppsck.codeplex.com/wikipage?title=Remove-SPEnterpriseSearchQueryScopeDisplayGroupScope"&gt;Remove-SPEnterpriseSearchQueryScopeDisplayGroupScope&lt;/a&gt; – Removes a scope from a scope display group&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you try out any of our cmdlets, be sure sand let use know how they work for you.&amp;#160; As always we welcome your contributions.&amp;#160; Thanks and happy PowerShelling!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sppsck.codeplex.com/releases/view/50394"&gt;Release v1.0.1.1&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Follow me on &lt;a href="http://twitter.com/coreyroth"&gt;twitter&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3909" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/22BsJIH7ElU" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+PowerShell+Community+Toolkit/default.aspx">SharePoint PowerShell Community Toolkit</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/11/sharepoint-powershell-community-toolkit-updated.aspx</feedburner:origLink></item><item><title>Introducing the SharePoint PowerShell Community Toolkit</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/mOsuo3hpZOI/introducing-the-sharepoint-powershell-community-toolkit.aspx</link><pubDate>Mon, 09 Aug 2010 20:04:43 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3894</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3894</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/09/introducing-the-sharepoint-powershell-community-toolkit.aspx#comments</comments><description>&lt;p&gt;This weekend, I got inspired to create what I think could be a great new CodePlex community Project.&amp;#160; Last week, I saw a post in the forums as well a comment on the blog asking if specific PowerShell commands existed in regards to Enterprise Search.&amp;#160; In both cases, I could not find existing commands so I thought why not create these commands.&amp;#160; Then I thought that I should go ahead and provide a framework for other people to implement cmdlets to add to the ones I created.&amp;#160; I took a look out on CodePlex to see if anything existed already and from what I could tell, there is nothing like this yet, so here we are. I am excited to announce the &lt;a href="http://sppsck.codeplex.com/"&gt;SharePoint PowerShell Community Toolkit&lt;/a&gt; on CodePlex.&amp;#160; SharePoint already has 500+ PowerShell commands, but the community always wants to add more. :-)&amp;#160; I thought this would be a great way to do it.&amp;#160; I started out with cmdlets to do a few things in Enterprise Search since I knew there were requests from people in the community out there already.&amp;#160; &lt;/p&gt;  &lt;p&gt;Here are the commands I have implemented.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://sppsck.codeplex.com/wikipage?title=New-SPEnterpriseSearchQueryScopeDisplayGroup&amp;amp;referringTitle=Search%20Commands"&gt;New-SPEnterpriseSearchQueryScopeDisplayGroup&lt;/a&gt; – creates a new scope display group&lt;/li&gt;    &lt;li&gt;&lt;a href="http://sppsck.codeplex.com/wikipage?title=New-SPEnterpriseSearchQueryScopeDisplayGroupScope&amp;amp;referringTitle=Search%20Commands"&gt;New-SPEnterpriseSearchQueryScopeDisplayGroupScope&lt;/a&gt; – adds a scope to an existing scope display group&lt;/li&gt;    &lt;li&gt;&lt;a href="http://sppsck.codeplex.com/wikipage?title=Reset-SPEnterpriseSearchIndex&amp;amp;referringTitle=Search%20Commands"&gt;Reset-SPEnterpriseSearchIndex&lt;/a&gt; – resets an Enterprise Search content index&lt;/li&gt;    &lt;li&gt;&lt;a href="http://sppsck.codeplex.com/wikipage?title=Start-SPEnterpriseSearchQueryScopesCompilation&amp;amp;referringTitle=Search%20Commands"&gt;Start-SPEnterpriseSearchQueryScopesCompilation&lt;/a&gt; – starts Enterprise Search scope compilation&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Ok, so I know that is not that many commands yet, but how many did you expect me to write over the weekend? :-)&amp;#160; I have a ton of ideas though, so you can expect me to add more soon.&amp;#160; If you want to start using the commands now in your environment, download the distributable from CodePlex and use the install.bat file to copy the assembly to the GAC.&amp;#160; You can then register the snapin inside PowerShell.&amp;#160; More detailed installation instructions are on &lt;a href="http://sppsck.codeplex.com/wikipage?title=Installation&amp;amp;referringTitle=Documentation"&gt;CodePlex&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If there is a PowerShell collaboration project out there already and somehow I missed it, let me know and I’ll be happy to add my contributions. :-)&amp;#160; So how can you help?&amp;#160; Create cmdlets and send them in.&amp;#160; I’m looking for people to help contribute to the project.&amp;#160; Not sure how to create a cmdlet yet?&amp;#160; No problem!&amp;#160; Check this &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/04/26/how-to-build-a-sharepoint-2010-powershell-cmdlet.aspx"&gt;post&lt;/a&gt; out to help you get started.&amp;#160; It’s easier than you think. :-)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sppsck.codeplex.com/"&gt;SharePoint PowerShell Community Toolkit on CodePlex&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3894" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/mOsuo3hpZOI" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+PowerShell+Community+Toolkit/default.aspx">SharePoint PowerShell Community Toolkit</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/09/introducing-the-sharepoint-powershell-community-toolkit.aspx</feedburner:origLink></item><item><title>Missing Tag Cloud Web Part (and other Social Web Parts) after SharePoint 2010 Upgrade</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/wzYMXPz9rL8/missing-tag-cloud-web-part-and-other-social-web-parts-after-sharepoint-2010-upgrade.aspx</link><pubDate>Fri, 06 Aug 2010 15:23:55 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3888</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3888</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/06/missing-tag-cloud-web-part-and-other-social-web-parts-after-sharepoint-2010-upgrade.aspx#comments</comments><description>&lt;p&gt;I noticed this little issue after doing my last SharePoint 2010 upgrade.&amp;#160; The client was a fan of the Tag Cloud Web Part on his My Site and wanted to bring that functionality onto one of his team sites.&amp;#160; I figured this would be no problem, so we went to the Team Site, clicked Add New Web Part, looked under Social Collaboration only to find the Tag Cloud missing from the list.&amp;#160; In fact, Tag Cloud was not the only thing missing.&amp;#160; Contact Details, Note Board, and Organization Browser were also missing.&amp;#160; I checked the web part gallery and there was no sign of the Tag Cloud present.&amp;#160; I verified that the SharePoint Standard and Enterprise features are activated, but still no sign of it.&lt;/p&gt;  &lt;p&gt;At this point, I decide to do some digging.&amp;#160; I wanted to find out which feature installed this web part.&amp;#160; After looking at a working SharePoint 2010 server, I determined that the web part comes from the file TagCloud.dwp (a version 2 &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/08/21/the-difference-between-dwp-and-webpart.aspx"&gt;web part schema&lt;/a&gt; on a brand new web part?&amp;#160; Really?).&amp;#160; I head to the 14 hive and search the features folder and determine that, this web part is deployed by the &lt;em&gt;PortalLayouts &lt;/em&gt;and &lt;em&gt;MySiteLayouts &lt;/em&gt;hidden features.&amp;#160; Then it all makes since (well sort of).&amp;#160; Since I upgraded this site from MOSS 2007, the new version of PortalLayouts has not activated on my site collection.&amp;#160; &lt;/p&gt;  &lt;p&gt;At this point, I had a decision to make.&amp;#160; I could force the PortalLayouts feature to activate again or I could leave well enough alone and just manually upload the .dwp file into the Web Parts gallery.&amp;#160; I went with the latter so I grabbed TagCloud.dwp from 14\TEMPLATE\FEATURES\PortalLayouts\DWP and uploaded it to the web part gallery and the web part worked just fine.&amp;#160; I wasn’t sure what the other unintended results might be on the site collection had I force activated the PortalLayouts feature again so this seemed like the right decision.&amp;#160; If you are interested in the other web parts, you can upload contactwp.dwp, profilebrowser.dwp, and socialcomment.dwp to your gallery as well.&amp;#160; There may be other web parts missing too, but I think this is it.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3888" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/wzYMXPz9rL8" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/WebPart/default.aspx">WebPart</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Upgrade/default.aspx">Upgrade</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/06/missing-tag-cloud-web-part-and-other-social-web-parts-after-sharepoint-2010-upgrade.aspx</feedburner:origLink></item><item><title>A tip to remember when calling custom web services in SharePoint from JavaScript (or jQuery)</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/O08my9MZoTU/a-tip-to-remember-when-calling-custom-web-services-in-sharepoint-from-javascript-or-jquery.aspx</link><pubDate>Tue, 03 Aug 2010 18:31:12 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3876</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3876</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/03/a-tip-to-remember-when-calling-custom-web-services-in-sharepoint-from-javascript-or-jquery.aspx#comments</comments><description>&lt;p&gt;I’ve been customizing rendering templates a lot lately using a wide variety of scripting technologies such as JavaScript, jQuery, and &lt;a href="http://spservices.codeplex.com/"&gt;SPServices&lt;/a&gt;.&amp;#160; One requirement I had with all of these rendering templates was to call a custom web service to populate a drop down list.&amp;#160; This is relatively easy to do and there are plenty of resources out there on how to deploy web services with SharePoint.&amp;#160; I thought I would make a point today though to talk about this issue since I seem to forget about it every time. :-)&amp;#160; The issue is that you build and test your pages and they work great as an administrator. However, once an end user tries the page, the script on the page doesn’t work.&amp;#160; With any scripting issue, I bust out &lt;a href="http://getfirebug.com/"&gt;FireBug&lt;/a&gt; in Firefox and take a look at the page.&amp;#160; It shows the web service call which works great for the administrator but when the user tries it, the result is 403 forbidden.&lt;/p&gt;  &lt;p&gt;Obviously, I need to grant permissions, but where?&amp;#160; Since the end user is on the SharePoint site, the identity that the JavaScript is calling with is that of the user.&amp;#160; This of course assumes, you are using NTLM or Kerberos and not doing forms authentication.&amp;#160; The place we have to grant permissions may not make sense to you at all, but the general consensus is that you grant &lt;em&gt;Read&lt;/em&gt; permission to the &lt;em&gt;Authenticated Users&lt;/em&gt; group on the bin folder of your web application.&amp;#160; This is the case at least when you are deploying your code to the bin folder (and using &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2007/08/28/more-on-code-access-security.aspx"&gt;Code Access Security&lt;/a&gt;).&amp;#160; I don’t believe that web services with binaries deployed to the GAC should have this issue but I could be wrong.&amp;#160; Here is what the permissions look like on your bin folder.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/BinFolderSecurityAuthenticatedUsers_5E843C13.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="BinFolderSecurityAuthenticatedUsers" border="0" alt="BinFolderSecurityAuthenticatedUsers" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/BinFolderSecurityAuthenticatedUsers_thumb_157E1A4D.png" width="319" height="412" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Any how, I hope this helps should you run into this issue.&amp;#160; I don’t foresee any potential security issues by granting this group access to the bin folder, but if you think there are any associated risks, I would like to hear about them.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3876" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/O08my9MZoTU" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/jQuery/default.aspx">jQuery</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/03/a-tip-to-remember-when-calling-custom-web-services-in-sharepoint-from-javascript-or-jquery.aspx</feedburner:origLink></item><item><title>Where did my Search Scopes list on the home page go in SharePoint 2010?</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/LhE2Z4Da3yY/where-did-my-search-scopes-list-on-the-home-page-go-in-sharepoint-2010.aspx</link><pubDate>Mon, 02 Aug 2010 16:45:19 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3866</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3866</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/02/where-did-my-search-scopes-list-on-the-home-page-go-in-sharepoint-2010.aspx#comments</comments><description>&lt;p&gt;On a recent SharePoint 2010 migration I completed, this was one of the first questions I was asked.&amp;#160; After seeing versions of SharePoint all these months, it never occurred to me that the dropdown list wasn’t there any more until someone pointed it out.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/HomePageSearchBox_687747F8.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="HomePageSearchBox" border="0" alt="HomePageSearchBox" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/HomePageSearchBox_thumb_60EBD88B.png" width="296" height="154" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Luckily, it’s easy enough to change this and I found some new settings along the way.&amp;#160; This box uses the built-in (not supposed to be customized) OSSSearchResults.aspx.&amp;#160; However, to use scopes, we need to create a Search Center.&amp;#160; To do this, we can go to Site Settings –&amp;gt; Search Settings to make some configuration changes.&amp;#160; This page was here in 2007, but I was pleased to see some new settings here in 2010 that I had not noticed yet.&amp;#160; We set the path to our search center just as we did before by specifying the Pages library of the search center.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SiteCollectionSearchSettings1_353B0E8F.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SiteCollectionSearchSettings1" border="0" alt="SiteCollectionSearchSettings1" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SiteCollectionSearchSettings1_thumb_386CF677.png" width="662" height="122" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;There is a new setting to specify what the site collection search dropdown displays. Now there is a boat load of options for you to pick from.&amp;#160; The default is &lt;em&gt;Do not show scopes dropdown, and default to contextual scope&lt;/em&gt;.&amp;#160; Here are all of the options you have to pick from.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SiteCollectionSearchSettings2_136F35FE.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SiteCollectionSearchSettings2" border="0" alt="SiteCollectionSearchSettings2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SiteCollectionSearchSettings2_thumb_448E709E.png" width="661" height="108" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The options are fairly self-explanatory with maybe the exception of &lt;em&gt;default to ‘s’ URL parameter&lt;/em&gt;.&amp;#160; I’ve talked about this in previous posts, but what this does is tells the drop down list to default to the scope that was passed via the ‘s’ query string parameter.&amp;#160;&amp;#160; This means that when you perform a search and are looking at the results page, the drop down will show the scope you just searched for.&amp;#160; As for &lt;em&gt;default to contextual scope&lt;/em&gt;, this refers to the &lt;em&gt;This Site&lt;/em&gt; or &lt;em&gt;This List&lt;/em&gt; search options that you might be used to seeing from SharePoint 2007.&amp;#160; What option you pick here is largely up to you.&amp;#160; I usually end up going with &lt;em&gt;Show and default to contextual scope&lt;/em&gt;.&amp;#160; However, I think &lt;em&gt;Show, do not include contextual scopes, and default to ‘s’ URL parameter&lt;/em&gt; can also be a good choice at times.&lt;/p&gt;  &lt;p&gt;We have one more setting that I want to mention on this page called &lt;em&gt;Site Collection Search Results Page&lt;/em&gt;. &lt;em&gt;&amp;#160;&lt;/em&gt;This allows you to override the URL used by contextual search.&amp;#160; In SharePoint 2007, all contextual searches went to the application page /_layouts/OSSSearchResults.aspx.&amp;#160; If you ever wanted to customize this page, you had to modify a built-in page which of course is unsupported.&amp;#160; Another side effect was that it changed the look of that page on every site on that server.&amp;#160; This new setting is great because it means we can change the contextual search page on a per site collection basis and simply upload a new application page without affecting the original page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SiteCollectionSearchSettings3_5CB1DAF9.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SiteCollectionSearchSettings3" border="0" alt="SiteCollectionSearchSettings3" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SiteCollectionSearchSettings3_thumb_50AFEAC5.png" width="658" height="97" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;To configure what scopes show up in the dropdown on the home page, you need to modify the &lt;em&gt;Search Dropdown&lt;/em&gt; &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/08/31/the-basics-of-working-with-scope-display-groups.aspx"&gt;scope display group&lt;/a&gt;.&amp;#160; Modify this group as you see fit and then you should see it on the home page.&amp;#160; In this case, I added my file share scope to be displayed on all of my pages.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ScopeDisplayGroupHomePage_08EE61DE.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ScopeDisplayGroupHomePage" border="0" alt="ScopeDisplayGroupHomePage" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/ScopeDisplayGroupHomePage_thumb_6F865EA3.png" width="368" height="81" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is what my pages look like with the dropdown.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/HomePageSearchBox2_6F1A2BAE.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="HomePageSearchBox2" border="0" alt="HomePageSearchBox2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/HomePageSearchBox2_thumb_20A59944.png" width="363" height="150" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So I can kind of see why they changed the default option for this.&amp;#160; The interface just looks cleaner without the dropdown box.&amp;#160; However, I think a lot of users are used to seeing it there, so this shows you how to add it back in the event that you ever need to.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3866" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/LhE2Z4Da3yY" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/02/where-did-my-search-scopes-list-on-the-home-page-go-in-sharepoint-2010.aspx</feedburner:origLink></item><item><title>Creating Enterprise Search Scopes with PowerShell</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/qV2dkSRQV4A/creating-enterprise-search-scopes-with-powershell.aspx</link><pubDate>Thu, 29 Jul 2010 19:47:21 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3825</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>8</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3825</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/29/creating-enterprise-search-scopes-with-powershell.aspx#comments</comments><description>&lt;p&gt;I posted a while back on how to do your &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/05/26/creating-enterprise-search-metadata-property-mappings-with-powershell.aspx"&gt;Managed Property&lt;/a&gt; mappings in PowerShell, so I wanted to follow up with how to add search scopes next.&amp;#160; I have to give props to the SDK team because they have done a pretty good job documenting all of these PowerShell commands.&amp;#160; They even provide examples which I like a lot.&amp;#160; When trying out command sto create scopes and their associated &lt;a href="http://technet.microsoft.com/en-us/library/ff608132.aspx#"&gt;rules&lt;/a&gt;, I ran into a few things that I wanted to share.&amp;#160; You will want to put all of these commands into a .ps1 script file.&amp;#160; You can create your script file in PowerShell-ISE or just use notepad.&amp;#160; We start out by getting a reference to the search application.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;$searchapp = Get-SPEnterpriseSearchServiceApplication &amp;quot;Search Service Application&amp;quot;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;At this point, we are ready to create a new scope.&amp;#160; It’s pretty simple.&amp;#160; To create a scope, we use the &lt;em&gt;New-SPEnterpriseSearchQueryScope &lt;/em&gt;command.&amp;#160; Here is my command to create a scope called &lt;em&gt;My Scope&lt;/em&gt;.&amp;#160; One thing to note here is that &lt;em&gt;DisplayInAdminUI &lt;/em&gt;is a required parameter.&amp;#160; It turns out you can create hidden scopes with PowerShell even though you can’t do it through the UI.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;$scope = New-SPEnterpriseSearchQueryScope -Name &amp;quot;My Scope&amp;quot; -Description &amp;quot;My scope created in PowerShell&amp;quot; -SearchApplication $searchapp -DisplayInAdminUI $true&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScope_2C4B23BD.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="EnterpriseSearchPowerShellNewScope" border="0" alt="EnterpriseSearchPowerShellNewScope" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScope_thumb_3D4F51A0.png" width="550" height="81" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;We now want to create scope rules for this scope.&amp;#160; I assign the resulting object from the above command into a variable called $scope so that we can pass it to the &lt;em&gt;scope &lt;/em&gt;parameter of the &lt;em&gt;New-SPEnterpriseSearchQueryScopeRule&lt;/em&gt; command.&amp;#160; When creating a scope rule through the UI, you have four choices: All Content, Property Query, Content Source, and Web Address.&amp;#160; We’ll start with the simplest one, All Content.&amp;#160; For this, we just specify a &lt;em&gt;RuleType &lt;/em&gt;value of &lt;em&gt;AllContent&lt;/em&gt;.&amp;#160; All commands to create new scope rules require a URL.&amp;#160; It’s not entirely clear what this URL does since it’s not something you enter in the UI when you create a rule.&amp;#160; From the SDK, it simply states that it “&lt;em&gt;specifies the results URL that is associated with the query rule.”&lt;/em&gt;&amp;#160; I guess you could give it a path to the results page in your search center.&amp;#160; For now, I just specify the path to the server and it seems to work.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;New-SPEnterpriseSearchQueryScopeRule -RuleType AllContent -url http://sp2010 -scope $scope&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScopeRuleAllContent_230EE87C.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="EnterpriseSearchPowerShellNewScopeRuleAllContent" border="0" alt="EnterpriseSearchPowerShellNewScopeRuleAllContent" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScopeRuleAllContent_thumb_6F667C1D.png" width="554" height="82" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Next, we’ll create a scope rule using the &lt;em&gt;PropertyQuery&lt;/em&gt; Rule Type.&amp;#160; It requires a few more parameters.&amp;#160; The &lt;em&gt;ManagedProperty&lt;/em&gt; parameter specifies the name of your managed property.&amp;#160; In my example, I am going to use a property called &lt;em&gt;Color&lt;/em&gt;.&amp;#160; The &lt;em&gt;PropertyValue&lt;/em&gt; parameter specifies the value.&amp;#160; I want to see products that are red, so I’ll specify &lt;em&gt;Red&lt;/em&gt; here.&amp;#160; With any scope rule, you can specify whether the results from the rule should be Included, Required, or Excluded.&amp;#160; We specify this with the &lt;em&gt;FilterBehavior &lt;/em&gt;parameter.&amp;#160; This parameter is required when using this PropertyType (note the SDK says it is optional).&amp;#160; Also, when using a property query, the &lt;em&gt;SearchApplication &lt;/em&gt;parameter is required too so just pass it the value &lt;em&gt;$searchapp &lt;/em&gt;and it will work fine.&amp;#160; Here is the command.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;New-SPEnterpriseSearchQueryScopeRule -RuleType PropertyQuery -ManagedProperty Color -PropertyValue Red -FilterBehavior Include -url http://sp2010 -scope $scope -SearchApplication $searchapp&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScopeRulePropertyQuery_12473DCE.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="EnterpriseSearchPowerShellNewScopeRulePropertyQuery" border="0" alt="EnterpriseSearchPowerShellNewScopeRulePropertyQuery" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScopeRulePropertyQuery_thumb_4BE9D7B8.png" width="557" height="131" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;When you execute the command it gives you some basic info about the rule you set up as well as an estimated count.&lt;/p&gt;  &lt;p&gt;Setting up a scope with a &lt;em&gt;RuleType &lt;/em&gt;of &lt;em&gt;Url &lt;/em&gt;took me a bit longer to figure out. This is because there is a parameter called &lt;em&gt;UrlScopeType&lt;/em&gt; and the SDK didn’t say what value was expected there.&amp;#160; I had to do some digging.&amp;#160; The SDK, didn’t say what values it was expecting nor did the Get-Help command.&amp;#160; I did some reflecting and finally found an enum that had the answer.&amp;#160; The values it wants are &lt;em&gt;Folder&lt;/em&gt;, &lt;em&gt;HostName&lt;/em&gt;, or &lt;em&gt;Domain&lt;/em&gt;. This of course makes sense when you go back and look at the UI and see the parameters you specify there.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellUIWebAddress_7D091258.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="EnterpriseSearchPowerShellUIWebAddress" border="0" alt="EnterpriseSearchPowerShellUIWebAddress" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellUIWebAddress_thumb_541DFD4F.png" width="641" height="123" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The other parameter you need to know about here is &lt;em&gt;MatchingString&lt;/em&gt;.&amp;#160; You specify the value to the folder, hostname, or domain you want to use.&amp;#160; In this case I am setting up a rule for a particular subsite.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;New-SPEnterpriseSearchQueryScopeRule -RuleType Url -MatchingString http://sp2010/bcs -UrlScopeRuleType Folder -FilterBehavior Include -url http://sp2010 -scope $scope&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScopeRuleUrlFolder_2801005E.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="EnterpriseSearchPowerShellNewScopeRuleUrlFolder" border="0" alt="EnterpriseSearchPowerShellNewScopeRuleUrlFolder" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchPowerShellNewScopeRuleUrlFolder_thumb_06A15AC2.png" width="553" height="119" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So now we can create rules for all content, a web address, and a property query. However, if you have ever set up a scope before, you know there is one more type.&amp;#160; That type is a content source.&amp;#160; The SDK, didn’t have this type listed so I looked around in reflector again and found that we could specify a value of &lt;em&gt;ContentSource&lt;/em&gt; for the &lt;em&gt;RuleType&lt;/em&gt; parameter.&amp;#160; However, when I tried to specify that parameter, it didn’t work.&amp;#160; I took a look at the code and discovered that there is no code implemented to create a content source scope rule.&amp;#160; After doing some experimenting in PowerShell, I did discover the answer, but I’ll save that for the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/08/11/creating-a-content-source-scope-rule-using-powershell.aspx"&gt;next post&lt;/a&gt; where I will show you how I figured it out.&lt;/p&gt;  &lt;p&gt;Remember you can add multiple rules at a time to one scope.&amp;#160; Just put them all in one script file and run it.&amp;#160; Also if you need to delete your Scope, you can use the &lt;em&gt;Remove-SPEnterpriseSearchQueryScope&lt;/em&gt; command but you have to pass it an actual scope object which you can get with the &lt;em&gt;Get-SPEnterpriseSearchQueryScope&lt;/em&gt; command.&amp;#160; Here is how I deleted my scopes as I was testing.&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;$searchapp = Get-SPEnterpriseSearchServiceApplication &amp;quot;Search Service Application&amp;quot;      &lt;br /&gt;Get-SPEnterpriseSearchQueryScope -Identity &amp;quot;My Scope&amp;quot; -SearchApplication $searchapp | Remove-SPEnterpriseSearchQueryScope&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;You can do so much in SharePoint with PowerShell.&amp;#160; This is just one more thing, I won’t have to manually configure any more.&amp;#160; The SDK does a great job documenting all of the commands out there (although I would like to see that info on the UrlScopeType parameter added some time :) ).&amp;#160; Try some of them out and you’ll be amazed at what you can accomplish.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3825" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/qV2dkSRQV4A" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/29/creating-enterprise-search-scopes-with-powershell.aspx</feedburner:origLink></item><item><title>How to: Change your namespace in a Silverlight application without breaking everything</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/3AxV7N5sBBY/how-to-change-your-namespace-in-a-silverlight-application-without-breaking-everything.aspx</link><pubDate>Fri, 23 Jul 2010 20:16:41 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3773</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3773</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/23/how-to-change-your-namespace-in-a-silverlight-application-without-breaking-everything.aspx#comments</comments><description>&lt;p&gt;The first thing I do when creating a new project in Visual Studio (regardless of type) is change the project name, assembly name, and default namespace.&amp;#160; I like for the names of all these to be consistent.&amp;#160; However, I have noticed in Silverlight, you must make changes in five different places for everything to work alright otherwise you will get errors.&amp;#160; I’m no Silverlight expert, but I thought this post would be useful for people like me who only dabble in it from time to time.&lt;/p&gt;  &lt;p&gt;When you create your new Silverlight project, right click on the project name and bring up its properties.&amp;#160; Go ahead and change the default namespace and assembly name just like you would in any other project.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightProjectProperties1_7D3B24BA.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SilverlightProjectProperties1" border="0" alt="SilverlightProjectProperties1" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightProjectProperties1_thumb_5C47B213.png" width="561" height="280" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In my case, I change from a namespace of &lt;em&gt;SilverlightApplication1&lt;/em&gt; to &lt;em&gt;DotNetMafia.Silverlight.Test&lt;/em&gt;.&amp;#160; Here you can see the new assembly name and default namespace.&amp;#160; There are two other options to set here, but we will have to come back to it.&lt;/p&gt;  &lt;p&gt;At this point, we want to correct the namespace in the existing classes.&amp;#160; Let’s start with &lt;strong&gt;App.xaml&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStatusAppXaml1_1BA565A4.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SilverlightStatusAppXaml1" border="0" alt="SilverlightStatusAppXaml1" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStatusAppXaml1_thumb_36DDBEA5.png" width="543" height="132" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I have highlighted the section, I need to change, &lt;em&gt;x:Class&lt;/em&gt;.&amp;#160; I’ll change it to DotNetMafia.Silverlight.Test like we see below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStatusAppXaml2_16567EF3.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SilverlightStatusAppXaml2" border="0" alt="SilverlightStatusAppXaml2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStatusAppXaml2_thumb_60DDBCCD.png" width="544" height="132" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, we just need to change the namespace in the code behind file &lt;strong&gt;App.xaml.cs&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStatusAppXamlCs1_073FA019.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SilverlightStatusAppXamlCs1" border="0" alt="SilverlightStatusAppXamlCs1" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStatusAppXamlCs1_thumb_34C0BFDC.png" width="365" height="240" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, we have to do the same thing to &lt;strong&gt;MainPage.xaml&lt;/strong&gt;.&amp;#160; Change the namespace here on x:Class as well.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStatusMainPageXaml1_2D35506F.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SilverlightStatusMainPageXaml1" border="0" alt="SilverlightStatusMainPageXaml1" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStatusMainPageXaml1_thumb_058ED445.png" width="541" height="98" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Then, you will change the namespace of the code behind file &lt;strong&gt;MainPage.xaml.cs &lt;/strong&gt;just liked we did before.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStatusMainPageXamlCs1_44EC87D5.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SilverlightStatusMainPageXamlCs1" border="0" alt="SilverlightStatusMainPageXamlCs1" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStatusMainPageXamlCs1_thumb_2B84849B.png" width="373" height="173" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;At this point, your code will compile.&amp;#160; However, it will not run.&amp;#160; If you try to debug it you will likely get a blank page and if you are using Internet Explorer, you will probably see a script error in the toolbar.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStartupObjectErrorToolbar_441421EB.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SilverlightStartupObjectErrorToolbar" border="0" alt="SilverlightStartupObjectErrorToolbar" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStartupObjectErrorToolbar_thumb_35D5A8FB.png" width="126" height="42" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Clicking on the error, you can see the following details.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStartupObjectError_3C88B27E.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SilverlightStartupObjectError" border="0" alt="SilverlightStartupObjectError" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightStartupObjectError_thumb_54AC1CD9.png" width="430" height="288" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I have to say they have really improved the way you view script errors.&amp;#160; Here is the text of the error.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Message: Unhandled Error in Silverlight Application      &lt;br /&gt;Code: 2103&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;Category: InitializeError&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;Message: Invalid or malformed application: Check manifest&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Line: 54      &lt;br /&gt;Char: 13       &lt;br /&gt;Code: 0       &lt;br /&gt;URI: &lt;/em&gt;&lt;a&gt;&lt;em&gt;file:///C:/Code/SilverlightApplication1/Bin/Debug/SilverlightApplication1TestPage.html&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Remember, I said we had to change an additional setting in the project properties?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightProjectProperties2_5A1A8D7D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SilverlightProjectProperties2" border="0" alt="SilverlightProjectProperties2" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightProjectProperties2_thumb_0EBAE9B9.png" width="244" height="51" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is the problem here.&amp;#160; We change the startup objects namespace but never update the project properties to match.&amp;#160; You should be able to pick the new namespace of your startup object from the list.&amp;#160; This is also a good time to change the name of your .XAP file if you are so inclined.&amp;#160; Here is what my project properties looks like when I am done.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightProjectProperties3_32741153.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SilverlightProjectProperties3" border="0" alt="SilverlightProjectProperties3" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightProjectProperties3_thumb_66A83A99.png" width="553" height="280" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;At this point your application should compile and run.&amp;#160; Now I can view my beautiful Hello World Silverlight application.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightNamespaceChangeWorking_3F01BE6F.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="SilverlightNamespaceChangeWorking" border="0" alt="SilverlightNamespaceChangeWorking" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SilverlightNamespaceChangeWorking_thumb_708D2C04.png" width="432" height="213" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Great app huh?&amp;#160; Any how, I hope this helps should you encounter the error above or run into issues changing your namespace.&amp;#160; It’s pretty simple to do, but you’ll definitely get errors if you don’t get all of your changes made.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3773" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/3AxV7N5sBBY" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Silverlight/default.aspx">Silverlight</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/23/how-to-change-your-namespace-in-a-silverlight-application-without-breaking-everything.aspx</feedburner:origLink></item><item><title>Some handy keywords you might find useful in SharePoint Enterprise Search</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/l-LfXReFpJQ/some-handy-keywords-you-might-find-useful-in-sharepoint-enterprise-search.aspx</link><pubDate>Tue, 20 Jul 2010 20:30:47 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3755</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3755</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/20/some-handy-keywords-you-might-find-useful-in-sharepoint-enterprise-search.aspx#comments</comments><description>&lt;p&gt;Enterprise Search is one of my favorite SharePoint topics to speak about.&amp;#160; Often in my talks, I use various keyword queries to display results that people often end up asking me about.&amp;#160; Today, I thought it would be useful to show you some of the most useful built-in keywords that you can use to troubleshoot search results or even build custom scopes with.&amp;#160; I see people post in the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sharepointsearch/threads"&gt;forums&lt;/a&gt; all the time about how to do many of the queries I have in the list below, so I figure this is will be a good post to refer people to.&amp;#160; You can use pretty much all of these with SharePoint 2010 or MOSS 2007 right out of the box (once you crawl).&lt;/p&gt;  &lt;p&gt;The &lt;strong&gt;ContentSource &lt;/strong&gt;keyword is incredibly powerful.&amp;#160; You can use it to verify that results exists for a given content source.&amp;#160; For example, if you were having issue crawling a file share and you wanted to see if any results were present or not, you could use this keyword.&amp;#160; Start by identifying the content source in question on your content sources page in your Search Service Application.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchContentSources_6856230E.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchContentSources" border="0" alt="EnterpriseSearchContentSources" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchContentSources_thumb_32712DF4.png" width="509" height="193" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Note the spelling of your content source exactly.&amp;#160; If I wanted to return everything from the file share, I would issue this query.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;ContentSource:”File Share”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;On my server I get results like this.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsFileShareContentSource_5F19E7CD.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchResultsFileShareContentSource" border="0" alt="EnterpriseSearchResultsFileShareContentSource" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsFileShareContentSource_thumb_167FF8FC.png" width="566" height="346" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Keep in mind that you can combine these keywords with other ones.&amp;#160; For example if I only want accounting documents on the file share, it would look like this.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Accounting ContentSource:&amp;quot;File Share&amp;quot;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsFileShareAccountingContentSource_7F9101B2.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchResultsFileShareAccountingContentSource" border="0" alt="EnterpriseSearchResultsFileShareAccountingContentSource" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsFileShareAccountingContentSource_thumb_376345D6.png" width="568" height="262" /&gt;&lt;/a&gt; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;To query all documents on the SharePoint site itself, you could use a query against the &lt;em&gt;Local SharePoint Sites (Local Office SharePoint Sites&lt;/em&gt; on MOSS 2007&lt;em&gt;)&lt;/em&gt; content source.&amp;#160; Be warned that this could return a large number of results.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;ContentSource:”Local SharePoint Sites”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Another property, more people are more familiar with is &lt;strong&gt;IsDocument&lt;/strong&gt;.&amp;#160; This handy property is a great way to filter out items that are not documents (i.e.: folders, list items, and pages).&amp;#160; You pass a value of 1 for true.&amp;#160; In the example below, I return all documents on my SharePoint server.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;IsDocument:”1”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsIsDocument_3D3DE96F.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchResultsIsDocument" border="0" alt="EnterpriseSearchResultsIsDocument" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsIsDocument_thumb_40FB8E3F.png" width="568" height="356" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you have spent time building custom scopes, you might be interested in the &lt;strong&gt;Scope &lt;/strong&gt;keyword.&amp;#160; This makes it easy to query everything in your scope at once.&amp;#160; You can use this to build advanced queries or just for simple troubleshooting of the scope.&amp;#160; In this example, I have a scope with rules only to show items from a BCS content source with a property called Color set to red.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Scope:”Red Products”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsScope_4CDD32D9.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchResultsScope" border="0" alt="EnterpriseSearchResultsScope" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsScope_thumb_3DC653FF.png" width="564" height="242" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;A lot of times people ask questions about how to just show results for a given site or site collection.&amp;#160; Maybe even a specific document library.&amp;#160; You can do that with contextual search, but you can also do that with the &lt;strong&gt;Site&lt;/strong&gt; keyword as well.&amp;#160; Simply pass it the URL to the specific point on your site and it will filter the results.&amp;#160; For example, if I just want to see results from my ECM subsite, I would use the following query.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Site:”http://sp2010/ecm”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsSite_11A9570E.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchResultsSite" border="0" alt="EnterpriseSearchResultsSite" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsSite_thumb_2B99C4D8.png" width="577" height="312" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Sometimes you might want to see all documents a particular user modified.&amp;#160; The &lt;strong&gt;author &lt;/strong&gt;keyword is a great way to find things when you want to see all documents from someone that recently left the company.&amp;#160; For example, to see all of the documents by our fictitious CFO, Christina Murphy, we would use this query.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Author:”Christina Murphy”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsAuthor_77852584.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchResultsAuthor" border="0" alt="EnterpriseSearchResultsAuthor" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsAuthor_thumb_1F87AED7.png" width="586" height="365" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you know you only want to see documents of a certain content type, why not query for it? You can with the &lt;strong&gt;ContentType&lt;/strong&gt; keyword.&amp;#160; For example to search all documents of my custom type called &lt;em&gt;Custom Document&lt;/em&gt;, I would use the following query.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;ContentType:”Custom Document”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsContentType_21E130D5.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchResultsContentType" border="0" alt="EnterpriseSearchResultsContentType" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsContentType_thumb_1F57FF17.png" width="593" height="355" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can also write queries based on list template such as a document library, task list, or your own &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/03/31/how-to-create-a-scope-for-a-custom-list-template-type.aspx"&gt;custom list template&lt;/a&gt; with the &lt;strong&gt;ContentClass&lt;/strong&gt; keyword.&amp;#160; Simply use any known content class with the keyword (here is a &lt;a href="http://www.devcow.com/blogs/jdattis/archive/2007/12/20/the-contentclass-and-isdocument-properties-along-with-the-welcome-page-caveat.aspx"&gt;list&lt;/a&gt;).&amp;#160; For example, to search only items in a task list, I would issue the following query.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;ContentClass:”STS_ListItem_Tasks”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsContentClass_4ABC2011.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchResultsContentClass" border="0" alt="EnterpriseSearchResultsContentClass" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsContentClass_thumb_028E6435.png" width="591" height="300" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Want to see a query that only has Excel spreadsheets? No problem.&amp;#160; Use the &lt;strong&gt;FileType&lt;/strong&gt; keyword.&amp;#160; Don’t include the period on the extension.&amp;#160; You can use multiple FileType keywords together to span multiple types (i.e.: xlsx and xls).&lt;/p&gt;  &lt;p&gt;&lt;em&gt;FileType:”xlsx”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsFileType_5A2F0C13.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchResultsFileType" border="0" alt="EnterpriseSearchResultsFileType" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsFileType_thumb_3CD9B449.png" width="596" height="261" /&gt;&lt;/a&gt; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The last keyword I will cover is &lt;strong&gt;Write&lt;/strong&gt;.&amp;#160; You use it to query documents based on modification date.&amp;#160; You can’t take full advantage of this keyword in MOSS 2007, but in SharePoint 2010, you can do some cool things by using the new operators &amp;gt;,&amp;lt;,&amp;gt;=,&amp;lt;=.&amp;#160; This allows you to write queries to see all documents written since the beginning of the month for example.&amp;#160; Your date should be in quotes and make sure there is no space between the keyword and the date itself.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Write&amp;gt;”7/1/2010”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsWrite_544442AD.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EnterpriseSearchResultsWrite" border="0" alt="EnterpriseSearchResultsWrite" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/EnterpriseSearchResultsWrite_thumb_3E0E275B.png" width="589" height="260" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;These are all keyword I use on a regular basis.&amp;#160; Remember you can combine most of these together to provide vary narrow search results.&amp;#160; You could also make use of these by writing your own &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/03/09/how-to-build-a-custom-advanced-search-control-for-enterprise-search.aspx"&gt;advanced search control&lt;/a&gt;.&amp;#160; I hope these queries are useful the next time you use Enterprise Search.&amp;#160; If you can think of any other good ones I left out, please leave a comment.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3755" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/l-LfXReFpJQ" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/20/some-handy-keywords-you-might-find-useful-in-sharepoint-enterprise-search.aspx</feedburner:origLink></item><item><title>Bringing my PowerShell talk to Oklahoma City next Monday</title><link>http://feedproxy.google.com/~r/CoreysDotNetTipOfTheDay/~3/IwslwvV-nJg/bringing-my-powershell-talk-to-oklahoma-city-next-monday.aspx</link><pubDate>Tue, 20 Jul 2010 18:32:06 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3753</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=3753</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/20/bringing-my-powershell-talk-to-oklahoma-city-next-monday.aspx#comments</comments><description>&lt;p&gt;I am excited to say that I am returning to Oklahoma City next Monday (7/26) to speak about using PowerShell with SharePoint.&amp;#160; This fun talk will show you just enough PowerShell to be dangerous.&amp;#160; You will learn the basics of using it, how to write scripts, and even see how to build a cmdlet.&amp;#160; The talk is at &lt;a href="http://www.okccoco.com/"&gt;OKC CoCo&lt;/a&gt; at 6 pm.&amp;#160; I look forward to seeing you all then.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3753" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CoreysDotNetTipOfTheDay/~4/IwslwvV-nJg" height="1" width="1"/&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/OKC+SharePoint+Users+Group/default.aspx">OKC SharePoint Users Group</category><feedburner:origLink>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/20/bringing-my-powershell-talk-to-oklahoma-city-next-monday.aspx</feedburner:origLink></item></channel></rss>
