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

In extension to this question of mine, If I put location of custom action as

"Location="Microsoft.SharePoint.StandardMenu"

it gives me error

Failed to create a control from assembly '', class '': The control with assembly name '', ' class name '' is not allowed for web at URL ''. The type is not registered as safe.

however it works for most I tried in here

Edit

Elements.xml

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Control
  ControlAssembly="abc3333.myworkspacename, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d702315f0f3475cf"
  ControlClass="abc3333.myworkspacename.FeatureFolderName.ClassName"
  Sequence="1"
  Id="AdditionalPageHead"/>

  <CustomAction
      Id="CustomActionName"
      Title="My Custom Action 2"
      Location="Microsoft.SharePoint.StandardMenu"
      RegistrationId="101"
      RegistrationType="List"
      GroupId="ActionsMenu"
      ImageUrl="/_layouts/images/abc.gif"
      ShowInLists="TRUE"
      Sequence="1000"
      ControlAssembly="abc3333.myworkspacename, Version=1.0.0.0, Culture=neutral,                        PublicKeyToken=d702315f0f3475cf"
      ControlClass="abc3333.myworkspacename.FeatureFolderName.ClassName">
  </CustomAction>

</Elements>

Now If I remove ControlAssembly or ControlClass from CustomActions then it stops giving me error and shows my new action in action menu but then I won't be able to do any action, now if I change location and groupId and keep assembly in it then it does work as well.

So I guess GroupID "ActionsMenu" doesn't take control assembly as safe control or something, I think I am missing some concept.

share|improve this question
    
what Custom Action Group ID did you put in? –  ali Sharepoint Nov 12 '12 at 14:41

1 Answer 1

up vote 0 down vote accepted

My User control class wasn't declared as public, so WSP Builder wasn't adding it as a safe control to web.config neither in Manifest.xml.

Many thanks to comments in this Article by Terry R Not sure who that is personally but solved my issue :).

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.