共用方式為


DeliveryChannel Element (ICF)

Contains elements that describe the properties of a single delivery channel.

語法

<DeliveryChannels>
    <DeliveryChannel>

Element Characteristics

Characteristic Description

Data type

None.

Default value

None.

Occurrence

Required once or more per DeliveryChannels element.

Updates

Can be added or deleted when updating the instance.

Element Relationships

Relationship Elements

Parent element

DeliveryChannels Element (ICF)

Child elements

DeliveryChannelName Element (ICF)

ProtocolName Element for DeliveryChannel (ICF)

Arguments Element (ICF)

備註

A delivery channel represents a specific delivery endpoint, such as an SMTP server. Each delivery channel is based on a delivery protocol, either standard or custom, and defines an instance of the use of a delivery protocol to deliver notifications.

Delivery channels are associated with subscriptions via a subscriber device. For example, when a subscriber selects to receive notifications on a cell phone, the cell phone subscriber device has an associated delivery channel that is configured to use the short message service (SMS) delivery protocol.

You must have at least one delivery channel for each delivery protocol used to deliver notifications. This includes the standard SMTP and File delivery protocols and any custom protocols defined in the Protocols element.

You can have multiple delivery channels that use the same delivery protocol. For example, you might have one SMS delivery protocol used by two SMS endpoints. You would need to define the SMS custom delivery protocol once in the Protocols element and then define two delivery channels in the DeliveryChannels element.

However, if you are defining a delivery channel for the built-in SMTP delivery protocol, you can define only one SMTP delivery channel. This is a limit set by the Microsoft .NET Framework SMTP implementation. If you define two SMTP delivery channels that use different SMTP servers, notifications might go to the wrong servers.

One way to avoid this problem is to use the Internet Information Services (IIS) SMTP service with the smart host option to relay messages. First, configure the IIS SMTP service to use smart host, and then configure your SMTP delivery channel as follows:

<DeliveryChannel>
    <DeliveryChannelName>EmailChannel</DeliveryChannelName>
    <ProtocolName>SMTP</ProtocolName>
</DeliveryChannel>

For more information about configuring the IIS SMTP service, see Using SMTP for Outgoing Messages in the Microsoft MSDN® Library.

範例

This example shows how to configure a delivery channel for the built-in File delivery protocol. The FileName value provides the path and file name for all File notifications.

<DeliveryChannel>
    <DeliveryChannelName>FileChannel</DeliveryChannelName>
    <ProtocolName>File</ProtocolName>
    <Arguments>
        <Argument>
            <Name>FileName</Name>
            <Value>C:\Output\Output.htm</Value>
        </Argument>
    </Arguments>
</DeliveryChannel>

This example shows how to configure a delivery channel for a custom delivery protocol built using the IHttpProtocolProvider interface. The PostURL value in this example is a parameter, which can be provided in the ParameterDefaults element or when creating the instance of Notification Services.

For more information, see 部署自訂傳遞通訊協定.

<DeliveryChannel>
    <ChannelName>HTTPChannel</ChannelName>
    <ProtocolName>HTTPDeliveryProtocol</ProtocolName>
    <Arguments>
        <Argument>
            <Name>ProtocolProviderClassName</Name>
            <Value>MyHttpDeliveryProtocol</Value>
        </Argument>
        <Argument>
            <Name>ProtocolProviderAssemblyName</Name>
            <Value>%AppPath%\HTTPProtocol.dll</Value>
        </Argument>
        <Argument>
            <Name>PostURL</Name>
            <Value>%URL%</Value>
        </Argument>
      </Arguments>
   </DeliveryChannel>

請參閱

參考

Application Definition File Reference

概念

Instance Configuration File Reference

說明及資訊

取得 SQL Server 2005 協助