LocalReport.ExecuteReportInSandboxAppDomain 方法 ()
注意: 此 API 現已淘汰。
處理延伸模組與運算式,以有限權限的應用程式定義域中執行的原因。
命名空間: Microsoft.Reporting.WinForms
組件: Microsoft.ReportViewer.WinForms (於 Microsoft.ReportViewer.WinForms.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 void ExecuteReportInSandboxAppDomain()
public:
[ObsoleteAttribute("This method requires Code Access Security policy, which is deprecated. For more information please go to https://go.microsoft.com/fwlink/?LinkId=160787.")]
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
<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
註解
重要
這個方法已被取代的 .NET Framework 4 因為程式碼存取安全性 (CAS) 功能依賴中已被取代 .NET Framework 4。 相反地,ReportViewer 控制項永遠會在沙箱應用程式定義域中執行。 若要設定沙箱應用程式定義域的基本權限,請使用 SetBasePermissionsForSandboxAppDomain。 若要允許完全信任處理延伸模組,請使用 AddFullTrustModuleInSandboxAppDomain。
當搭配 .NET Framework 4,這個方法沒有任何作用,除非您使用 ASP.NET 應用程式的 Web.config 檔案中。 這種情況下才適用,如果您想要在沙箱應用程式定義域和目前的應用程式定義域模式之間切換。
如需詳細資訊,請參閱 程式碼存取安全性原則相容性和移轉。
請參閱下表中的預設應用程式網域中的模式不同 .NET Framework 版本。
.NET Framework 版本 |
啟用 LegacySecurityPolicy? |
預設應用程式定義域 |
可用的應用程式定義域模式 |
4 |
否 (預設值) |
沙箱 |
沙箱 |
4 |
是 |
目前 |
沙箱和目前 |
3.5 |
N/A |
目前 |
沙箱和目前 |
此模式被設計來啟用不受信任的報表,使用未受信任的處理延伸模組來安全地執行。
此模式中對效能受到負面的影響。
另請參閱
LocalReport 類別
Microsoft.Reporting.WinForms 命名空間
回到頁首