dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


 
 

Webhooks Support in ASP.NET

Posted by Sandeep Chanda on Sep 22, 2015

Webhooks is a popular pattern that has been available for a while now and has already been exposed by some popular service providers such as DropBox, GitHub, PayPal and MailChimp, amongst others. Webhooks are simple Pub/Sub models that allows a consumer to subscribe to events published by services. For example, you can subscribe to an event in DropBox whenever a new file is created or an existing file is updated. Similarly, in GitHub you can subscribe to the code commit information.

The .NET web development team recently announced the support for Webhooks in ASP.NET. You can now both send and receive Webhooks with ASP.NET MVC 5 and Web API 2. Although still in preview, it provides out-of-the-box support for DropBox, PayPal, Slack, WordPress, etc. The receiver model allows you to receive Webhooks from these providers as well as custom Webhooks that you may have created (like other ASP.NET MVC 5 web applications or Web API 2.0 services).

On the sender side, it provides support for storing and managing subscriptions. You can also use the sender and receiver parts in isolation. The way the Webhooks functionality works in ASP.NET is that the Webhooks server exposes the event subscription information. It then creates an HTTP POST to the matching subscriber URI based on the filters describing the event, along with the message payload.



For the receiver side, you must install the appropriate NuGet packages for receiving the Webhooks. For example, you must install the Microsoft.AspNet.WebHooks.Receivers.GitHub package to receive Webhooks from GitHub. If you want to create a receiver from a custom ASP.NET site, then you must install the Microsoft.AspNet.WebHooks.Receivers.Custom package.

A good use case for Webhooks is to subscribe to events happening in SalesForce. Although SalesForce doesn't directly expose Webhooks, the SOAP services inside can be configured for the Webhooks pattern to publish events. The article here describes the details of configuring SalesForce for Webhooks.

TAGS:

ASP.NET, Webhooks


Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Recent Entries

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date