MsmqTransportBindingElement::BuildChannelListener<TChannel> Method (BindingContext^)
Builds a channel listener using the context provided.
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. |
Available since 3.0