Export (0) Print
Expand All

MessageQueueErrorCode Enumeration

Identifies the source of an error that occurred within the Message Queuing application and generated a MessageQueueException exception.

[Visual Basic]
<Serializable>
Public Enum MessageQueueErrorCode
[C#]
[Serializable]
public enum MessageQueueErrorCode
[C++]
[Serializable]
__value public enum MessageQueueErrorCode
[JScript]
public
   Serializable
enum MessageQueueErrorCode

Remarks

The MessageQueueErrorCode enumeration gives detailed information about an error condition during a messaging operation.

The MessageQueueException uses the MessageQueueErrorCode property to identify the nature of the Message Queuing error. The MessageQueueErrorCode value determines a text string to associate with the error.

Members

Member name Description
AccessDenied Message text: Access is denied.

Message Queuing returns this error if access to the specified queue or computer is denied. If this error is returned, verify that you have access rights for the operation, such as creating, deleting, or setting properties for a queue. For information about changing access rights for a queue, see the MessageQueueAccessRights and MessageQueue.SetPermissions topics.

BadSecurityContext This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Base This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
BufferOverflow This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
CannotCreateCertificateStore Message text: Unable to create a certificate store for the internal certificate.

Message Queuing returns this error if you do not have permission to manipulate your own profile.

CannotCreateHashEx Message text: Unable to create a hash object for an authenticated message.

See the Message class's HashAlgorithm property for more information about hash algorithms.

CannotCreateOnGlobalCatalog Message text: Failed to create an object on a specified global catalog server.
CannotGetDistinguishedName Message text: Failed to retrieve the distinguished name of local computer.
CannotGrantAddGuid Message text: Failed to grant the "Add Guid" permission to current user.
CannotHashDataEx Message text: Unable to hash data for an authenticated message.
CannotImpersonateClient Message text: The RPC server cannot impersonate the client application, hence security credentials could not be verified.

Message Queuing returns this error if the directory service server cannot impersonate the client application. This is necessary to verify the security credentials.

CannotJoinDomain Message text: Failed to join Message Queuing enterprise on Windows 2000 domain.
CannotLoadMsmqOcm Message text: Cannot load the MSMQOCM.DLL library.
CannotOpenCertificateStore Message text: Unable to open the certificates store for the internal certificate.

Message Queuing returns this error if you do not have permission to manipulate your own profile.

CannotSetCryptographicSecurityDescriptor Message text: Unable to set the security descriptor for the cryptographic keys.

For information about cryptographic providers, see the CryptographicProviderType and Message.AuthenticationProviderType topics.

CannotSignDataEx Message text: Unable to sign data before sending an authenticated message.

See the Message class's DigitalSignature property for more information about signing data.

CertificateNotProvided Message text: A user attempted to send an authenticated message without a certificate.

Message Queuing returns this error if the sending application attempts to use security context information to authenticate a message, and the security context does not include a certificate. For more information about certificates, see the Message class's SenderCertificate property.

ComputerDoesNotSupportEncryption Message text: The computer does not support encryption operations.

Message Queuing returns this error when the application requests encryption and the computer (source or destination) does not support encryption operations. When this error is returned, the encryption operation fails. For more information about using encryption, see the MessageQueue.EncryptionRequired and Message.EncryptionAlgorithm topics.

CorruptedInternalCertificate Message text: The internal Message Queuing certificate is corrupted.

This error applies only to Message Queuing 1.0.

CorruptedPersonalCertStore Message text: The personal certificate store is corrupted.

Message Queuing returns this error when the Microsoft Internet Explorer personal certificate store is corrupted.

CorruptedQueueWasDeleted Message text: The .ini file for the queue in LQS was deleted because it was corrupted.
CorruptedSecurityData Message text: A cryptographic function has failed.
CouldNotGetAccountInfo Message text: Could not get the account information for the user.
CouldNotGetUserSid Message text: Could not get the SID information out of the thread token.

For more information about sender identifiers, see the Message class's SenderId property.

DeleteConnectedNetworkInUse Message text: The connected network cannot be deleted; it is in use.

Message Queuing returns this error if it cannot delete the specified connected network because the network is defined in at least one other computer. Remove the connected network from all connected network lists and try again to delete it.

DependentClientLicenseOverflow Message text: The number of dependent clients served by this Message Queuing server reached its upper limit.
DsError Message text: Internal directory service error.
DsIsFull Message text: Directory service is full.

Message Queuing returns this error if the information store is full. This error applies only to Message Queuing 1.0.

DtcConnect Message text: Cannot connect to MS DTC.

Message Queuing returns this error if it is unable to connect to the Microsoft Distributed Transaction Coordinator.

EncryptionProviderNotSupported Message text: The Cryptographic Service Provider is not supported by Message Queuing.
FailVerifySignatureEx Message text: Signature of received message is not valid.
FormatNameBufferTooSmall This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Generic Message text: Generic Error.

Message Queuing returns this error if it cannot identify a more specific source.

GuidNotMatching Message text: Failed to create Message Queuing configuration object with a GUID that matches the computer installation. You must uninstall Message Queuing and then reinstall it.
IllegalContext Message text: Invalid context parameter.
IllegalCriteriaColumns This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalCursorAction This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalEnterpriseOperation Message text: The operation is invalid for a Message Queuing services object.
IllegalFormatName Message text: The given format name is invalid.

For valid format name syntax options, see the MessageQueue class's FormatName property.

IllegalMessageProperties This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalOperation Message text: The operation is invalid on foreign message queuing systems.
IllegalPrivateProperties This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalPropertyId This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalPropertySize This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalPropertyValue Message text: Invalid property value.
IllegalPropertyVt This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalQueuePathName Message text: Invalid queue path name.

See the MessageQueue class's Path property for valid path syntax options.

IllegalQueueProperties This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalRelation This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalRestrictionPropertyId This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalSecurityDescriptor This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalSort This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalSortPropertyId This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IllegalUser Message text: The user has an invalid user name.

Message Queuing returns this error if your application is connecting to it through an invalid user name.

InsufficientProperties Message text: Not all the required properties for the operation were specified in the input parameters.
InsufficientResources Message text: Insufficient resources to perform operation.

Message Queuing returns this error, for example, if there is not enough memory to complete the operation. When this error is returned, the operation fails.

InvalidCertificate Message text: The user certificate is not valid.

Message Queuing returns this error if the security certificate specified in the Message class's SenderCertificate property is invalid, or if the certificate is not correctly placed in the Microsoft Internet Explorer personal certificate store.

InvalidHandle This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
InvalidOwner Message text: Invalid object owner. For example CreateQueue failed because the Queue Manager object is invalid.

Message Queuing returns this error, for example, if your application attempts to create a queue on a computer on which Message Queuing is not installed.

InvalidParameter This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
IOTimeout Message text: The receive or peek message time-out has expired.

Message Queuing returns this error if the time-out specified in a call to MessageQueue.Receive or MessageQueue.Peek expires before a new message arrives in the queue. This can only happen if there was no message already in the queue; both methods would return immediately if a message exists.

LabelBufferTooSmall This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
MachineExists Message text: Computer with the same name already exists in the site.
MachineNotFound Message text: The specified computer could not be found.

Message Queuing returns this error if it cannot find the queue's computer in the directory service.

MessageAlreadyReceived Message text: A message that is currently pointed at by the cursor has been removed from the queue by another process or by another call to receive the message without the use of this cursor.

Message Queuing returns this error when some other cursor, application, or the system administrator has already removed the message from the queue. This error is most likely to occur when using the MessageEnumerator class, such as the instance returned through a call to MessageQueue.GetMessageEnumerator or MessageQueue.GetEnumerator.

MessageStorageFailed Message text: Could not store a recoverable or journal message. Message was not sent.

Message Queuing returns this error if the local computer cannot store a recoverable message (one whose delivery is guaranteed in the case of a network problem) or a journal message. See the Message class's Recoverable and UseJournalQueue properties for more information about these message sending options.

MissingConnectorType Message text: Connector Type is mandatory when sending an Acknowledgment or secure message.

Message Queuing returns this error when the application sets a property typically set by Message Queuing, but doesn't specify the connector to use. For more information about connector types, see the Message class's ConnectorType property.

MqisReadOnlyMode Message text: MQIS database is in read-only mode.
MqisServerEmpty Message text: The list of MQIS servers (in registry) is empty.

This error applies only to Message Queuing 1.0.

NoDs Message text: No connection with this site's controller(s).

Message Queuing returns this error if the application cannot access the directory service. If this error is returned, verify permissions for accessing the directory service.

NoEntryPointMsmqOcm Message text: Cannot locate an entry point in the MSMQOCM.DLL library.
NoGlobalCatalogInDomain Message text: Unable to find Global Catalog servers in the specified domain.
NoInternalUserCertificate Message text: The internal Message Queuing certificate for the user does not exist.

Message Queuing returns this error if no internal certificate is registered or the registered certificate is corrupted.

NoMsmqServersOnDc Message text: Failed to find Message Queuing servers on domain controllers.
NoMsmqServersOnGlobalCatalog Message text: Failed to find Message Queuing servers on Global Catalog domain controllers.
NoResponseFromObjectServer Message text: No response from object owner.

Message Queuing returns this error if there is no response from the directory service server. When this error is returned, the status of the operation is unknown.

ObjectServerNotAvailable Message text: Object owner is not reachable.

Message Queuing returns this error if the directory service server for the object is not available. When this error is returned, the operation fails.

OperationCanceled Message text: The operation was canceled before it could be completed.
PrivilegeNotHeld Message text: Client does not have the required privileges to perform the operation.
Property This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
PropertyNotAllowed Message text: Invalid property for the requested operation
ProviderNameBufferTooSmall This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
PublicKeyDoesNotExist Message text: The public key for the computer does not exist.

Message Queuing returns this error if it was able to query the directory service, but the enhanced key was not found. This error applies only to Message Queuing 2.0.

PublicKeyNotFound Message text: Unable to find the public key for computer.

Message Queuing returns this error, for example, if you are trying to retrieve the computer properties of a computer running Message Queuing 1.0 or if you are trying to get remote computer properties while working offline. This error applies only to Message Queuing 2.0.

QDnsPropertyNotSupported This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
QueueDeleted Message text: The queue was deleted. Messages cannot be received anymore using this queue instance. The queue should be closed.
QueueExists Message text: A queue with the same pathname is already registered.

Message Queuing registers public queues in the directory service, and registers private queues on the local computer.

QueueNotAvailable Message text: Error while reading from a queue residing on a remote computer.
QueueNotFound Message text: The queue is not registered in the directory service.

Message Queuing returns this error if it cannot find the queue. This includes public queues not registered in the directory service and Internet queues that do not exist in the Message Queuing namespace.

RemoteMachineNotAvailable Message text: The remote machine is not available.
ResultBufferTooSmall This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
SecurityDescriptorBufferTooSmall This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
SenderCertificateBufferTooSmall This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
SenderIdBufferTooSmall This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
ServiceNotAvailable Message text: The Message Queues service is not available.

Message Queuing returns this error if the application is unable to connect to the Queue Manager.

SharingViolation Message text: Sharing violation. The queue is already opened for exclusive receive.

Message Queuing returns this error if an application is trying to open an already opened queue that has exclusive read rights. For more information about receiving messages exclusively from a queue, see the MessageQueue class's DenySharedReceive property.

SignatureBufferTooSmall This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
StaleHandle This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
SymmetricKeyBufferTooSmall This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
TransactionEnlist Message text: Cannot enlist the transaction.
TransactionImport Message text: Cannot import the transaction.
TransactionSequence Message text: Wrong transaction operations sequence.
TransactionUsage Message text: Wrong transaction usage.

Message Queuing returns this error if an attempt was made to open a remote queue for read access from within a transaction, or an attempt was made to read a message from a nontransactional queue from within a transaction.

UnsupportedAccessMode Message text: The specified access mode is not supported.

Message Queuing returns this error if the access mode specified when opening the queue is set to an invalid value, or the access mode and the share mode specified are not compatible.

UnsupportedFormatNameOperation Message text: The requested operation for the specified format name is not supported.

Message Queuing returns this error when the requested operation is not supported for the specified format name. Operations include trying to open a queue to receive messages by specifying a direct format name.

UnsupportedOperation Message text: The operation is not supported for a WORKGROUP installation computer.
UserBufferTooSmall This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
WksCantServeClient Message text: Message Queuing-independent clients cannot serve Message Queuing-dependent clients.
WriteNotAllowed Message text: Another MQIS server is being installed; write operations to the database are not allowed at this time.

Example

[Visual Basic, C#, C++] The following example verifies whether a Message Queuing queue exists, and then deletes it.

[Visual Basic] 
Imports System
Imports System.Messaging

Namespace MyProject

    '/ <summary>
    '/ Provides a container class for the example.
    '/ </summary>
    Public Class MyNewQueue


        '**************************************************
        ' Provides an entry point into the application.
        '         
        ' This example verifies existence and attempts to 
        ' delete a queue.
        '**************************************************

        Public Shared Sub Main()

            ' Determine whether the queue exists.
            If MessageQueue.Exists(".\myQueue") Then

                Try

                    ' Delete the queue.
                    MessageQueue.Delete(".\myQueue")

                Catch e As MessageQueueException

                    If e.MessageQueueErrorCode = _
                        MessageQueueErrorCode.AccessDenied Then

                        Console.WriteLine("Access is denied. " _
                            + "Queue might be a system queue.")
                    End If

                    ' Handle other sources of exceptions as necessary.

                End Try

            End If


            Return

        End Sub 'Main

    End Class 'MyNewQueue 
End Namespace 'MyProject

[C#] 
using System;
using System.Messaging;

namespace MyProject
{
    /// <summary>
    /// Provides a container class for the example.
    /// </summary>
    public class MyNewQueue
    {

        //**************************************************
        // Provides an entry point into the application.
        //         
        // This example verifies existence and attempts to 
        // delete a queue.
        //**************************************************

        public static void Main()
        {

            // Determine whether the queue exists.
            if (MessageQueue.Exists(".\\myQueue"))
            {
                try
                {
                    // Delete the queue.
                    MessageQueue.Delete(".\\myQueue");
                }
                catch(MessageQueueException e)
                {
                    if(e.MessageQueueErrorCode == 
                        MessageQueueErrorCode.AccessDenied)
                    {
                        Console.WriteLine("Access is denied. " + 
                            "Queue might be a system queue.");
                    }

                    // Handle other sources of MessageQueueException.
                }

            }
        
            return;
        }

    }
}

[C++] 
#using <mscorlib.dll>
#using <system.dll>
#using <system.messaging.dll>

using namespace System;
using namespace System::Messaging;

int main() 
{
    // Determine whether the queue exists.
    if (MessageQueue::Exists(S".\\myQueue")) 
    {
        try 
        {
            // Delete the queue.
            MessageQueue::Delete(S".\\myQueue");
        }
        catch (MessageQueueException* e) 
        {
            if (e->MessageQueueErrorCode == 
                MessageQueueErrorCode::AccessDenied) 
            {
                Console::WriteLine(S"Access is denied. Queue might be a system queue.");
            }
            // Handle other sources of MessageQueueException.
        }

    }

    return 0;
}

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Namespace: System.Messaging

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Messaging (in System.Messaging.dll)

See Also

System.Messaging Namespace | MessageQueueException | MessageQueue | MessageEnumerator | Message

Show:
© 2015 Microsoft