Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
A Subscription that represents the newly added subscription.
For Newsletter subscriptions, this method can successfully be executed by any authenticated or anonymous caller.
[This is preliminary documentation and is subject to change.]
Adds the subscription to the current subscription definition without any MembershipProvider data.
Namespace: ContentStudio.Document.Subscription
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
public Subscription AddSubscription( string name, SubscriberAddress address, bool allowUpdate )
Parameters
- name
- Type: SystemString
The name of the subscriber. - address
- Type: ContentStudio.Document.SubscriptionSubscriberAddress
An instance of a SubscriberAddress that specifies the address of the subscriber. This parameter cannot be null (Nothing in Visual Basic) . - allowUpdate
- Type: SystemBoolean
Specifies whether the name will be updated if a subscription with the address specified already exists.
Return Value
Type: SubscriptionA Subscription that represents the newly added subscription.
Exceptions
Exception | Condition | ||||||
---|---|---|---|---|---|---|---|
CSException |
| ||||||
CSPermissionDeniedException | The caller has no permission to perform the requested action | ||||||
CSInvalidSessionException | The session is invalid | ||||||
ArgumentNullException | The address cannot be null (Nothing in Visual Basic) | ||||||
NotSupportedException | The value of SubscriptionType parameter is not supported. | ||||||
InvalidOperationException | Cannot add a new subscriber to a definition that has not been saved for the first time. | ||||||
SqlException | An error occurred when executing the command against the Content Studio database |
Content Studio permissions
Remarks
A subscription is identified on its address and address type and if the subscription already exists and the allowUpdate parameter is true the name will be updated.
You cannot add subscriptions if the subscription definition is disabled.
See Also