SALES: 1-800-867-1380

AuthorizationFailedException Class

The exception that occurs when an authorization attempt fails.


Namespace:  Microsoft.ServiceBus
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

public class AuthorizationFailedException : Exception

The AuthorizationFailedException type exposes the following members.

Public propertyData (Inherited from Exception.)
Public propertyErrorCodeGets or sets the error code that describes the cause of authorization attempt failure.
Public propertyHelpLink (Inherited from Exception.)
Public propertyHResult (Inherited from Exception.)
Public propertyInnerException (Inherited from Exception.)
Public propertyMessage (Inherited from Exception.)
Public propertySource (Inherited from Exception.)
Public propertyStackTrace (Inherited from Exception.)
Public propertyTargetSite (Inherited from Exception.)

Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetBaseException (Inherited from Exception.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetObjectDataPopulates a SerializationInfo object with the data needed to serialize the target object. (Overrides Exception.GetObjectData(SerializationInfo, StreamingContext).)
Public methodGetType (Inherited from Exception.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Exception.)

Protected eventSerializeObjectState (Inherited from Exception.)

Windows Azure Service Bus supports only Full Trust code access security.

Typical causes of this exception include, but are not restricted to:

  • Failing to identify or retrieve the authentication token (or relay access token) from a message header.

  • The URI of the target service to authorize is in the incorrect format, such as with a hostname that does not conform to DNS naming conventions.

  • The token does not contain a claim that satisfies the action to be authorized with the service.

  • The SAML assertion has an incorrect user. Alternatively, the corresponding security token is missing or has a corrupted X.509 certificate.

For more information on setting authorization credentials, see Securing and Authenticating an AppFabric Service Bus Connection.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft