Create Method (String)
Creates a new instance of the MarketingContext class using the specified Marketing Web service in Agent mode.
Namespace: Microsoft.CommerceServer.Marketing
Assembly: Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)
Syntax
'Declaration
Public Shared Function Create ( _
serviceUrl As String _
) As MarketingContext
'Usage
Dim serviceUrl As String
Dim returnValue As MarketingContext
returnValue = MarketingContext.Create(serviceUrl)
public static MarketingContext Create(
string serviceUrl
)
public:
static MarketingContext^ Create(
String^ serviceUrl
)
public static function Create(
serviceUrl : String
) : MarketingContext
Parameters
- serviceUrl
Type: System..::.String
The full URL of the Marketing Web service.
Return Value
Type: Microsoft.CommerceServer.Marketing..::.MarketingContext
An object used to mange CampaignItem, Customer, DisplaySizeDisplayTemplate, Expression, IndustryCode, MailingList, PageGroup, profile definitions and site terms, and PromoCodeDefinition, entities.
Exceptions
Exception | Condition |
---|---|
FileNotFoundException | The dynamically loaded assembly containing the MarketingContext Agent implementation could not be loaded. The inner exception contains more details of the exception. |
Remarks
MarketingContext is often referred to as the Marketing System Agent object, since it is used to communicate with a Web service. The MarketingContext objects uses the services of a MarketingServiceAgent to negotiate an appropriate authentication method with the Marketing Web service and manages authentication credentials used to authenticate the user to the service. It is also possible to manage Web service authentication credentials manually. This can be done by explicitly setting Credentials before constructing the MarketingContext object.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.