Background
There was an announcement for 'Microsoft ASP.NET WebHooks Preview' on September 04, 2015, where Henrik F Nielsen announced the release of 'Microsoft ASP.NET WebHooks Preview' as a new member of ASP.NET family.
For more information regarding this announcement, please refer to the following link:
Introduction
In this article we will discuss about ASP.NET WebHook-Preview.
Throughout this article, we will discuss about WebHooks and implement the very first preview release of 'Microsoft ASP.NET WebHooks Preview'.
Purpose
Currently, 'Microsoft ASP.NET WebHooks Preview' has not finalized the release and it is in the stage where developer can try to use the magic of WebHooks in their code. In this article we will discuss more about this new member of ASP.NET family and try to understand the power of WebHooks using a simple program.
Prerequisite
There are no such major things required to start with WebHooks, we just need to know the following:
- Basics of Services (Web APIs etc.).
- Visual Studio 2013 or later.
- Basic knowledge of ASP.NET.
What is WebHook
To understand the first think about a scenario, where we need to perform some action on the output/result of an existing action.

Figure 1: WebHook
We can also consider callback in C#, where we are performing few custom actions on the results. Its not wrong if I say Program-A automatically triggered with an input of output from ProgramA.
In simple words, we can say WebHooks are program/methods/functions/piece-of-code, which modified the actual behavior of a web page, application, resource etc.
The interesting thing is that these program/triggers can be/ cannot be a part of actual website, web application where Program-A belongs.
The term Web reminds us of HTTP, so we can say that WebHooks are nothing just HTTP callback, moreover these are user-defined HTTP callback. In year 2007, term WebHook came to announce, when Jeff Lindsay take it from Hook.
“WebHook is a lightweight HTTP pattern providing a simple pub/sub model for wiring together Web APIs and SaaS services. When an event happens in a service, a notification is sent in the form of an HTTP POST request to registered subscribers. The POST request contains information about the event which makes it possible for the receiver to act accordingly.”
Real time examples of WebHooks
We have lot of examples in our daytoday life, maybe we missed the following:
- Checking-in/pushing a code into repository.
- Trigging deployment build.
- Posting comments on your favorite blogs.
- Post Trackback.


Muhammad Farhan AL-Haq SiddiquiPosted Sep 10, 2020, 1:04 AM
I want to write custom webhook and then expose my notification webhook url to different client. Could you share sample code that how can client triggered my url and access webhook POST method so that I can process functionality accordingly.
Mahesh BalshetwarPosted Mar 25, 2019, 5:13 AM
Gaurav, we are trying to get this working but we are facing issues. Do you have sample code to get this working? may be i am doing some mistake.
Humayun Kabir MamunPosted Sep 11, 2015, 2:24 AM
Great Share...
Ankit BansalPosted Sep 10, 2015, 1:04 AM
good one..thanks...
Pankaj Kumar ChoudharyPosted Sep 9, 2015, 9:45 PM
Thanks You sir to introduce us with new technique........
Rajeesh MenothPosted Sep 9, 2015, 7:03 AM
Nice Share Sir
RakeshPosted Sep 9, 2015, 5:43 AM
Nice Article sir :)
Karthikeyan KPosted Sep 9, 2015, 4:34 AM
Good one sir...Thanks for sharing us..