MsmqIntegrationBindingElement::BuildChannelFactory<TChannel> Method (BindingContext^)
Builds a channel factory using the context provided.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
public: generic<typename TChannel> virtual IChannelFactory<TChannel>^ BuildChannelFactory( BindingContext^ context ) override
Parameters
- context
-
Type:
System.ServiceModel.Channels::BindingContext^
The BindingContext with which to build the channel factory.
Return Value
Type: System.ServiceModel.Channels::IChannelFactory<TChannel>^An MSMQ integration channel factory that can be used to create channels to send messages to existing MSMQ applications.
Type Parameters
- TChannel
The type of channel.
| Exception | Condition |
|---|---|
| ArgumentNullException | The context value is null. |
| ArgumentException | The TChannel is not IOutputChannel. |
| InvalidOperationException | ExactlyOnce is true and Durable is false. |
| InvalidOperationException | CustomDeadLetterQueue is not null and DeadLetterQueue is not Custom. |
| InvalidOperationException | DeadLetterQueue is set to Custom on Windows 2003/XP. |
| InvalidOperationException | ExactlyOnce is false and DeadLetterQueue is Custom. |
| InvalidOperationException | CustomDeadLetterQueue is set and if there is no write permission to write to queue or if queue does not exist. |
| InvalidOperationException | If CustomDeadLetterQueue is non-transactional. |
| InvalidOperationException | MsmqAuthenticationMode is set to WindowsDomain and if MSMQ is installed without Active Directory integration. |
| InvalidOperationException | MsmqAuthenticationMode is None and MsmqProtectionLevel is not None. |
| InvalidOperationException | MsmqAuthenticationMode is Certificate or WindowsDomain and MsmqProtectionLevel is None. |
This method builds a channel factory that enables the developer to create a client channel to communicate with a service. The channel factory is not a channel, but rather a factory that can create a channel. You create a channel by calling IChannelFactory<TChannel>.CreateChannel.
Available since 3.0