Admin.ReadServerVersion method

Reads the Project Server version major, minor, build, and revision numbers.

Namespace:  WebSvcAdmin
Assembly:  ProjectServerServices (in ProjectServerServices.dll)

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/Admin/ReadServerVersion", RequestNamespace := "https://schemas.microsoft.com/office/project/server/webservices/Admin/",  _
    ResponseNamespace := "https://schemas.microsoft.com/office/project/server/webservices/Admin/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function ReadServerVersion As DataSet
'Usage
Dim instance As Admin
Dim returnValue As DataSet

returnValue = instance.ReadServerVersion()
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/Admin/ReadServerVersion", RequestNamespace = "https://schemas.microsoft.com/office/project/server/webservices/Admin/", 
    ResponseNamespace = "https://schemas.microsoft.com/office/project/server/webservices/Admin/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public DataSet ReadServerVersion()

Return value

Type: System.Data.DataSet
The DataSet contains a single table named ServerVersion and one row with the column names WADMIN_VERSION_MAJOR, WADMIN_VERSION_MINOR, WADMIN_VERSION_BUILD, and WADMIN_VERSION_REVISION.

Remarks

Project Server Permissions

Permission

Description

LogOn

Allows a user to log on to Project Server. Global permission.

Examples

The ProjectServerVersion sample method returns a string that combines all four fields in the table.

using System;
using System.Data;
. . .
public string ProjectServerVersion(SvcAdmin.Admin admin)
{
    string major, minor, build, revision;
    string version = "";

    DataSet dsInfo = admin.ReadServerVersion();

    DataRow row = dsInfo.Tables["ServerVersion"].Rows[0];
    major = row["WADMIN_VERSION_MAJOR"].ToString();
    minor = row["WADMIN_VERSION_MINOR"].ToString();
    build = row["WADMIN_VERSION_BUILD"].ToString();
    revision = row["WADMIN_VERSION_REVISION"].ToString();

    build = build.Insert(build.Length - 4, ".");

    version = major + "." +
        minor + "." +
        build + ", rev. " +
        revision;
    return version;
}

In the example, the PSI Admin Web service namespace is AdminWebSvc. The admin parameter is a class variable that is defined in the calling class, as follows:

public static AdminWebSvc.Admin admin = new WebSvcAdmin.Admin();
. . .
    string ver = ProjectServerVersion(admin);

For example, ProjectServerVersion returns the following string for the released version of Microsoft Project Server 2010: 14.0.4750.1000, rev. 15

See also

Reference

Admin class

Admin members

WebSvcAdmin namespace