2

I have read through a few .NET Webhooks tutorials and since it is relatively new for .NET the examples are pretty limited. I followed the tutorials to create a Webhook project in VS2013. When I published the project I got three files (Global.asax. package.config, Web.config) and a bin folder with the dll's. Here are a couple of the tutorials:

https://blogs.msdn.microsoft.com/webdev/2015/09/04/introducing-microsoft-asp-net-webhooks-preview/

http://www.dotnetcurry.com/aspnet/1245/aspnet-webhooks-receive-webhooks-from-github

All of the tutorial examples I have come across utilize Azure to publish their Webhook. We have our own web server with IIS7. I created a folder (appfolder) on our web server, another folder in it called mailchimp and placed the published files and bin folder in that folder so the path would be D:\appfolder\mailchimp. I then created a new Site in IIS7 named apps.mysite.org pointing to D:\appfolder. So as I believe the URI for the webhook should be http://apps.mysite.org/mailchimp/api/webhooks/incoming/mailchimp. However, when I try to set the Webhook URL in my Mailchimp list it tells me "We couldn't connect to the specified URL.

What do I need to do to set up my web server to receive .NET Webhooks? I would assume that the api/webhooks/incoming/mailchimp is a folder path but have not been able to find what I need to place in there.

Any assistance to go further would be awesome.

iJared
  • 887
  • 3
  • 13
  • 26
  • are you using this sample code: https://github.com/aspnet/WebHooks/tree/master/samples/MailChimpReceiver.Selfhost or you have own custom code.Do you have complete stack trace? – Gaurav Arora Nov 05 '16 at 20:39
  • Take a look - http://social.technet.microsoft.com/wiki/contents/articles/35798.understanding-microsoft-asp-net-webhooks.aspx and make sure you have followed all steps – Gaurav Arora Nov 05 '16 at 20:40
  • How about if I want to deploy WebHook Web Api project on my private server (non-azure environment)? Can it be something like Owin? – Coder Absolute Dec 16 '16 at 16:45
  • @CoderAbsolute - You can deploy it on your private hosting, hosting is not restricted for Azure environment. – Gaurav Arora Jan 08 '17 at 21:13
  • Any luck finding a solution to this? – James Hill Mar 14 '17 at 16:36
  • No I haven't. I was attempting to use web hooks with MailChimp because they upgraded their API and I couldn't find a .Net wrapper for their API 3.0. However, in the course of trying to figure this out. Someone created a .Net wrapper that is very similar to the MailChimp API 2.0 .Net wrapper we were using so I went that direction instead. I was trying to just delete this question but can't find where to do that. – iJared Mar 23 '17 at 21:04
  • any luck with this? I am also looking for hosting Webhook on IIS. Please help if anyone knows. – Teknas Aug 07 '20 at 15:54

1 Answers1

1

The WebHook URI doesn't look right:

http://apps.mysite.org/mailchimp/api/webhooks/incoming/mailchimp

It should be of the form

http://apps.mysite.org/api/webhooks/incoming/mailchimp?code=<somesecret>

The <somesecret> is a random value that you set when registering the URI with MailChimp. Also, in practice it should also 'https' and not 'http'.

Hope this helps!

Henrik

Henrik Frystyk Nielsen
  • 3,092
  • 1
  • 19
  • 17
  • In MailChimp there is no secret code as there is in many of the .Net webhook tutorials. ie: https://blogs.msdn.microsoft.com/webdev/2015/09/04/introducing-microsoft-asp-net-webhooks-preview/ Besides from what I gather from many tutorials the secret code is just a value you pass with your URL for you to verify in your code to make certain the webhook call is one that you created and not one from a random bot. Thus the code is really optional and not required. At least that's what my understanding it from reading. – iJared Mar 23 '17 at 21:06