Admin.ReadServerVersion Method

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

Namespace:  [Admin Web service]
Service reference: http://ServerName:32843/[Project Service Application GUID]/PSI/Admin.svc
Web service reference: http://ServerName/ProjectServerName/_vti_bin/PSI/Admin.asmx?wsdl


<SoapDocumentMethodAttribute("", RequestNamespace := "",  _
    ResponseNamespace := "",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function ReadServerVersion As DataSet
Dim instance As Admin
Dim returnValue As DataSet

returnValue = instance.ReadServerVersion()
[SoapDocumentMethodAttribute("", RequestNamespace = "", 
    ResponseNamespace = "", 
    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




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(AdminWebSvc.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. " +
    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


Admin Class

Admin Members

Admin Web Service