Editar

Compartilhar via


MsmqIntegrationBindingElement.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

The type of channel.

Parameters

context
BindingContext

The BindingContext with which to build the channel factory.

Returns

An MSMQ integration channel factory that can be used to create channels to send messages to existing MSMQ applications.

Exceptions

The context value is null.

The TChannel is not IOutputChannel.

ExactlyOnce is true and Durable is false.

-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 if there is no write permission to write to queue or if queue does not exist.

-or-

If CustomDeadLetterQueue is non-transactional.

-or-

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

-or-

MsmqAuthenticationMode is None and MsmqProtectionLevel is not None.

-or-

MsmqAuthenticationMode is Certificate or WindowsDomain and MsmqProtectionLevel is None.

Remarks

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.

Applies to