次の方法で共有


ServerInfoHeaderValue プロパティ

レポート サーバーのバージョンを表す、サーバー関連の情報を取得または設定します。

名前空間:  ReportService2006
アセンブリ:  ReportService2006 (ReportService2006.dll)

構文

'宣言
Public Property ServerInfoHeaderValue As ServerInfoHeader
    Get
    Set
'使用
Dim instance As ReportingService2006
Dim value As ServerInfoHeader

value = instance.ServerInfoHeaderValue

instance.ServerInfoHeaderValue = value
public ServerInfoHeader ServerInfoHeaderValue { get; set; }
public:
property ServerInfoHeader^ ServerInfoHeaderValue {
    ServerInfoHeader^ get ();
    void set (ServerInfoHeader^ value);
}
member ServerInfoHeaderValue : ServerInfoHeader with get, set
function get ServerInfoHeaderValue () : ServerInfoHeader
function set ServerInfoHeaderValue (value : ServerInfoHeader)

プロパティ値

型: ReportService2006. . :: . .ServerInfoHeader
レポート サーバーのバージョンを表す ServerInfoHeader オブジェクトです。

使用例

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
        ReportingService2006 rs = new ReportingService2006();
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" +
            "ReportService2006.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("/");

            // 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 ReportingService2006()
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" + _
            "ReportService2006.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("/")

            ' 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