Właściwość ReportExecutionService.ServerInfoHeaderValue
Zwraca informacje o serwer raportów.
Przestrzeń nazw: ReportExecution2005
Zestaw: ReportExecution2005 (w ReportExecution2005.dll)
Składnia
'Deklaracja
Public Property ServerInfoHeaderValue As ServerInfoHeader
Get
Set
'Użycie
Dim instance As ReportExecutionService
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)
Wartość właściwości
Typ: ReportExecution2005.ServerInfoHeader
A ServerInfoHeader obiektów zawierających informacje o serwer raportów.
Uwagi
Można użyć ServerInfoHeaderValue Obiekt zwrócony przez tę właściwość, aby uzyskać server edition i numer wersja.
Przykłady
Aby skompilować poniższy przykład kodu, musi odniesienie WSDL usług raportowania i przywozu niektórych obszarów nazw.Aby uzyskać więcej informacji, zobacz temat Compiling and Running Code Examples.Poniższy przykład kodu dzwoni do usługa sieci Web, a następnie pobiera informacje o serwerze z nagłówek protokołu SOAP:
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);
}
}
}