Click here to Skip to main content
15,946,988 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
currently i am working in bigcommerce, and create a public app,
my requirement is when any product delete create or update a web hook fire and need some details of the product . I am creating the webhooks using c#. But there is no way to receive the hook response.

What I have tried:

i am install Microsoft.Asp.net.WebHooks.receivers.custome and Microsoft.Asp.net.WebHooks.receivers
the add a apicontroller
public class BigCommerceReceiver : ApiController,IWebHookReceiver
    {
        public string Name => throw new NotImplementedException();

        // GET api/<controller>
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2" };
        }

        // GET api/<controller>/5
        public string Get(int id)
        {
            return "value";
        }

        // POST api/<controller>
        //[HttpPost]
        //[Route("api/webooks/include/productcreate")]
        public void Post([FromBody]string value)
        {
        }

        // PUT api/<controller>/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/<controller>/5
        public void Delete(int id)
        {
        }

        [HttpPost]
        [Route("api/webooks/include/productdelete")]
        public Task<HttpResponseMessage> ReceiveAsync(string id, HttpRequestContext context, HttpRequestMessage request)
        {
            throw new NotImplementedException();
        }
    }


but hook response not hit my controller .
Posted
Updated 19-Nov-18 9:49am

1 solution

Have you followed the instructions from the official documentation on how to setup WebHook Receivers here: ASP.NET WebHooks receivers | Microsoft Docs[^]
 
Share this answer
 
Comments
brajalal mahanty 20-Nov-18 4:08am    
Yes but no output in my case
Vincent Maverick Durano 21-Nov-18 16:15pm    
Double check your configuration and make sure webhook handler is properly configured. Here's an article I found that may help you troubleshoot: https://www.dotnetcurry.com/aspnet/1245/aspnet-webhooks-receive-webhooks-from-github
Member 12045288 19-Jul-19 2:15am    
@mahanty is this issue resolved, I am facing the same problem

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900