次の方法で共有


LocalReport.ExecuteReportInSandboxAppDomain メソッド

メモ: この API は、互換性のために残されています。

制限された権限を持つアプリケーション ドメインで処理拡張機能と式を実行できるようになります。

名前空間:  Microsoft.Reporting.WebForms
アセンブリ:  Microsoft.ReportViewer.WebForms (Microsoft.ReportViewer.WebForms.dll)

構文

'宣言
<ObsoleteAttribute("This method requires Code Access Security policy, which is deprecated.  For more information please go to https://go.microsoft.com/fwlink/?LinkId=160787.")> _
Public Sub ExecuteReportInSandboxAppDomain
'使用
Dim instance As LocalReport

instance.ExecuteReportInSandboxAppDomain()
[ObsoleteAttribute("This method requires Code Access Security policy, which is deprecated.  For more information please go to https://go.microsoft.com/fwlink/?LinkId=160787.")]
public void ExecuteReportInSandboxAppDomain()
[ObsoleteAttribute(L"This method requires Code Access Security policy, which is deprecated.  For more information please go to https://go.microsoft.com/fwlink/?LinkId=160787.")]
public:
void ExecuteReportInSandboxAppDomain()
[<ObsoleteAttribute("This method requires Code Access Security policy, which is deprecated.  For more information please go to https://go.microsoft.com/fwlink/?LinkId=160787.")>]
member ExecuteReportInSandboxAppDomain : unit -> unit 
public function ExecuteReportInSandboxAppDomain()

説明

重要

このメソッドが依存するコード アクセス セキュリティ (CAS) 機能は .NET Framework 4 では推奨されていないため、.NET Framework 4 ではこのメソッドの使用は推奨されません。代わりに、ReportViewer コントロールは常にサンドボックスで保護されたアプリケーション ドメインで実行されます。サンドボックスで保護されたアプリケーション ドメインの基本アクセス許可を設定するには、SetBasePermissionsForSandboxAppDomain を使用します。完全に信頼された処理拡張機能を許可するには、AddFullTrustModuleInSandboxAppDomain を使用します。

.NET Framework 4 で使用する場合は、ASP.NET アプリケーションの Web.config ファイルで <NetFx40_LegacySecurityPolicy> 構成要素を使用しない限り、このメソッドは無効です。このシナリオは、サンドボックスで保護されたアプリケーション ドメイン モードと現在のアプリケーション ドメイン モードを切り替える場合にのみ適用されます。

詳細については、「Code Access Security Policy Compatibility and Migration」を参照してください。

.NET Framework の各バージョンの既定のアプリケーション ドメイン モードについては、次の表を参照してください。

.NET Framework のバージョン

LegacySecurityPolicy が有効かどうか

既定のアプリケーション ドメイン

利用可能なアプリケーション ドメイン モード

4

無効 (既定値)

サンドボックス

サンドボックス

4

有効

現在

サンドボックスおよび現在

3.5

N/A

現在

サンドボックスおよび現在

このモードは、信頼されていない処理機能拡張を使用している場合、信頼されていないレポートを、安全に実行するためのものです。

このモードでは、パフォーマンスが低下します。

関連項目

参照

LocalReport クラス

Microsoft.Reporting.WebForms 名前空間