Export (0) Print
Expand All
Expand Minimize

MessageQueueErrorCode Enumeration

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

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

public enum class MessageQueueErrorCode

Member nameDescription
AccessDeniedMessage 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.

BadSecurityContextMessage text: Bad security context.

Message Queuing returns this error if the security context has become corrupted.

BaseMessage Queuing does not return this error code.
BufferOverflowMessage text: The buffer supplied to MQReceiveMessage for message body retrieval was too small. The message is not removed from the queue and part of the message body that fits in the buffer was copied.
CannotCreateCertificateStoreMessage 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.

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

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

CannotCreateOnGlobalCatalogMessage text: Failed to create an object on a specified global catalog server.
CannotGetDistinguishedNameMessage text: Failed to retrieve the distinguished name of local computer.
CannotGrantAddGuidMessage text: Failed to grant the "Add Guid" permission to current user.
CannotHashDataExMessage text: Unable to hash data for an authenticated message.
CannotImpersonateClientMessage 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.

CannotJoinDomainMessage text: Failed to join Message Queuing enterprise on Windows 2000 domain.
CannotLoadMsmqOcmMessage text: Cannot load the MSMQOCM.DLL library.
CannotOpenCertificateStoreMessage 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.

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

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

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

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

CertificateNotProvidedMessage 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.

ComputerDoesNotSupportEncryptionMessage 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.

CorruptedInternalCertificateMessage text: The internal Message Queuing certificate is corrupted.

This error applies only to Message Queuing 1.0.

CorruptedPersonalCertStoreMessage text: The personal certificate store is corrupted.

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

CorruptedQueueWasDeletedMessage text: The.ini file for the queue in LQS was deleted because it was corrupted.
CorruptedSecurityDataMessage text: A cryptographic function has failed.
CouldNotGetAccountInfoMessage text: Could not get the account information for the user.
CouldNotGetUserSidMessage 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.

DeleteConnectedNetworkInUseMessage 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.

DependentClientLicenseOverflowMessage text: The number of dependent clients served by this Message Queuing server reached its upper limit.
DsErrorMessage text: Internal directory service error.
DsIsFullMessage 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.

DtcConnectMessage text: Cannot connect to MS DTC.

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

EncryptionProviderNotSupportedMessage text: The Cryptographic Service Provider is not supported by Message Queuing.
FailVerifySignatureExMessage text: Signature of received message is not valid.
FormatNameBufferTooSmallMessage text: The format name buffer supplied to the API was too small to fit the format name.
GenericMessage text: Generic Error.

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

GuidNotMatchingMessage 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.
IllegalContextMessage text: Invalid context parameter.
IllegalCriteriaColumnsMessage text: Invalid MQCOLUMNS parameter.

Message Queuing returns this error if you are using the MessagePropertyFilter class and have selected false for all Boolean values and zero (0) for all integer values.

IllegalCursorActionMessage text: MQ_ACTION_PEEK_NEXT specified to MQReceiveMessage can not be used with the current cursor position.

System.Messaging.MessageEnumerator.MoveNext cannot be used with the current cursor position.

IllegalEnterpriseOperationMessage text: The operation is invalid for a Message Queuing services object.
IllegalFormatNameMessage text: The given format name is invalid.

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

IllegalMessagePropertiesMessage text: Illegal MQQMPROPS parameter, either null or with zero properties.

Illegal message properties, either nullptr or with zero properties.

IllegalOperationMessage text: The operation is invalid on foreign message queuing systems.
IllegalPrivatePropertiesThe private properties parameter value is invalid. This may be because it has a null value or has zero properties specified.
IllegalPropertyIdMessage text: Invalid property identifier value.
IllegalPropertySizeMessage text: Illegal property buffer size.

Message Queuing returns this error if the specified buffer for the message identifier or correlation identifier is not the correct size. See the Message class's Message.Id and Message.CorrelationId properties for more information about message identifiers.

IllegalPropertyValueMessage text: Invalid property value.
IllegalPropertyVtMessage text: Invalid VARTYPE value.
IllegalQueuePathNameMessage text: Invalid queue path name.

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

IllegalQueuePropertiesMessage text: Illegal MQQUEUEPROPS parameter, either null or with zero properties.

Illegal Queue Properties, either nullptr or with zero properties.

Message Queuing returns this error if you are using the MessageQueueCriteria class and have called ClearAll or have not specified any criteria to use when filtering queues. See the MessageQueueCriteria class or MessageQueue.GetPublicQueues for more information about filtering queue search criteria.

IllegalRelationMessage text: Invalid relation value in restriction.
IllegalRestrictionPropertyIdMessage text: Invalid propid value in MQRESTRICTION parameter.

Invalid property identifier value for restriction.

IllegalSecurityDescriptorMessage text: The specified security descriptor is not a valid security descriptor.
IllegalSortMessage text: Illegal sort specified (for example, duplicate columns).
IllegalSortPropertyIdMessage text: Invalid propid value in MQSORTSET.

Invalid property identifier value in for sort.

IllegalUserMessage 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.

InsufficientPropertiesMessage text: Not all the required properties for the operation were specified in the input parameters.
InsufficientResourcesMessage 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.

InvalidCertificateMessage 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.

InvalidHandleMessage text: An invalid handle passed to a function.

Message Queuing returns this error if the specified queue handle is not valid.

InvalidOwnerMessage 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.

InvalidParameterMessage text: An invalid parameter passed to a function.

Message Queuing returns this error if one of the parameters supplied by the operation is not valid.

IOTimeoutMessage 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.

LabelBufferTooSmallMessage text: The label buffer supplied to the API was too small.
MachineExistsMessage text: Computer with the same name already exists in the site.
MachineNotFoundMessage 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.

MessageAlreadyReceivedMessage 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.

MessageNotFoundMessage text: The specified message could not be found.

Message Queuing returns this error if it cannot find the specified message in the queue.

MessageStorageFailedMessage 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.

MissingConnectorTypeMessage 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 does not specify the connector to use. For more information about connector types, see the Message class's ConnectorType property.

MqisReadOnlyModeMessage text: MQIS database is in read-only mode.
MqisServerEmptyMessage text: The list of MQIS servers (in registry) is empty.

This error applies only to Message Queuing 1.0.

NoDsMessage 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.

NoEntryPointMsmqOcmMessage text: Cannot locate an entry point in the MSMQOCM.DLL library.
NoGlobalCatalogInDomainMessage text: Unable to find Global Catalog servers in the specified domain.
NoInternalUserCertificateMessage 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.

NoMsmqServersOnDcMessage text: Failed to find Message Queuing servers on domain controllers.
NoMsmqServersOnGlobalCatalogMessage text: Failed to find Message Queuing servers on Global Catalog domain controllers.
NoResponseFromObjectServerMessage 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.

ObjectServerNotAvailableMessage 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.

OperationCanceledMessage text: The operation was canceled before it could be completed.
PrivilegeNotHeldMessage text: Client does not have the required privileges to perform the operation.
PropertyMessage text: One or more of the passed properties are invalid.
PropertyNotAllowedMessage text: Invalid property for the requested operation
ProviderNameBufferTooSmallMessage text: The passed buffer for the Provider name property is too small.

See the Message class's AuthenticationProviderName property for more information about provider names.

PublicKeyDoesNotExistMessage 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.

PublicKeyNotFoundMessage 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.

QDnsPropertyNotSupportedDNS property is not supported as criteria to locate queues.

You cannot retrieve the DNS path name of a queue.

QueueDeletedMessage text: The queue was deleted. Messages cannot be received anymore using this queue instance. The queue should be closed.
QueueExistsMessage 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.

QueueNotAvailableMessage text: Error while reading from a queue residing on a remote computer.
QueueNotFoundMessage 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.

RemoteMachineNotAvailableMessage text: The remote machine is not available.
ResultBufferTooSmallMessage text: The supplied result buffer is too small.
SecurityDescriptorBufferTooSmallMessage text: The size of the buffer passed to MQGetQueueSecurity is too small.

Message Queuing returns this error if the supplied security buffer is too small for the security descriptor.

SenderCertificateBufferTooSmallMessage text: The passed buffer for the user certificate property is too small.

See the Message class's System.Messaging.Message.SenderCertificate property for more information about user certificates.

SenderIdBufferTooSmallMessage text: The passed buffer for the user identifier property is too small.

Message Queuing returns this error when the supplied sender identification buffer is too small. See the Message class's System.Messaging.Message.SenderId property for more information about sender identifiers.

ServiceNotAvailableMessage text: The Message Queues service is not available.

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

SharingViolationMessage 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.

SignatureBufferTooSmallMessage text: The passed buffer for the Signature property is too small.

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

StaleHandleMessage text: The Queue Manager service has been restarted. The queue handle is stale and should be closed.

Message Queuing returns this error if the specified handle was obtained in a previous session of the Queue Manager service.

SymmetricKeyBufferTooSmallMessage text: The passed buffer for the Symmetric key property is too small.

See the Message class's DestinationSymmetricKey property for more information about symmetric keys.

TransactionEnlistMessage text: Cannot enlist the transaction.
TransactionImportMessage text: Cannot import the transaction.
TransactionSequenceMessage text: Wrong transaction operations sequence.
TransactionUsageMessage 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 non-transactional queue from within a transaction.

UnsupportedAccessModeMessage 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.

UnsupportedFormatNameOperationMessage 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.

UnsupportedOperationMessage text: The operation is not supported for a WORKGROUP installation computer.
UserBufferTooSmallMessage text: Request failed because user buffer is too small to hold the returned information.
WksCantServeClientMessage text: Message Queuing-independent clients cannot serve Message Queuing-dependent clients.
WriteNotAllowedMessage text: Another MQIS server is being installed; write operations to the database are not allowed at this time.

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.

The following code example verifies whether a Message Queuing queue exists, and then deletes it.

#using <system.dll>
#using <system.messaging.dll>

using namespace System;
using namespace System::Messaging;
int 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 0;
}

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft