locked
Deploying ASP.NET Webhooks on web server with IIS7 RRS feed

  • Question

  • User1041458432 posted

    Edit:

    -------------------------

    Just to make more clarification, I am trying to create an application to receive Webhook posts from MailChimp.  I pieced together some different tutorials mostly the two linked below to create a basic application.  We at present do not want to use Microsoft Azure to host our application and would rather host it on our own public facing server. 

    --------------------------

    I 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 as a Publish to File System not directly to web server and I got three files (Global.asax. package.config, Web.config) and a bin folder with a few dll's.  Here are links to the couple of the tutorials I followed:

    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 called appfolder on our web server, another folder in it called mailchimp the I copy/pasted the published files and bin folder from my local computer into the mailchimp folder so everything would be in D:\appfolder\mailchimp.  I then created a new Site in IIS7 named apps.mysite.org pointing to D:\appfolder.  In all of the tutorials, the URI for a webhook should be http://{domain name}/api/webhooks/incoming/{webhook type} so for a MailChimp Webhook the URI should be: http://apps.mysite.org/mailchimp/api/webhooks/incoming/mailchimp.  However, when I log into MailChimp and enter the URI into their field and click OK the MailChimp site 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.

    Friday, October 7, 2016 8:10 PM

All replies

  • User36583972 posted

    Hi cheungj,

    As far as I know, most APIs there’s a request followed by a response. No request is required for a webhook, it just sends the data when it’s available.

    To use a webhook, you register a URL with the company providing the service. That URL is a place within your application that will accept the data and do something with it. In some cases, you can tell the provider the situations when you’d like to receive data. Whenever there’s something new, the webhook will send it to your URL.

    Webhooks, webhook URLs and a sample implementation example of webhooks:

    http://www.codeproject.com/Articles/576278/Webhooks-webhook-URLs-and-a-sample-implementation

    Best Regards,

    Yohann Lu

    Monday, October 10, 2016 6:52 AM
  • User1041458432 posted

    Hi Yohann,

    I was hoping with my long explanation that someone reading it would understand I have already done and understand all that you explained.  I understand how general webhooks work.  I am looking for information specifically on ASP.NET Webhooks.  How to set up our webserver to be able to receive the data that is sent from mailchimp.

    Thanks,

    cheungj

    Wednesday, October 12, 2016 11:32 PM
  • User36583972 posted

    Hi cheungj,

     I am looking for information specifically on ASP.NET Webhooks.  How to set up our webserver to be able to receive the data that is sent from mailchimp

    The following information for your reference.

    WebHook Receivers:

    https://docs.asp.net/projects/webhooks/en/latest/receiving/receivers.html

    Best Regards,

    Yohann Lu

    Monday, October 17, 2016 3:30 AM
  • User1041458432 posted

    Yohann,

    Again, if you take the time to read my original post you should see that I am already at the point of where the linked tutorial you provided stops.  That tutorial is one of the first I read.  What I need is information on proceeding further.  What I need is information on hosting my Mailchimp Webhook receiver on my own web server and not on Azure.  What I need is assistance to figure out what I am missing aside from what is in all these tutorials.  If you have experience with ASP.NET Webhooks then please ask me questions regarding what I have and have done and assist me to figure out what I still need to do.  Otherwise please stop sending me to links with general information that I have already read.

    Thanks,

    Jared

    Tuesday, October 18, 2016 7:54 PM
  • User1771544211 posted

    Hi cheungj,

    Have you checked your webhooks on IIS Express with debug mode on Visual Studio? What's the result?

    If not, please test it on IIS Express with Visual Studio, then you can figure out if your application is working or not.

    If it works, it should be related to the IIS configuration settings. If it doesn't work, it should be related to your application's code.

    Please find how to test it on IIS Express with Visual Studio in the following link(Paragraph:Trying it Out).

    https://blogs.msdn.microsoft.com/webdev/2015/09/15/sending-webhooks-with-asp-net-webhooks-preview/#try-it-out

    Best Regards,

    Jean

    Tuesday, October 25, 2016 2:36 AM
  • User1041458432 posted

    Hello Jean,

    That example seems to be a way to test an application you have built to send Webhooks.  I guess my original post was not clear enough that I am trying to receive Webhook posts from MailChimp.  Running my application in debug mode in Visual Studio with IIS Express doesn't provide me with a public URL I can set within MailChimp to send the Webhook to.

    Tuesday, October 25, 2016 8:48 PM