Share via


ServiceAgent Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets the ServiceAgent implementation, when running in Agent mode, else returns nullNothingnullptra null reference (Nothing in Visual Basic).

Namespace:  Microsoft.CommerceServer.Marketing
Assembly:  Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)

Syntax

'Declaration
Protected ReadOnly Property ServiceAgent As ServiceAgent
'Usage
Dim value As ServiceAgent

value = Me.ServiceAgent
protected ServiceAgent ServiceAgent { get; }
protected:
property ServiceAgent^ ServiceAgent {
    ServiceAgent^ get ();
}
protected function get ServiceAgent () : ServiceAgent

Property Value

Type: Microsoft.CommerceServer..::.ServiceAgent
When running in the Agent mode the ServiceAgent implementation is returned. When running in Local mode, nullNothingnullptra null reference (Nothing in Visual Basic) is returned.

Remarks

From a security perspective, it is important to note that the ServiceAgent sets the UnsafeAuthenticatedConnectionSharing property of the new proxy to true by default. This can be unsafe from a security perspective if the ServiceAgent is used in an environment where more than one security context is using ServiceAgent objects to connect to Web services from within the same process and using different credentials. The typical example is when the agent is invoked from an ASP.NET Web application or Web service and impersonation is being used in the Web application. In this case, you should disable UnsafeAuthenticatedConnectionSharing by setting the UnsafeAuthenticatedConnectionSharing property to false.

Permissions

See Also

Reference

MarketingServices Class

MarketingServices Members

Microsoft.CommerceServer.Marketing Namespace