Exporter (0) Imprimer
Développer tout
EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

ReportingService2010.ServerInfoHeaderValue Property

 

Applies To: SQL Server 2016 Preview

Gets or sets the server-related information that represents the version of the report server.

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

public ServerInfoHeader ServerInfoHeaderValue { get; set; }

Property Value

Type: ReportService2010.ServerInfoHeader

A ServerInfoHeader object that represents the version of the report server.

Legacy Code Example

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

class Sample
{
    static void Main(string[] args)
    {
        // Create proxy object and set service 
        // credentials to integrated
        ReportingService2010 rs = new ReportingService2010();
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" +
            "ReportService2010.asmx";
        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("/", true);

            // 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);
        }
    }
}
Return to top
Cela vous a-t-il été utile ?
(1500 caractères restants)
Merci pour vos suggestions.
Afficher:
© 2015 Microsoft