Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
This method can be successfully executed by anyone that has access to the key.
When a subscription is created it is added to the database but not activated,
instead it must be activated before any subscription handler will use it.
[This is preliminary documentation and is subject to change.]
Activates or deactivates a subscription.
Namespace: ContentStudio.Document.Subscription
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
public void SubscriptionActivateDeactivate( ConnectionId connectionId, SessionId sessionId, string key, bool activate )
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). Currently this value is not used by Content Studio; the value 1 (Anonymous session id) is valid. - key
- Type: SystemString
The activation key that is needed when activating or deactivating.This parameter is the same as the subscription identifier which is a Guid. However this value must be in the format 32 contiguous digits: dddddddddddddddddddddddddddddddd and Content Studio must be able to create this guid from the key.
- activate
- Type: SystemBoolean
When set to true the subscription will be activated; otherwise, deactivated. You cannot activate an already activated subscription and you cannot deactivate an already deactivated subscription.
Exceptions
Exception | Condition |
---|---|
CSDocumentNotFoundException | The key does not exist. |
ArgumentNullException | key cannot be null |
ArgumentOutOfRangeException | The key is in the wrong format. |
FormatException | The key is in the wrong format. |
OverflowException | The key is in the wrong format. |
InvalidOperationException | The subscription is already activated or the subscription is already deactivated. |
SqlException | An error occurred when executing the command against the Content Studio database |
Content Studio permissions
Remarks
Note |
---|
This method is new in Content Studio 5.2 |
See Also