Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MsmqIntegrationBindingElement::BuildChannelListener<TChannel> Method (BindingContext^)

 

Builds a channel listener using the context provided.

Namespace:   System.ServiceModel.MsmqIntegration
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public:
generic<typename TChannel>
where TChannel : ref class, IChannel
virtual IChannelListener<TChannel>^ BuildChannelListener(
	BindingContext^ context
) override

Parameters

context
Type: System.ServiceModel.Channels::BindingContext^

The BindingContext with which to build the channel listener.

Return Value

Type: System.ServiceModel.Channels::IChannelListener<TChannel>^

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

Type Parameters

TChannel

The type of channel.

Exception Condition
ArgumentNullException

The context value is null.

ArgumentException

The TChannel is not IInputChannel.

InvalidOperationException

ExactlyOnce is true and Durable is false.

InvalidOperationException

Queue not readable.

InvalidOperationException

ExactlyOnce is true and queue is non-transactional.

InvalidOperationException

ExactlyOnce is false and queue is transactional.

InvalidOperationException

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

InvalidOperationException

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

InvalidOperationException

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

InvalidOperationException

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

InvalidOperationException
InvalidOperationException

MsmqAuthenticationMode is Certificate or WindowsDomain and MsmqProtectionLevel is None.

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.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft