Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
The requested resource as a Byte array.
In order to read any resource file, the caller must have either the
GlobalGroupAdmin
or the
WriteActiveContent
global group right.
[This is preliminary documentation and is subject to change.]
Gets a named file resource of a Content Studio web site.
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 byte[] GetNamedSiteResource( ConnectionId connectionId, SessionId sessionId, string fileName )
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). - fileName
- Type: SystemString
Name of the file resource to find. This name is the path and name relative the site root; e.g. ~js\script.js - or web.config. To get a list of resources that can be obtained with the GetSiteStructure(ConnectionId, SessionId, Boolean) method.
Return Value
Type: ByteThe requested resource as a Byte array.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | |
ArgumentException | The fileName was an empty string. |
DirectoryNotFoundException | |
FileNotFoundException | |
IOException | |
NotSupportedException | The current server configuration does not allow access to resource data. |
UnauthorizedAccessException | Content Studio server does not have the required permission to access the resource. |
SecurityException | Content Studio server does not have the required permission to access the resource. |
CSInvalidSessionException | The Content Studio session is invalid. |
CSPermissionDeniedException | The caller does not have the required permission. |
Content Studio permissions
Remarks
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. |
See Also