ReportExecutionService.ServerInfoHeaderValue Property

 

Applies To: SQL Server 2016 Preview

Returns information about the report server.

Namespace:   ReportExecution2005
Assembly:  ReportExecution2005 (in ReportExecution2005.dll)

Syntax

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

Property Value

Type: ReportExecution2005.ServerInfoHeader

A ServerInfoHeader object containing information about the report server.

Remarks

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

Examples

Legacy Code Example

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:Unable to find linked topic '317946aa-8e95-4f0b-8170-394c9d5e184e'.

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);
      }
   }
}

See Also

ReportExecutionService Class
ReportExecution2005 Namespace

Return to top