ReportingService2005.ListSecureMethods 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回在调用时要求安全连接的 SOAP 方法的列表。
public:
cli::array <System::String ^> ^ ListSecureMethods();
public string[] ListSecureMethods ();
member this.ListSecureMethods : unit -> string[]
Public Function ListSecureMethods () As String()
返回
String[]
String
对象的数组,它包含要示安全连接的方法的名称。
示例
若要编译此代码示例,必须引用 Reporting Services WSDL 并导入某些命名空间。 有关详细信息,请参阅 编译和运行代码示例。 下面的代码示例使用 ListSecureMethods 方法检索当前需要安全连接的方法:
Imports System
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2005()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim methods As String() = rs.ListSecureMethods()
If Not (methods Is Nothing) Then
Dim method As String
For Each method In methods
Console.WriteLine(method)
Next method
End If
End Sub 'Main
End Class 'Sample
using System;
class Sample
{
public static void Main()
{
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
string[] methods = rs.ListSecureMethods();
if (methods != null)
{
foreach (string method in methods)
{
Console.WriteLine(method);
}
}
}
}
SecureConnectionLevel 配置文件设置确定返回的方法列表。
注解
下表显示了有关此操作的标头和权限信息。
SOAP 标头 | (Out) ServerInfoHeaderValue |
所需的权限 | 无 |
报表服务器的 SecureConnectionLevel 设置确定方法 ListSecureMethods 返回的 SOAP 方法的列表。 有关详细信息,请参阅 Using Secure Web Service Methods。