Question

Webhook subscription error C#

  • 7 October 2019
  • 3 replies
  • 1227 views

Hello,

I am getting an error on my webhook subscription.,

sub-521 WebHook is not reachable, even though I can see that the webhook is being invoked because it hits the breakpoint inside the if statement shown in attached; see error below that. I get a Status 200 Ok response when I invoke the webhook from PowerShell or Postman. I am using ASP.NET/C#. I've also included the subscription code. Thank you for your help.


3 replies

Userlevel 1

The message "Webhook is not reachable" could meant the validateToken was not returned in time or not returned at all.

Did you follow the instructions exactly shown in this quick start? If not, try that.

You highlighted the error on line 45. If that is true, what is the error details?

It works when I create the webhook project from the command line (dotnet new web). I am only seeing that error when I create the web project in Visual Studio (empty template).

Hello, I found the same problem , the solution for me was put the StreamReader in a Task.Run and use await for waiting the reader.

Reply