1

I wanna create Contextual Tab using Webpart In Sandbox Solution..that time I am getting Error as below When i am added Custom-Webpart :

Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.

In My Webpart's Code

Microsoft.SharePoint.WebControls.SPRibbon.GetCurrent(this.Page).MakeTabAvailable("MyProject.Ribbon.HelloTab"); 

Is there another way to Solution To create Custom Ribbon Tab?

Jignesh Rajput
  • 3,538
  • 30
  • 50

1 Answers1

0

Altering the ribbon is not permitted from within the sandbox. You have to options available to you.

  1. Make your solution a farm solution (thereby giving it the necessary permissions)
  2. Use a sandbox proxy the perform the steps on the ribbon (see MSDN)
Chris Felstead
  • 1,170
  • 1
  • 9
  • 19