UserPropertiesGetApplicationProperties Method (ConnectionId, SessionId, String) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Gets a list of all the property names and their values that exists in an application

Namespace: ContentStudio.Security
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public Dictionary<string, string> GetApplicationProperties(
	ConnectionId connectionId,
	SessionId sessionId,
	string application
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
application
Type: SystemString
The name of the application where the properties are to be found. For the system application a dot (.) can be used.
All application names are case-sensitive

This parameter cannot be null (Nothing in Visual Basic) or Empty.

Return Value

Type: DictionaryString, String
A DictionaryTKey, TValue with the property names as TKey and the property values as the TValue part.
This method always returns a DictionaryTKey, TValue object whether or not the application exists or not.
Exceptions

ExceptionCondition
ArgumentNullExceptionThe Application argument was null
ArgumentExceptionThe Application argument was Empty.
CSExceptionA business rule was violated in the underlying Content Studio database. The following numbered exceptions are common:
  • 1001 - The session is invalid
  • 1002 - Permission denied
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

A user can always work with her own data. For other accounts the caller must have the GlobalGroupAdmin user right.
Remarks

When using the system application you can expect to find the following properties.
  • email
  • title
  • office
  • address
  • zip
  • city
  • country
  • phone
  • cellphone
  • fax
  • company
  • homephone
  • startdoc (the user's start page in Content Studio)
  • infodoc (the user's personal page in Content Studio)
  • webviewbool (indicates whether to display the tree view in Content Studio or not)
  • pflang (indicates the user's preferred language setting)
Examples

The following code sample shows how to read the properties Data1 and Data2 from the custom application MyApp.
In order to work properly the application and the properties must exist
try
{
    UserProperties upo = new UserProperties();
    Dictionary<string, string> dic = upo.GetApplicationProperties(CS_ConnectionId, CS_UserSessionId, "MyApp");
    Response.Write("MyApp.Data1 value " + Server.HtmlEncode(dic["Data1"]) + "<br /> + Environment.NewLine);
    Response.Write("MyApp.Data2 value " + Server.HtmlEncode(dic["Data2"]) + "<br /> + Environment.NewLine);
}
catch (Exception ex)
{
    Response.Write(Server.HtmlEncode(ex.Message));
}
See Also

Reference