ReportingService2005.ServerInfoHeaderValue ReportingService2005.ServerInfoHeaderValue ReportingService2005.ServerInfoHeaderValue Property

定义

表示报表服务器版本的服务器相关的信息。 The server-related information that represents the version of the report server.

public:
 property ReportService2005::ServerInfoHeader ^ ServerInfoHeaderValue { ReportService2005::ServerInfoHeader ^ get(); void set(ReportService2005::ServerInfoHeader ^ value); };
public ReportService2005.ServerInfoHeader ServerInfoHeaderValue { get; set; }
Public Property ServerInfoHeaderValue As ServerInfoHeader

属性值

一个ServerInfoHeader对象,表示报表服务器的版本。 A ServerInfoHeader object that represents the version of the report server.

示例

若要编译下面的代码示例,必须引用 Reporting Services WSDL 并导入特定命名空间。To compile the following code example, you must reference the Reporting Services WSDL and import certain namespaces. 有关详细信息,请参阅编译和运行代码示例For more information, see Compiling and Running Code Examples. 下面的代码示例 Web 服务调用,并随后将从 SOAP 标头检索服务器信息:The following code example makes a call to the Web service and then retrieves server information from the SOAP header:

Imports System  
  
Class Sample  
   Shared Sub Main()  
      ' Create proxy object and set service credentials to integrated  
      Dim rs As New ReportingService2005()  
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials  
  
      Try  
         ' Set the server info header   
         rs.ServerInfoHeaderValue = New ServerInfoHeader()  
  
         ' Make a call to the Web service  
         Dim items As CatalogItem() = rs.ListChildren("/", False)  
  
         ' 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;  
  
class Sample  
{  
   static void Main()  
   {  
      // Create proxy object and set service credentials to integrated  
      ReportingService2005 rs = new ReportingService2005();  
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;  
  
      try  
      {  
         // Set the server info header   
         rs.ServerInfoHeaderValue = new ServerInfoHeader();  
  
         // Make a call to the Web service  
         CatalogItem[] items = rs.ListChildren("/", false);  
  
         // 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);  
      }  
   }  
}  

适用于