ReportingService2010.GetSystemPermissions メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
現在のユーザーのシステム権限を取得します。 この方法はネイティブモードにのみ適用されます。
public:
cli::array <System::String ^> ^ GetSystemPermissions();
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetSystemPermissions", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
[System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")]
public string[] GetSystemPermissions();
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetSystemPermissions", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)>]
[<System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)>]
[<System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")>]
member this.GetSystemPermissions : unit -> string[]
Public Function GetSystemPermissions () As String()
返品
システムタスクやユーザーが割り当てられた役割に関連する権限のリストを含む String オブジェクトの配列です。
- 属性
例
このコード例をコンパイルするには、Reporting Services WSDLを参照し、特定の名前空間をインポートする必要があります。 詳細については 、「コード例のコンパイルと実行」をご覧ください。
以下のコード例では、 GetSystemPermissions メソッドを使って、現在ユーザーが割り当てられているシステムタスクや役割に関連する権限のリストを取得します。
[C#]
using System;
using System.IO;
using System.Text;
using System.Web.Services.Protocols;
#endregion
class Sample
{
public static void Main()
{
ReportingService2010 rs = new ReportingService2010();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
string[] userpermissions = rs.GetSystemPermissions();
for (int t = 0; t <= userpermissions.GetUpperBound(0); t++)
Console.WriteLine(userpermissions[t]);
Console.ReadKey();
}
}
注釈
以下の表は、この操作のヘッダーおよび権限情報を示しています。
| SOAPヘッダーの使用 | (イン) TrustedUserHeaderValue (アウト) ServerInfoHeaderValue |
| ネイティブモードの必要権限 | None |
| SharePointモードの必要権限 | サポートしていません |
このメソッドはSharePontモードで呼び出した際に OperationNotSupportedSharePointMode 例外を投げ出します。