执行 Install-SPUserSolution powershell命令时,会显示以下错误:
Install-SPUserSolution:沙盒代码执行请求失败。 在行:1 char:23 + Install-SPUserSolution<<<< -Identity some_package.wsp -Site
http://localhost/sites/test
+ CategoryInfo:InvalidData:(Microsoft.Share ... allUserSolution: SPCmdletInstallUserSolution)[Install-SPUserSolution],SPUserCodeExecu ... F ailedException + FullyQualifiedErrorId:Microsoft.SharePoint.PowerShell.SPCmdletInstallU serSolution
当我尝试从SharePoint界面激活用户解决方案时,一切正常。所以这不仅仅适用于PowerShell。我尝试在不同的帐户(管理员帐户)下运行用户代码服务,但这没有帮助。目前,此服务正在网络服务帐户下运行。
另外,当我运行Add-SPUserSolution或Uninstall-SPUserSolution时,它们的工作正常。我能够在至少两台服务器上重现此问题。请指教。
[UPD] 我包括来自SharePoint日志的完整堆栈跟踪
沙盒代码执行请求失败。 - 内部异常:System.InvalidOperationException服务器堆栈跟踪:Microsoft.SharePoint.Utilities.Verify.IsTrueTag上的Microsoft.SharePoint.Utilities.Verify.DoFailTag(UInt32标记,ULSCat类别,类型类型,字符串格式,对象[] args) System.Runtime上的Microsoft.SharePoint.UserCode.SPUserCodeExecutionHost.Execute(类型为userCodeWrapperType,Guid siteCollectionId,SPUserToken userToken,String affinity,SPUserCodeExecutionContext executionContext)中的UInt32标记,ULSCat类别,布尔表达式,类型类型,字符串格式,对象[] args) System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg,Int32)中的.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md,Object [] args,Object server,Int32 methodPtr,Boolean fExecuteInContext,Object []& outArgs) methodPtr,Boolean fExecuteInContext)在[0]处重新抛出异常:在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage r) System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke上的etMsg(MessageData& Microsoft.SharePoint.UserCode.SPUserCodeExecutionManager.Execute的Microsoft.SharePoint.Administration.ISPUserCodeExecutionHostProxy.Execute(类型userCodeWrapperType,Guid siteCollectionId,SPUserToken userToken,String affinityBucketName,SPUserCodeExecutionContext executionContext)中的msgData,Int32类型)(类型userCodeWrapperType,SPSite site,SPUserCodeExecutionContext executionContext )