問題タブ [sandbox-solution]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
sharepoint - サンドボックス ソリューションに含まれる Web パーツを含む Web パーツ ページを作成する方法
これを使用して、サンドボックス ソリューションで wiki ページを作成できることを知っています。
しかし、(可能であれば) ドキュメント ライブラリに含まれる Web パーツを含む Web パーツ ページを作成するにはどうすればよいでしょうか? 私が見つけることができるのは(このように)ファームソリューションでのみ機能しているためです。どういうわけか回避策はありますか?
注意: この質問をここに投稿するのは、Sharepoint サイトよりもはるかに多くの人がここにいるためです。
sharepoint - サンドボックス化された SharePoint ソリューションのエラー処理戦略
サンドボックス化された Web パーツを利用する SharePoint ソリューションのエラー処理戦略を開発しようとしています。私は当初、この記事に基づいた一般的な例外処理アプローチを検討していましたが、これはサンドボックス化された Web パーツでは機能しません。未処理の例外がサンドボックスでスローされると、ユーザー コード サービスが制御を引き継ぐように見えるため、基本 Web パーツの例外処理には到達しません。サンドボックス ソリューションの確立されたエラー処理方法はありますか?
表示されるエラー メッセージをよりユーザー フレンドリーなメッセージに変更するためだけに、未処理の例外がサンドボックス化された Web パーツでスローされたときを判断する方法を知っている人はいますか? 少なくとも、標準の " Web パーツ エラー: 未処理の例外が、部分信頼アプリ ドメインのサンドボックス化されたコード ラッパーの Execute メソッドによってスローされました: 予期しないエラーが発生しました" メッセージを置き換えたいと思います。
ありがとう、マジックアンディ。
sharepoint - サンドボックスソリューションWebパーツをSharepoint2010のページに追加するときにエラーが発生しました
サンドボックス化されたWebパーツをコンパイルし、Sharepoint2010サーバーに展開しました。ただし、ページに追加しようとすると、次のエラーが発生します
未処理の例外が、部分信頼アプリドメインのサンドボックス化されたコードラッパーのExecuteメソッドによってスローされました:$ Resources:core、ImportErrorMessage
以下にサンドボックス化されたWebパーツコードを含めました。このエラーを修正する方法、または問題の原因を特定する方法がわかりません
}
sharepoint-2010 - 展開ステップでソリューションの追加でエラーが発生しました
サンドボックス ソリューションの SharePoint 2010 (SharePoint Online プロジェクト) に取り組んでいます。
私が得るエラーは
Visual Studio のマニフェスト ファイル (Package.package) は次のようになります。
「Solution」要素から「CodeAccessSecurity」タグを削除すると、ソリューションがデプロイされ、VS から問題なくアクティブ化されます。Web からソリューションをアクティブ化できません。試してみました。
このソリューションには、LINQ を使用して他のリストからデータを取得し、リストに新しいリスト アイテムを作成する 1 つの Web パーツが含まれています。
「ソリューション」に「CodeAccessSecurity」タグを追加しました。これがないとエラーが発生したためです
コードが新しいリスト項目を作成しようとすると、上記のエラーが発生します。
サンドボックス化されたビジュアル Web パーツを使用しています。
「ソリューション」から「CodeAccessSecurity」子要素を削除しても、ソリューションは問題なくアクティブ化されますが、新しいリスト項目を作成できません。LINQ to SharePoint を使用して新しいリスト アイテムを作成しています
visual-studio-2010 - SharePoint でサンドボックス ソリューションが優先されるのはいつですか?
SharePoint サンドボックス ソリューションとファーム ソリューションの比較、および Visual Studio 2010 でのビジュアル Web パーツ (ファーム ベース) と Web パーツ (サンドボックス ソリューション) のデモを示す多くの記事を参照してきましたが、ファーム ベース開発 (Visual Studio を使用) のようです。その展開は、開発者にとってはるかに好ましい方法です。間違っていたら訂正して
さらに、サンドボックス ソリューションはファーム ソリューションに制限されます。したがって、開発者がサンドボックス方式を使用してソリューションを開発/展開することを好むシナリオはどれですか?
sharepoint - Sharepointイベントレシーバーとlinqからsharepoint
サンドボックスソリューションがあり、Linq-to-Sharepointを使用していくつかのリストにアクセスします。101
画像ライブラリにアップロードするファイルを制限する必要があるため、リストタイプにイベントレシーバーをアタッチしました。これは正常に機能します。
しかし、新しいアイテムをリストに挿入しようとすると、Linq-to-Sharepointがエラーをスローするようになりました(Linqの場合のみ、通常のユーザーインターフェイスを介してそのリストに新しいアイテムを作成すると正常に機能します)。
エラーは0x81020089
メッセージにありますThe sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request.
が、ホストサービスがビジー状態ではなく、0x81020089がイベント受信者の問題の一種であるため、メッセージはデフォルトです。
イベントレシーバーを接続しない場合はすべて正常に機能しますが、接続するとエラーが発生します。イベントレシーバーにコードがまったくない場合でも同様です。
何か案は?
エラーメッセージ
0x81020089サンドボックスコードホストサービスがビジー状態でリクエストを処理できないため、サンドボックスコード実行リクエストが拒否されました。
サーバースタックトレース
- Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)で
- Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl、String bstrListName、Boolean bAdd、Boolean bSystemUpdate、Boolean bPreserveItemVersion、Boolean bUpdateNoVersion、Int32&plID、String&pbstrGuid、Guid pbstrNewDocId、Boolean bHasNewDocId、String bstrVersion、Object&pvar Object&pvarProperties、Boolean bCheckOut、Boolean bCheckin、Boolean bMigration、Boolean bPublish、String bstrFileName、ISP2DSafeArrayWriter pListDataValidationCallback、ISP2DSafeArrayWriter pRestrictInsertCallback、ISP2DSafeArrayWriter pUniqueFieldCallback)
- Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd、Boolean bSystem、Boolean bPreserveItemVersion、Boolean bNoVersion、Boolean bMigration、Boolean bPublish、Boolean bCheckOut、Boolean bCheckin、Guid newGuidOnAdd、Int32&ulID、Object&objAttachmentNames、Object&objAttachmentContents、 )。
- Microsoft.SharePoint.SPListItem.UpdateInternal(ブールbSystem、ブールbPreserveItemVersion、Guid newGuidOnAdd、ブールbMigration、ブールbPublish、ブールbNoVersion、ブールbCheckOut、ブールbCheckin、ブールsuppressAfterEvents、文字列ファイル名)
- Microsoft.SharePoint.SPListItem.Update()で
- Microsoft.SharePoint.SPListItem_SubsetProxy.Update__Inner()で
- System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md、Object [] args、Object server、Int32 methodPtr、Boolean fExecuteInContext、Object []&outArgs)で
- System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg、Int32 methodPtr、Boolean fExecuteInContext)で
sharepoint - SPUserCodeSolutionExecutionFailedException
Webパーツ(Linqを介してデータをロードしますが、それは私が思うポイントではありません)を使用した単純なサンドボックスソリューションがあり、開発マシンではすべてが正常に機能します。
このソリューションを別のマシンにインストールしてWebパーツをページに追加すると、次の例外が発生します。しかし、なぜ、何をすべきかわかりません。スタックトレースにアプリケーションへの参照が表示されないため、ソリューションとは関係がないと思います。
何か案が?
Webパーツエラー:部分信頼アプリドメインでサンドボックス化されたコードラッパーのExecuteメソッドによって未処理の例外がスローされました:予期しないエラーが発生しました。
[SPUserCodeSolutionExecutionFailedException:部分信頼アプリドメインのサンドボックス化されたコードラッパーのExecuteメソッドによって未処理の例外がスローされました:予期しないエラーが発生しました。]
サーバースタックトレース:
Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType、SPUserCodeCachedAssemblyGroup userAssemblyGroup、Guid siteCollectionId、Byte [] binaryUserCodeToken、Byte [] proxyOperationToken、SPUserCodeExecutionContext executeContext、Boolean shouldUsageLog、Int32 currentProcessId)
Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType、SPUserCodeCachedAssemblyGroup userAssemblyGroup、Guid siteCollectionId、Byte [] binaryUserCodeToken、Byte [] proxyOperationToken、SPUserCodeExecutionContext executeContext、Boolean shouldUsageLog、Int32 currentProcessId)
Microsoft.SharePoint.UserCode.SPUserCodeAppDomain.Execute(Type userCodeWrapperType、SPUserCodeCachedAssemblyGroup userAssemblyGroup、Guid siteCollectionId、Byte [] binaryUserCodeToken、Byte [] proxyOperationToken、SPUserCodeExecutionContext executeContext、Boolean shouldUsageLog、Int32 currentProcessId)
Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcessProxyForShim.ExecuteInternal(Type userCodeWrapperType、SPUserCodeCachedAssemblyGroup userAssemblyGroup、Guid siteCollectionId、Byte [] binaryUserCodeToken、Byte [] proxyOperationToken、SPUserCodeExecutionContextexecutionContext)で
Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcessProxy.Execute(Type userCodeWrapperType、SPUserCodeCachedAssemblyGroup userAssemblyGroup、Guid siteCollectionId、Byte [] binaryUserCodeToken、Byte [] proxyOperationToken、SPUserCodeExecutionContext executeContext)
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md、Object [] args、Object server、Int32 methodPtr、Boolean fExecuteInContext、Object []&outArgs)で
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg、Int32 methodPtr、Boolean fExecuteInContext)で
[0]で再スローされた例外:
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg、IMessage retMsg)で
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&msgData、Int32 type)で
Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcess.ExecuteDelegate.EndInvoke(IAsyncResult result)で
Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcess.Execute(Type userCodeWrapperType、SPUserCodeCachedAssemblyGroup userAssemblyGroup、Guid siteCollectionId、SPUserToken userToken、String currentAffinity、SPUserCodeExecutionContext executeContext)
Microsoft.SharePoint.UserCode.SPUserCodePoolableProcessConnection.Execute(Type userCodeWrapperType、SPUserCodeCachedAssemblyGroup userAssemblyGroup、Guid siteCollectionId、SPUserToken userToken、Stringアフィニティ、SPUserCodeExecutionContext executeContext)
Microsoft.SharePoint.UserCode.SPUserCodeExecutionHost.Execute(Type userCodeWrapperType、Guid siteCollectionId、SPUserToken userToken、Stringアフィニティ、SPUserCodeExecutionContextexecutionContext)で
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md、Object [] args、Object server、Int32 methodPtr、Boolean fExecuteInContext、Object []&outArgs)で
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg、Int32 methodPtr、Boolean fExecuteInContext)で
[1]で再スローされた例外:
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg、IMessage retMsg)で
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&msgData、Int32 type)で
Microsoft.SharePoint.Administration.ISPUserCodeExecutionHostProxy.Execute(Type userCodeWrapperType、Guid siteCollectionId、SPUserToken userToken、Stringアフィニティバケット名、SPUserCodeExecutionContextexecutionContext)で
Microsoft.SharePoint.UserCode.SPUserCodeExecutionManager.Execute(Type userCodeWrapperType、SPSiteサイト、SPUserCodeExecutionContextexecutionContext)で
Microsoft.SharePoint.UserCode.SPUserCodeWebPartRemoteExecutionHelperで。<> c_DisplayClassa.b_9()
Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)で
Microsoft.SharePoint.UserCode.SPUserCodeWebPartRemoteExecutionHelper.ExecuteRequestInSandBox(HttpContextコンテキスト、SPWeb Web、SPWebPartManagerマネージャー、SPUserCodeWebPart userCodeWebPart)
[NullReferenceException:オブジェクト参照がオブジェクトのインスタンスに設定されていません。]
サーバースタックトレース:
Microsoft.SharePoint.Utilities.SPThreadContext.get_UserCodeContext()で
Microsoft.SharePoint.Utilities.SPThreadContext.get_Items()で
Microsoft.SharePoint.Utilities.SPThreadContext.Get(String key)で
Microsoft.SharePoint.Utilities.SPThreadContext.GetTで
Microsoft.SharePoint.Library.SPRequest.Dispose(ブール値の破棄)で
Microsoft.SharePoint.Library.SPRequest.Dispose()で
Microsoft.SharePoint.SPWeb.InvalidateRequest()で
Microsoft.SharePoint.SPWeb.Invalidate()で
Microsoft.SharePoint.SPWeb.Close()で
Microsoft.SharePoint.SPSite.Close()で
Microsoft.SharePoint.SPSite.Dispose()で
Microsoft.SharePoint.SPSite_SubsetProxy.Dispose__Inner()で
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md、Object [] args、Object server、Int32 methodPtr、Boolean fExecuteInContext、Object []&outArgs)で
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg、Int32 methodPtr、Boolean fExecuteInContext)で
[0]で再スローされた例外:
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg、IMessage retMsg)で
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&msgData、Int32 type)で
Microsoft.SharePoint.SPSite_SubsetProxy.Dispose()で
Microsoft.SharePoint.SPSite.Dispose__Inner()で
Microsoft.SharePoint.SPSite.Dispose()で
Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper.Execute(SPUserCodeExecutionContextexecutionContext)で
Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.ExecuteWrapper(SPUserCodeWrapperラッパー、SPUserCodeExecutionContextexecutionContext)で
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md、Object [] args、Object server、Int32 methodPtr、Boolean fExecuteInContext、Object []&outArgs)で
System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg、IMessageSink replySink)で
[1]で再スローされた例外:
System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg、Boolean bProxyCase)で
System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed、MessageData&msgData)で
Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.CodeToExecuteWrapper.EndInvoke(IAsyncResult result)で
Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType、SPUserCodeCachedAssemblyGroup userAssemblyGroup、Guid siteCollectionId、Byte [] binaryUserCodeToken、Byte [] proxyOperationToken、SPUserCodeExecutionContext executeContext、Boolean shouldUsageLog、Int32 currentProcessId)
sharepoint-2010 - SharePoint ファイル アップロード ワークフローのアプローチ
基本的に次のことを行うファイルアップロード「ウィザード」であるプロジェクトに取り組んでいます。
- ドキュメント ライブラリを選択し、いくつかの基本情報を入力する入力フォーム。
- ライブラリ固有の追加情報を入力します。
- いくつかのカレンダー イベントを関連付けます。
私の目標は次のとおりです。 - Visual Studio を使用してサンドボックス ソリューションとしてこれを作成します。 - ハッキングを避け、既存の機能を可能な限り再発明します。
私が遭遇したいくつかの SP 機能は役に立つかもしれません: - コンテンツ オーガナイザー機能。- 協会フォーム。- 宣言型ワークフロー。
私が検討した可能なアプローチ:
- 送信時にワークフローを開始するコンテンツ オーガナイザー ライブラリ。これに対するユーザー エクスペリエンスがどのようなものになるかはわかりません。単一のリンクを維持することを本当に望んでいます->次へ->次へ->完了のようなアプローチ。
- すべての複雑さを含むカスタム アクションによる宣言型ワークフロー。
- 各ライブラリの組み込みドキュメント アップロード フォームの前にある関連付けフォームと、カレンダー イベント用の後続の関連付けフォーム。
これは実現可能ですか?もしそうなら、どのアプローチが最も簡単ですか?
sharepoint - サンドボックス ソリューションのコードで Web パーツのプロパティを変更する
これは、Web パーツのプロパティをファームソリューションに保存する方法です。
正常に動作します。
今、私は同じことを達成する必要がありますが、サンドボックスソリューションでは使用できませSPLimitedWebPartManager
ん。
では、サンドボックス ソリューション Web パーツ内のコードで Web パーツ プロパティを変更するにはどうすればよいでしょうか?
c# - 複数の条件に基づいて別のリストから値を取得する SharePoint サンドボックス カスタム ワークフロー アクティビティ
別のリストに移動し、他の複数のフィールドを組み合わせた値に基づいてフィールドの値を取得する、サンドボックス化されたカスタム ワークフロー アクティビティを作成しようとしています。
リストA
- 州 - 州リストの検索
- 都市 - 都市リストの検索
- 人口 - 数
- ... その他の列
(基本的に、State と City の組み合わせにより、行が一意に識別可能になります)
リストB
- 会社 - 会社リストの検索
- 州 - 州リストの検索
- 都市 - 都市リストの検索
- 影響を受ける人口の割合 - 数 (パーセント)
- 影響を受ける人口 - 数値フィールド (カスタム アクティビティ ワークフローで入力)
- ... その他の列
制約:
- 固有の権限または異なる権限のため、会社フィールドをリスト A に追加できません
- ルックアップ フィールドはルックアップ フィールドのままである必要があり、1 行のテキスト フィールドに変換することはできません。
- フィールドがルックアップ型であるため、単純な計算列と連結できません。
- ソリューションは、ファームではなくサンドボックス化する必要があります。dll の展開は許可されていません。.wsp のみです。
問題: リスト B のアイテムが追加/変更されたときにトリガーされる、サンドボックス化されたカスタム ワークフロー アクティビティが必要です。トリガーされると、アクティビティはリスト B の項目から州と市の値を取得し、リスト A に移動して、同じ州と市の組み合わせを検索します。見つかった場合は、関連する母集団を取得します。最後に、「人口の影響を受ける割合」からの割合で人口を乗算し、結果を「影響を受ける人口」フィールドに貼り付けます。
おまけ: ある時点で、リスト A の項目 (人口フィールド) が変更されたときにトリガーされる、サンドボックス化されたカスタム ワークフロー アクティビティも必要になります。特定の都道府県と市区町村の組み合わせの人口が変化すると、アクティビティはリスト B に移動し、すべての会社について同じ都道府県と市区町村を満たすすべての「影響を受ける人口」フィールドを更新します (複数の行)。
前もって感謝します!