Uređivanje

Dijeli putem


MsmqTransportBindingElement.BuildChannelFactory<TChannel> Method

Definition

Builds a channel factory using the context provided.

public:
generic <typename TChannel>
 override System::ServiceModel::Channels::IChannelFactory<TChannel> ^ BuildChannelFactory(System::ServiceModel::Channels::BindingContext ^ context);
public override System.ServiceModel.Channels.IChannelFactory<TChannel> BuildChannelFactory<TChannel> (System.ServiceModel.Channels.BindingContext context);
override this.BuildChannelFactory : System.ServiceModel.Channels.BindingContext -> System.ServiceModel.Channels.IChannelFactory<'Channel>
Public Overrides Function BuildChannelFactory(Of TChannel) (context As BindingContext) As IChannelFactory(Of TChannel)

Type Parameters

TChannel

A IOutputSessionChannel or a IOutputChannel class.

Parameters

context
BindingContext

The BindingContext with which to build the channel factory.

Returns

A Message Queuing (MSMQ) channel factory that can be used to create channels to send messages to existing Message Queuing applications.

Exceptions

The context value is null.

The TChannel is not IOutputChannel or IOutputSessionChannel.

ExactlyOnce is true and Durable is false.

-or-

UseActiveDirectory is true and QueueTransferProtocol is not Native.

-or-

CustomDeadLetterQueue is not null and DeadLetterQueue is not Custom.

-or-

DeadLetterQueue is set to Custom on Windows 2003/XP.

-or-

ExactlyOnce is false and DeadLetterQueue is Custom.

-or-

CustomDeadLetterQueue is set and either there is no write permission to write to the queue, or the queue does not exist.

-or-

CustomDeadLetterQueue is non-transactional.

-or-

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

-or-

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

-or-

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

-or-

MsmqTransportSecurity.MsmqProtectionLevel is EncryptAndSign and UseActiveDirectory is false.

Examples

transportBindingElement.BuildChannelFactory<IOutputChannel>(context);

Remarks

A channel factory is created and initialized using the properties that have been set in the binding element. The initialized channel factory is then used to create output channels that can be used to send messages to a message queue.

Applies to