Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

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

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=1.0.0.1, 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

1 Answer 1

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=1.0.0.1, Culture=neutral, 
   PublicKeyToken=77c336623989b56c" 
   Namespace="AA.PeopleEditorAD.**Controls**" 
   TypeName="*" 
   Safe="True" 
   SafeAgainstScript="False" /> 

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

<SafeControls>
    <SafeControl Assembly="$SharePoint.Project.AssemblyFullName$"
        Namespace="AA.PeopleEditorAD.Controls" 
        TypeName="*" />
</SafeControls>
share|improve this answer

Your Answer

 
discard

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.