ReportExecutionService.ServerInfoHeaderValue Property

Returns information about the report server.

命名空间: Microsoft.WSSUX.ReportingServicesWebService.RSExecutionService2005
程序集: ReportExecution2005 (in reportexecutionservice.dll)

语法

声明
Public Property ServerInfoHeaderValue As ServerInfoHeader
public ServerInfoHeader ServerInfoHeaderValue { get; set; }
public:
property ServerInfoHeader^ ServerInfoHeaderValue {
    ServerInfoHeader^ get ();
    void set (ServerInfoHeader^ value);
}
/** @property */
public ServerInfoHeader get_ServerInfoHeaderValue ()

/** @property */
public void set_ServerInfoHeaderValue (ServerInfoHeader value)
public function get ServerInfoHeaderValue () : ServerInfoHeader

public function set ServerInfoHeaderValue (value : ServerInfoHeader)

属性值

A ServerInfoHeader object containing information about the report server.

备注

You can use the ServerInfoHeaderValue object returned by this property to get the server edition and version number.

示例

To compile the following code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see 编译和运行代码示例. The following code example makes a call to the Web service and then retrieves server information from the SOAP header:

Imports System
Imports myNamespace.myWebserviceReference


Class Sample
    Shared Sub Main()
        ' Create proxy object and set service credentials to integrated
        Dim rs As New ReportExecutionService()
        rs.Credentials = System.Net.CredentialCache.DefaultCredentials

      ' Set the base Web service URL of the source server
      rs.Url = "https://servername/reportserver/ReportExecution2005.asmx"

        Try
            ' Set the server info header 
            rs.ServerInfoHeaderValue = New ServerInfoHeader()

            ' Make a call to the Web service
            Dim secureMethods() = rs.ListSecureMethods()

            ' Output the server version and edition to the console
            Console.WriteLine("Server version: {0}", rs.ServerInfoHeaderValue.ReportServerVersionNumber)
            Console.WriteLine("Server edition: {0}", rs.ServerInfoHeaderValue.ReportServerEdition)

        Catch e As Exception
            Console.WriteLine(e.Message)
        End Try
    End Sub 'Main
End Class 'Sample
using System;
using myNameSpace.myWebServiceReference;

class Sample
{
   static void Main()
   {
      // Create proxy object and set service credentials to integrated
      ReportExecutionService rs = new ReportExecutionService();
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

      // Set the base Web service URL of the source server
      rs.Url = "https://servername/reportserver/ReportExecution2005.asmx";

      try
      {
         // Set the server info header 
         rs.ServerInfoHeaderValue = new ServerInfoHeader();

         // Make a call to the Web service
         string secureMethods[] = rs.ListSecureMethods();

         // Output the server version and edition to the console
         Console.WriteLine("Server version: {0}", 
            rs.ServerInfoHeaderValue.ReportServerVersionNumber);
         Console.WriteLine("Server edition: {0}", 
            rs.ServerInfoHeaderValue.ReportServerEdition);
      }

      catch (Exception e)
      {
         Console.WriteLine(e.Message);
      }
   }
}

线程安全

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

平台

开发平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

目标平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

请参阅

参考

ReportExecutionService Class
ReportExecutionService Members
Microsoft.WSSUX.ReportingServicesWebService.RSExecutionService2005 Namespace