Partajați prin


NotAuthorizedException Constructor (String, String, Int32, String)

Initializes a new instance of the NotAuthorizedException class with the specified error message and parameters describing the operation which was not authorized.

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

Syntax

'Declaration
Public Sub New ( _
    message As String, _
    operationName As String, _
    operationId As Integer, _
    scope As String _
)
'Usage
Dim message As String
Dim operationName As String
Dim operationId As Integer
Dim scope As String

Dim instance As New NotAuthorizedException(message, _
    operationName, operationId, scope)
public NotAuthorizedException(
    string message,
    string operationName,
    int operationId,
    string scope
)
public:
NotAuthorizedException(
    String^ message, 
    String^ operationName, 
    int operationId, 
    String^ scope
)
public function NotAuthorizedException(
    message : String, 
    operationName : String, 
    operationId : int, 
    scope : String
)

Parameters

  • message
    Type: System..::.String
    The error message that explains the reason for the exception.
  • operationName
    Type: System..::.String
    The name of the operation for which authorization was not granted.
  • operationId
    Type: System..::.Int32
    The ID of the operation for which authorization was not granted.
  • scope
    Type: System..::.String
    The name of the authorization policy scope in which the authorization was requested. May be nullNothingnullptra null reference (Nothing in Visual Basic), indicating the top-level Application scope.

Remarks

The exception that is thrown when an operation is attempted by a user that is not authorized to perform that operation, based on the currently configured authorization policy.

Permissions

See Also

Reference

NotAuthorizedException Class

NotAuthorizedException Members

NotAuthorizedException Overload

Microsoft.CommerceServer Namespace