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.

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

 

Builds a channel listener using the context provided.

Namespace:   System.ServiceModel.Channels
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>^

A Message Queuing (MSMQ) channel listener that can be used to create channels to receive messages from existing MSMQ applications.

Type Parameters

TChannel

The channel type to be used to build the channel listener. Permitted channel types are IInputSessionChannel or a IInputChannel class.

Exception Condition
ArgumentNullException

The context value is null.

ArgumentException

The TChannel is not IInputChannel or IInputSessionChannel.

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

MsmqTransportSecurity.MsmqAuthenticationMode is set to WindowsDomain and if MSMQ is installed without ActiveDirectory integration.

InvalidOperationException

MsmqTransportSecurity.MsmqAuthenticationMode is None and MsmqTransportSecurity.MsmqProtectionLevel is not None.

InvalidOperationException

MsmqTransportSecurity.MsmqAuthenticationMode is Certificate or WindowsDomain and MsmqTransportSecurity.MsmqProtectionLevel is None.

transportBindingElement.BuildChannelListener<IInputChannel>(context);

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