Partager via


NonAuthenticatedIdentity Constructor (String)

Initializes a new instance of the NonAuthenticatedIdentity class representing the user with the specified name.

Namespace:  Microsoft.CommerceServer.Runtime
Assembly:  Microsoft.CommerceServer.Shared (in Microsoft.CommerceServer.Shared.dll)

Syntax

'Declaration
Public Sub New ( _
    name As String _
)
'Usage
Dim name As String

Dim instance As New NonAuthenticatedIdentity(name)
public NonAuthenticatedIdentity(
    string name
)
public:
NonAuthenticatedIdentity(
    String^ name
)
public function NonAuthenticatedIdentity(
    name : String
)

Parameters

  • name
    Type: System..::.String
    The name of the user on whose behalf the code is running.

Exceptions

Exception Condition
ArgumentNullException

name is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

The most common use case is when a returning user is recognized by a cookie. The site will want to hide sensitive information from the user in case the computer is being used by someone else. The site can ask for a password from the user before displaying sensitive information.

This allows a site to recognize a user without treating the user as authenticated. The most common use case is when a returning user is recognized by a cookie. The site will want to hide sensitive information from the user in case the computer is being used by someone else. The site can ask for a password from the user before displaying sensitive information.

Permissions

See Also

Reference

NonAuthenticatedIdentity Class

NonAuthenticatedIdentity Members

NonAuthenticatedIdentity Overload

Microsoft.CommerceServer.Runtime Namespace