ReportExecutionService.ServerInfoHeaderValue Eigenschaft

Definition

Gibt Informationen zum Berichtsserver zurück.

public:
 property ReportExecution2005::ServerInfoHeader ^ ServerInfoHeaderValue { ReportExecution2005::ServerInfoHeader ^ get(); void set(ReportExecution2005::ServerInfoHeader ^ value); };
public ReportExecution2005.ServerInfoHeader ServerInfoHeaderValue { get; set; }
member this.ServerInfoHeaderValue : ReportExecution2005.ServerInfoHeader with get, set
Public Property ServerInfoHeaderValue As ServerInfoHeader

Eigenschaftswert

Ein ServerInfoHeader-Objekt, das Informationen zum Berichtsserver enthält.

Beispiele

Um das folgende Codebeispiel zu kompilieren, müssen Sie auf die Reporting Services WSDL verweisen und bestimmte Namespaces importieren. Weitere Informationen finden Sie unter Kompilieren und Ausführen von Codebeispielen. Im folgenden Codebeispiel wird der Webdienst aufgerufen und dann Serverinformationen aus dem SOAP-Header abgerufen:

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 = "http://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 = "http://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);  
      }  
   }  
}  

Hinweise

Sie können das ServerInfoHeaderValue von dieser Eigenschaft zurückgegebene Objekt verwenden, um die Serveredition und Versionsnummer abzurufen.

Gilt für: