SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a package which deploys a custom people picker dll. It also should add the safe control entry to the web.config but its not doing it.

    <Assembly Location="AA.PeopleEditorAD.dll" DeploymentTarget="GlobalAssemblyCache">
        <SafeControl Namespace="AA.PeopleEditorAD.Controls" TypeName="*" />
    <Assembly Location="MyCompany.HomeWebTemplate.dll" DeploymentTarget="GlobalAssemblyCache" />

I cleaned, rebuild, repackage, and then update the solution but it didnt update the web.config.

So I went ahead and I did it manually.

<SafeControl Assembly="AA.PeopleEditorAD, Version=, Culture=neutral, PublicKeyToken=77c336623989b56c" Namespace="AA.PeopleEditorAD" TypeName="*" Safe="True" SafeAgainstScript="False" />

well, this didnt work either, everytime I try to use the custom people picker I got the error: Only people picker dialogs types can be used with dialog. The type should be configured as safecontrol in this site.

I also tried removing the safecontrol and adding it back.

Update 1: Full exception in the log

Microsoft.SharePoint.SPInvalidPropertyException: Only PickerDialog types can be used with the dialog. The type should be configured as a safecontrol in this site.    at Microsoft.SharePoint.ApplicationPages.Picker.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
share|improve this question
there are 2 URLS for my site, one local and one for internet, I added manually the entry in the web.config for both. – Esteban V Apr 12 '12 at 8:28
up vote 1 down vote accepted

It looks like you mixed up the namespace when you added it manually to your web.config file. You do not have the .Controls namespace specified in your packaging file above. Try this:

<SafeControl Assembly="AA.PeopleEditorAD, 
   Version=, Culture=neutral, 
   SafeAgainstScript="False" /> 

Also, when adding safecontrol setting to the manifest in Visual Studio, you need to specify the assembly as well as the namespace:

    <SafeControl Assembly="$SharePoint.Project.AssemblyFullName$"
        TypeName="*" />
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.