3

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.

  • what Custom Action Group ID did you put in? – Ali Jafer Nov 12 '12 at 14:41
0

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 :).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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