Export (0) Print
Expand All

SmtpClient.TargetName Property

Gets or sets the Service Provider Name (SPN) to use for authentication when using extended protection.

Namespace:  System.Net.Mail
Assembly:  System (in System.dll)

'Declaration
Public Property TargetName As String

Property Value

Type: System.String
A String that specifies the SPN to use for extended protection. The default value for this SPN is of the form "SMTPSVC/<host>" where <host> is the hostname of the SMTP mail server.

The TargetName property is used with integrated Windows authentication when an application is using extended protection. The SmtpClient can then provide extended protection to ensure that credential challenge responses contain service specific information (a SPN) and, if necessary, channel specific information (a channel binding token or CBT). With this information in the credential exchanges, services are able to better protect against malicious use of credential challenge responses that might have been improperly obtained.

The default value for this property can also be set in a machine or application configuration file. Any changes made to the TargetName property override the configuration file settings.

.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft