ReportingService2010.ServerInfoHeaderValue ReportingService2010.ServerInfoHeaderValue ReportingService2010.ServerInfoHeaderValue Property

定义

获取或设置表示报表服务器版本的服务器相关信息。 Gets or sets the server-related information that represents the version of the report server.

public:
 property ReportService2010::ServerInfoHeader ^ ServerInfoHeaderValue { ReportService2010::ServerInfoHeader ^ get(); void set(ReportService2010::ServerInfoHeader ^ value); };
public ReportService2010.ServerInfoHeader ServerInfoHeaderValue { get; set; }
Public Property ServerInfoHeaderValue As ServerInfoHeader
属性值

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

示例

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);  
        }  
    }  
}  
Imports System  
Imports System.IO  
Imports System.Text  
Imports System.Web.Services  
Imports System.Web.Services.Protocols  

Class Sample  

    Public Shared Sub Main()  

        Dim rs As 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  
            Dim items As CatalogItem() = 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 e As Exception  
            Console.WriteLine(e.Message)  
        End Try  

    End Sub  

End Class  

适用于