ReadServerVersion method
TOC
Collapse the table of content
Expand the table of content

Admin.ReadServerVersion method

Office 2013 and later

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

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

[SoapDocumentMethodAttribute("http://schemas.microsoft.com/office/project/server/webservices/Admin/ReadServerVersion", RequestNamespace = "http://schemas.microsoft.com/office/project/server/webservices/Admin/", 
	ResponseNamespace = "http://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.

Project Server Permissions

Permission

Description

LogOn

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

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

Show:
© 2016 Microsoft