简体   繁体   中英

Deploying ASP.NET Webhooks on web server with IIS7

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM