Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2010 Microsoft.SharePoint.WebControl.SPRibbon在SharePoint沙盒解决方案中不工作?_Visual Studio 2010_Sharepoint 2010_Ribbon Control - Fatal编程技术网

Visual studio 2010 Microsoft.SharePoint.WebControl.SPRibbon在SharePoint沙盒解决方案中不工作?

Visual studio 2010 Microsoft.SharePoint.WebControl.SPRibbon在SharePoint沙盒解决方案中不工作?,visual-studio-2010,sharepoint-2010,ribbon-control,Visual Studio 2010,Sharepoint 2010,Ribbon Control,我想在沙盒解决方案中使用Webpart创建上下文选项卡。当我添加自定义Webpart时,我收到如下错误: Web部件错误:部分信任应用程序域中沙盒代码包装器的Execute方法引发了未经处理的异常:发生了意外错误 在我的Web部件的代码中 Microsoft.SharePoint.WebControls.SPRibbon.GetCurrent(this.Page).MakeTabAvailable("MyProject.Ribbon.HelloTab"); 是否有其他方法可以创建自定义功能区

我想在沙盒解决方案中使用Webpart创建上下文选项卡。当我添加自定义Webpart时,我收到如下错误:

Web部件错误:部分信任应用程序域中沙盒代码包装器的Execute方法引发了未经处理的异常:发生了意外错误

在我的Web部件的代码中

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

是否有其他方法可以创建自定义功能区选项卡?

不允许在沙箱中更改功能区。您必须选择可用的选项

  • 使您的解决方案成为场解决方案(从而授予它必要的权限)
  • 使用沙箱代理在功能区上执行步骤(请参见)