Developing a Custom Delivery Protocol
Notification Services provides standard delivery protocols you can use immediately in your instance's delivery channels. However, if you want to deliver notifications using a different protocol than those provided by the standard components, you must develop a custom delivery protocol. A custom delivery protocol component implements the message creation and transport requirements of a network protocol, thereby making it accessible within the Notification Services system.
Delivery Protocol Interfaces
Developing a custom delivery protocol involves developing a managed class that implements one of two interfaces that are provided by Notification Services:
- The IHttpProtocolProvider interface is provided to make it easy to develop a custom HTTP-based delivery protocol. It simplifies development in the case of HTTP-based protocols by providing all of the HTTP-related functionality, so that you need to provide code only to format the message envelope and process the response from the server.
- The IDeliveryProtocol interface is used for custom delivery protocols that implement other protocols, or for HTTP-based delivery protocols that require more flexibility than IHttpProtocolProvider provides.
Both of these interfaces are in the Microsoft.SqlServer.NotificationServices namespace.
You must implement a custom delivery protocol as a class in a managed code assembly. This assembly can reside anywhere, with the full path to the assembly provided in the instance configuration.
Declaring and Using Custom Delivery Protocols
You must configure Notification Services instances and applications to use custom delivery protocols:
- You must declare each custom delivery protocol in the instance configuration. For more information, see Defining Custom Delivery Protocols.
- You must define one or more delivery channels that use the custom delivery protocol. For more information, see Defining Delivery Channels.
- You must declare the notification class-specific information required by that delivery protocol. For more information, see Configuring Delivery Protocols.
Web Services
If your custom delivery protocol calls a Web service and you want to use Windows Authentication, you must configure the Notification Services engine to pass its credentials to the Web service proxy. You configure engine properties in the NSService.exe.config file.
Add the following XML as a child of the configuration element:
<system.web>
<authentication mode="Windows" />
<identity impersonate="true" />
</system.web>
See Also
Tasks
Configuring Notification Services Event Logging
Other Resources
Standard Delivery Protocols
Developing Custom Notification Services Components