SiteStructureReaderGetServerStructure Method Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Gets information about the structure of subfolders and their files in a Content Studio server installation, for example the ~Security folder that contains security policy settings. The method returns information about folders, subfolder and files that are part of a Content Studio server installation.

This method was added in Content Studio version 5.3.

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

public static ITreeContainer GetServerStructure(
	ConnectionId connectionId,
	SessionId sessionId
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that uniquely identifies the requested web site.
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).

Return Value

Type: ITreeContainer
An ITreeContainer implementation that contains a hierarchical structures of folders and files.
Exceptions

ExceptionCondition
NotSupportedExceptionThe current server configuration does not allow access to resource data.
UnauthorizedAccessExceptionContent Studio server does not have the required permission to access the resource.
SecurityExceptionContent Studio server does not have the required permission to access the resource.
CSInvalidSessionExceptionThe Content Studio session is invalid.
CSPermissionDeniedExceptionThe caller does not have the required permission.
Content Studio permissions

In order to read the site structure, the caller must have either the GlobalGroupAdmin or the WriteActiveContent global group right.
Remarks

Note Note

Security information

To prevent Content Studio from downloading any server resource a DWORD value named allowResourceRetrieval in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Teknikhuset\Content Studio\5.0\Websites\NNN (where NNN is the numeric connectionid of the site) can be added and given the value 0.

Developers can use the returned information to obtain a single resource by using the GetNamedServerResource(ConnectionId, SessionId, String) method and passing the value of the PathAndName property of a leaf (file) object returned. Since the information is nested in a tree structure it is probably a good idea to consume the returned objects using series of recursive call as the example below shows.

See Also

Reference