The MarketingContext object is the root object used to interact with the MarketingContext APIs. It can be initialized in Agent mode, to interact with an instance of the Marketing Web service, or in Local mode, to interact directly with the Marketing SQL Database.
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.