People Search in FAST returning no results

17. November 2011 04:19 by Tal in   //  Tags:   //   Comments (0)

Recently we came across an issue with our SharePoint 2010 people search. It did not work. The All Site scope worked fine but the people search scope did not return any results. We were using SharePoint 2010 FAST search.

The people scope with FAST search was in FAST Query SSA (How does People Search work using Fast?). We needed to look at the FAST search configuration in Central Admin: Manage Service Applications >> Service Applications


We made sure that the Content Sources of the FAST Query SSA had the Start Address set to: sps3://<server name>

We run a full crawl on this content  source. At the end of the crawling process the Crawl Log had one Error: Access denied ..

The Crawler could not access the User Profile. To solve this we needed to allow the crawler access to the User Profile Application. This was done through -  Manage Service Applications >> Service Applications >> User Profile Application. Then add the permission “Retrieve People Data for Search Crawlers” to the account which run the FAST Query SSA.

 Finally we re-run full crawl on the FAST Query SSA.



SharePoint 2010 – Make Content and Structure work

17. November 2011 03:41 by Tal in   //  Tags:   //   Comments (0)

The Issue:

Content and Structure did not work. As we clicked on Site Settings > Manage Content and Structure we received the SharePoint 2010 error page.

The Tools:

Starting with a newbie tool: Microsoft SharePoint 2010 Administration Toolkit v2.0

This tool came highly recommended for performing diagnostics. We used SharePoint Diagnostic Studio for connecting to SharePoint 2010 logs. This tool run with Administrator privileges only (right click – Run as administrator )

The goodie – This tool could save looking into the file system. It came with some SharePoint 2010 reports – that looked impressive.

The baddie – It took several minutes to connect. It did not refresh the logs and needed to re-open to reload new logs.

The Clue:

Someone suggested we look into the SharePoint lists to make sure they were working. We clicked on each list and library until we discovered the corrupted list.

One list returned the SharePoint 2010 error page.  How could we remove this list if we could not access it? We tried accessing it from SharePoint 2010 Designer but it did not appear under All Files/Lists. We tried removing it using SharePoint Manager 2010 but received an error message.

This is the error we got when trying to delete the list:
Error log "Failed to determine the setup path of the list schema for feature {123546-423432}, list template

The Solution:

SharePoint 2010 Management Shell (PowerShell).

First we looked for this feature on our site:
Get-SPFeature | Sort - Property Id

This feature was not on our site. Clearly, SharePoint told us already that this feature was missing.

We had to remove the list with force, using PowerShell delete command:

$w = Get-SPWeb "http://hostname
$w.Lists.Delete([System.Guid]$w.Lists["List Name"].ID)

The Conclusion:

We could open and view Site Content and Structure.

SharePoint 2010 event receiver–The ins and outs

22. July 2011 06:57 by tal in   //  Tags:   //   Comments (0)

So you wants to add an event receiver to a list to check column permissions. Your immediate reaction will be “easy no problems, I’m keen to start now”. Consider all the implication of this task. I thought initially, event receivers in SharePoint 2010 should be easy to implement. But then I learned that there are many “things” to know for this task. I decided to prepare a list with all the road blocks I encountered during this project.

Here are some tips for creating a new event receiver in SharePoint 2010:

1. There are lots of information about creating an event receiver SharePoint 2010.

2. You want your receiver to work on a specific list, not on a list type.  Your element.xml should fix it:
<Receivers ListUrl="<List Name>">

3. You want to make sure that the receiver is deployed as a farm solution. If we select Sandbox solution, this option is very restrictive and does not allow access to certain SharePoint features. So click on your project and view the properties window (F4). Then set “Sandbox solution” to “False”.

Also if you want to deploy to a single site use “Site URL” in the properties menu.

4. To deploy and package your solution you can use “Deploy” and “Package” in the Visual Studio 2010 on project’s right click.  Do not use the WSBuilder sub menu.

5. To debug use the WSBuilder sub menu and select “Attach to IIS Worker Process”, then enter your breakpoints.

6. I wanted to make sure that system admin have full permission:
using (SPWeb currentWeb = properties.OpenWeb())
        if (currentWeb.CurrentUser.IsSiteAdmin) return;

7. You want to add debugging information to your code. This is another reason why you should not use sandbox solution. Consider these quotes:
Dashboard diagnostics:  “Even if you use SPMonitoredScope, if your code is a sandbox component (i.e. a User Solution), the output from it will not be captured in Developer Dashboard.  The reason it doesn’t get captured is that sandbox components execute in a completely different process from the page request – that’s why it’s sandboxed
Log diagnostics: “Unfortunately the ability to interact with a custom SPDiagnosticsService is available only in fully trusted farm solutions and not within sandbox solutions. To write to the ULS logs using the SPDiagnosticsService class from the sandbox, developers can create a fully trusted proxy that the sandbox solutions can call into. The next two sections demonstrate how to write to the SharePoint ULS logs.”

But all is not lost, you can still save to SharePoint Log:
using Microsoft.Office.Server.Diagnostics;

8. The example I prepared is for firing an event when updating an item:
public override void ItemUpdating (SPItemEventProperties properties)


9. Sometimes you may need to active/deactive your feature from the site collection.

10. You definitely want to have a custom error page to indicate your user that something happened. You can learn how to create a custom error page  from here. For example:
properties.Cancel = true;
properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl;
properties.RedirectUrl = "/_layouts/<folder name>/<>page name.aspx?error=Update failed.";

11. The message in DataSheet view is not as you expected. I have no solution for making a nicer error message.

12. Using the properties.AfterProperties you want to determine if the item has been modified during this update. Consider what I had to do to get the correct column:
string internalColumnName = XmlConvert.DecodeName(properties.List.Fields.GetField(columnName).InternalName);
if (properties.AfterProperties[internalColumnName] != null) newValue = properties.AfterProperties[internalColumnName].ToString();

Yes, there is a different name for the list column displays and the actual SharePoint column name. This is especially true if you rename an existing column The XMLConverter decode columns names , e.g. Date_x0020_Modified. This link has good explanation.

13. For security reasons, a SharePoint designer workflow always runs under the permissions of the user who started the workflow. You want to prevent the user from updating certain column in the list, but you also want your SharePoint Designer workflow to update the same columns. Two possible solutions, you can use a hidden field to indicate to the event receiver that the workflow is updating the field. You can toggle the hidden field before and after the item update. Another solution is to us user Impersonation Step and run the workflow as farm account. The second solution may not be your preference, because it will save the “Modified By” as the farm account.

These are the 13 new knowledge points which I gained during this project.


MySites Feature Stapling

22. June 2009 10:54 by tal in   //  Tags:   //   Comments (0)

I have recently used MySiteCreate 1.0 Production from Community Kit for SharePoint to apply a new Master page to MySites.

You can visit CodePlex  to download MySiteCreate feature:

This feature site template associate new features and functionality to existing templates.

Two features involved in the process:

o "Staplee" feature: This feature contains the functionality that you want to add to an existing site template.

o "Stapler" feature: This feature contains the "FeatureSiteTemplateAssociation" XML tags which bind the Staplee feature to a particular site template. Basically, it’s a feature that says “for all Personal Sites provisioned henceforth, they shall have the staplee feature.”

This solution worked beautifully in a SharePoint website we did for a client.

Step 1: Copy the Feature to Features folder:

Copy MySiteStaplee and MySiteStapler folders to corresponding feature folder in 12 hive:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\

Step 2: MySite setup default master page.

Create a new customised Master page with the look and feel that will be applied to MySites.

I started with the top Site Collection Master page, taken from SharePoint Designer, then I have applied the new layout to this page. I saved this page under MySiteStaplee feature folder (default.master).

Change MySiteStaplee/feature.xml to the location of your default master file:

        <Property Key="MasterName" Value="default.master"/> 

Note that if you copy the Master file using SharePoint designer it inserts some unwanted characters, the best solution is to copy the content (ctrl c) and paste (ctrl v) into the new Master file.

Step 3: Run installation and activation for MySiteStaplee and MySiteStapler  features:

· Install and activate the MySiteStaplee feature by running Install.bat; it uses the installfeature and activatefeature switches with stsadm to do so. When you activate it, do so to the web application that hosts MySites.

· Add the two assemblies that were created (the feature activation assembly and the custom ASP.NET web part assembly) to the Global Assembly Cache.

· Add the following SafeControl entry to the web.config for the web application that hosts My Sites:

<SafeControl Assembly="MySiteCreatePart, Version=, Culture=neutral, PublicKeyToken=cb1bdc5f7817b18b" Namespace="Microsoft.IW" TypeName="*" Safe="True" AllowRemoteDesigner="True" />

Step 4: Create MySite for a user:

Click MySite and view the created MySite using new master pages.

If something went wrong then MySite will not show, this may be because your Master page may be corrupted. You can always delete MySite using either actions (below) then update the Master file and create new MySite:
Go to the URL for Mysite:
Run the Command:  stsadm -o deletesite –url

Webcoda, SharePoint Consultants & Web Development

SharePoint Development Sydney is a crack team of SharePoint Consultants and SharePoint Developers.

We can't tell you their names or show their faces on TV but if you need a SharePoint job done right, call them on +61 2 9370 3602 or email us at

Persecuted by the Government and shunned by society they developed their SharePoint skills in back streets and labor camps where other programmers wouldn't dare to tread. 

During a trek through the Himalayas they stumpled upon the fabled Mossy Yak who shared his SharePoint knowledge of how to attain Nirvana through a series of Workflows and Event Handlers. Their mission is to spread this knowledge through-out the world to bring peace, harmony and document version control to all .


Month List