MailBeeImapLoginBadMethodException Class
The exception that is thrown when the IMAP server reports the given SASL authentication method is not supported and use of another authentication methods is not allowed by the application.
Inheritance Hierarchy
SystemObject
  SystemException
    SystemApplicationException
      MailBeeMailBeeException
        MailBeeMailBeeNetworkException
          MailBeeMailBeeRemoteHostException
            MailBeeMailBeeProtocolException
              MailBeeMailBeeEmailProtocolException
                MailBeeMailBeeEmailProtocolNegativeResponseException
                  MailBee.ImapMailMailBeeImapNegativeResponseException
                    MailBee.ImapMailMailBeeImapLoginNegativeResponseException
                      MailBee.ImapMailMailBeeImapLoginBadMethodException

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
[SerializableAttribute]
public class MailBeeImapLoginBadMethodException : MailBeeImapLoginNegativeResponseException, 
	IMailBeeLoginBadMethodException, IMailBeeLoginNegativeResponseException, IMailBeeLoginException, IMailBeeNegativeTextResponseException, IMailBeeNegativeResponseException

The MailBeeImapLoginBadMethodException type exposes the following members.

Constructors
  NameDescription
Protected methodMailBeeImapLoginBadMethodException
Initializes a new instance of the MailBeeImapLoginBadMethodException class
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetBaseException
When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
(Inherited from Exception.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetObjectData
When overridden in a derived class, sets the SerializationInfo with information about the exception.
(Inherited from Exception.)
Public methodGetType
Gets the runtime type of the current instance.
(Inherited from Exception.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Creates and returns a string representation of the current exception.
(Inherited from Exception.)
Top
Properties
  NameDescription
Public propertyBadMethod
Gets the authentication method which was rejected by the server.
Public propertyCompletionResult
Gets the response status code.
(Inherited from MailBeeImapNegativeResponseException.)
Public propertyData
Gets a collection of key/value pairs that provide additional user-defined information about the exception.
(Inherited from Exception.)
Public propertyErrorCode
Gets the error code.
(Inherited from MailBeeException.)
Public propertyHelpLink
Gets or sets a link to the help file associated with this exception.
(Inherited from Exception.)
Public propertyHResult
Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.
(Inherited from Exception.)
Public propertyHumanReadable
Gets the human readable part of the status response.
(Inherited from MailBeeImapNegativeResponseException.)
Public propertyInnerException
Gets the Exception instance that caused the current exception.
(Inherited from Exception.)
Public propertyMessage
Gets a message that describes the current exception.
(Inherited from Exception.)
Public propertyOptionalResponse
Gets the contents of the optional response code of the response.
(Inherited from MailBeeImapNegativeResponseException.)
Public propertyProtocol
Gets application-level protocol of the current connection.
(Inherited from MailBeeRemoteHostException.)
Public propertyRemoteEndPoint
Gets a reference to the end point of the server host.
(Inherited from MailBeeRemoteHostException.)
Public propertyRemoteHostName
Gets the host name of the server.
(Inherited from MailBeeRemoteHostException.)
Public propertyResponseEncoding
Gets the encoding which was used to convert response bytes received from the server into a string.
(Inherited from MailBeeEmailProtocolNegativeResponseException.)
Public propertyResponseString
Gets the string which contains the negative response data.
(Inherited from MailBeeEmailProtocolNegativeResponseException.)
Public propertySource
Gets or sets the name of the application or the object that causes the error.
(Inherited from Exception.)
Public propertyStackTrace
Gets a string representation of the immediate frames on the call stack.
(Inherited from Exception.)
Public propertyTargetSite
Gets the method that throws the current exception.
(Inherited from Exception.)
Public propertyWasConnected
Gets if the connection with the server had already been established to the moment when the exception occurred.
(Inherited from MailBeeRemoteHostException.)
Top
Events
  NameDescription
Protected eventSerializeObjectState
Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.
(Inherited from Exception.)
Top
Remarks
By default, if a particular SASL authentication method is not supported by the server, MailBee switches to the previous method listed in authMethods parameter of Login(String, String, String, String, AuthenticationMethods, AuthenticationOptions, SaslMethod) method. If no more methods left, MailBeeLoginNoSupportedMethodsException is thrown. However, if UseSingleMethodOnly flag is set in authOptions parameter of Login(String, String, String, String, AuthenticationMethods, AuthenticationOptions, SaslMethod) method, MailBee will not try other methods. Instead, if will immediately throw MailBeeImapLoginBadMethodException.
Note Note
This exception does not indicate that authentication using the given method failed. Instead, it indicates the method itself is not supported by the server. When the method is supported but the authentication using this method fails (invalid account name/password), MailBee does not try another methods (there would be no sense if it did), and throws MailBeeImapLoginBadCredentialsException.
This exception may also occur if FipsMode is enabled and the given authentication method is not FIPS-compliant.
See Also