Jan 21, 2011

Create a single Search Scope for SharePoint site, File Shares and People

You might wonder why not just use "All Sites"? A large SharePoint Farm normally includes multiple sharepoint applications with distinct users, users in one application are only interested in finding contents from their own application, not all contents in the farm. Also SharePont search scope generally confuse regular users even though it sounds well technically. So it is often desired to use only single scope which can cover all and only contents for a particular business unit, and those contents normally include file shares and also people in the whole organization.

How to do this?

this scope has to be created at service level, rather than site collection level since it includes file shares
  •    In Site collection, Search Setting, choose "enable Custom scope" and drop down Mode as:


  • In Site Collection, Search Scope, Modify Search Dropdown Display Group to display only one single search scope created in the above step
  • Create a Search Result Pages:
    • use Search Result Page Layout (only avaiable in Enterprise Search center site template) , which gives you most web parts on the page
    • Edit "Search Box" web part as follows:

    • Edit "Search Core Results" as follows:

    • insert "Refinement Panel" Web part and Customize it. see this blog for details
    • insert "People Search Core Results" and modify "cross-web part query id" property

By now, your single search goal is accomplished, but you might notice that the search center has no branding and navigation, as it is using minimal.master. Don't try to replace its master page as described in this blog.

Jan 11, 2011

Some notes on SharePoint 2010 Session State

SharePoint 2010 have Session State disable by default, in contrast, SharePoint 2007 has Session State enabled by default.

why? does not SharePoint 2010 need any session state?

but first, what is the session state? Session state is a part of state management. State management is the information that ASP .Net need before processing page request, i,e, what is the values of controls or variable on the page? Those infomation is normally handled by mechanics such as View State, Query String, Hidden Fields.. Those are called client side mechanics because the data is stored at client side. Session State is different in that it is server side (only session id is sent to client via cookie or query string) and its main purpose is to remember if a request is a new or existing one by session ID.

So why SharePoint 2010 don't need session id? SharePont Form service needs session state (SP State Service) in the scenario of multi-page forms, other than that SharePoint doesn't need to track session ID in general. Turning on Session state can potentially degrade performance as SharePoint does not automatically remove old session state records from the session state database tables, and there is only one session database for sharepoint farmwise. see Todd Carter's blog for cautions while using SharePoint Session.

what is the implication of this new setting in sharepoint 2010? It now becomes recommendation that affinity or Sticky session be set for Load Balancer. See this blog from SharePoint Joe.

Jan 7, 2011

data in Managed Meta Column won't update

If you change managed meta data term in the central admin, and you will find the data in Managed Meta Column won;t update until up to one hour. By now,you should be easily guess that it is controlled by a hourly timer job. Yes and its name is Taxonomy Update Scheduler. This did take me some time finding out, so I hope blogging it here can save someone one hour.

Jan 5, 2011

Visual Studio 2010 deployment: Error occurred in deployment step 'Activate Features': Feature with Id '320ed40e-cf38-493b-9bc3-7fd3b01e8524' is not installed in this farm, and cannot be added to this scope.

If you get this error while deploying from Visual  Studio 2010, the chances are you have a multiple-servers farm, and Visual Studio can only deploy the solution to its local server.