Επεξεργασία

Κοινή χρήση μέσω


MsmqIntegrationBindingElement.BuildChannelListener<TChannel> Method

Definition

Builds a channel listener using the context provided.

public:
generic <typename TChannel>
 where TChannel : class, System::ServiceModel::Channels::IChannel override System::ServiceModel::Channels::IChannelListener<TChannel> ^ BuildChannelListener(System::ServiceModel::Channels::BindingContext ^ context);
public override System.ServiceModel.Channels.IChannelListener<TChannel> BuildChannelListener<TChannel> (System.ServiceModel.Channels.BindingContext context) where TChannel : class, System.ServiceModel.Channels.IChannel;
override this.BuildChannelListener : System.ServiceModel.Channels.BindingContext -> System.ServiceModel.Channels.IChannelListener<'Channel (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)> (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
Public Overrides Function BuildChannelListener(Of TChannel As {Class, IChannel}) (context As BindingContext) As IChannelListener(Of TChannel)

Type Parameters

TChannel

The type of channel.

Parameters

context
BindingContext

The BindingContext with which to build the channel listener.

Returns

An MSMQ integration channel listener that can be used to create channels to receive messages from existing MSMQ applications.

Exceptions

The context value is null.

The TChannel is not IInputChannel.

ExactlyOnce is true and Durable is false.

-or-

Queue is not readable.

-or-

ExactlyOnce is true and queue is non-transactional.

-or-

ExactlyOnce is false and queue is transactional.

-or-

ReceiveErrorHandling is set to Move and queue name contains a ";" in Windows Vista.

-or-

ExactlyOnce is set to true and cannot open retry sub-queue in Windows Vista.

-or-

ReceiveErrorHandling is set to Reject or Move and the platform is Windows Vista.

-or-

MsmqAuthenticationMode is set to WindowsDomain and if MSMQ is installed without Active Directory integration.

-or-

MsmqAuthenticationMode is None and MsmqProtectionLevel is not None.

-or-

MsmqAuthenticationMode is Certificate or WindowsDomain and MsmqProtectionLevel is None.

Remarks

Channel listeners are created on the service and are used to receive messages sent by a client channel. The service must call IChannelListener.Open and then IChannelListener.AcceptChannel to get a reference to the actual channel. Then IChannel.Open must be called to open the channel. At this point, the channel can be used to retrieve messages.

Applies to