gabrieldwight / Whatsapp-Business-Cloud-Api-Net

This is C# wrapper of whatsapp business cloud api for .NET
MIT License
296 stars 113 forks source link

working in local not working in server #100

Closed ki-erp closed 3 weeks ago

ki-erp commented 4 weeks ago

Describe the bug Unhandled Exception: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 157.240.16.16:443 at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult) at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context) at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar) --- End of inner exception stack trace --- at ConsoleApp1.Program.Main(String[] args)

gabrieldwight commented 4 weeks ago

Check your server if it is reachable from meta end when setting up the webhook and also check your server firewall configuration if it is getting a connection from meta.

ki-erp commented 4 weeks ago

Ok, thanks for reply,

I checked it was an Firewall issue.

Can u provide any example for asp.net MVC app. With webhook integration, i want implement WhatsApp page for replying to sender did we have any built in plugin for that, please help if you know the same, thanks in advanced.

On Thu, 15 Aug, 2024, 4:35 pm Gabriel Odero, @.***> wrote:

Check your server if it is reachable from meta end when setting up the webhook and also check your server firewall configuration if it is getting a connection from meta.

— Reply to this email directly, view it on GitHub https://github.com/gabrieldwight/Whatsapp-Business-Cloud-Api-Net/issues/100#issuecomment-2291080401, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR7QDSZUKOT5ZVEQGP5MHUTZRSDOVAVCNFSM6AAAAABMR6BC3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJRGA4DANBQGE . You are receiving this because you authored the thread.Message ID: <gabrieldwight/Whatsapp-Business-Cloud-Api-Net/issues/100/2291080401@ github.com>

gabrieldwight commented 4 weeks ago

You can have a look at this example The notification controller act as a webhook.

ki-erp commented 4 weeks ago

I turn off firewall but same error, how can I check reachable from meta or not?

From: Gabriel Odero @.> Sent: 15 August 2024 04:35 PM To: gabrieldwight/Whatsapp-Business-Cloud-Api-Net @.> Cc: Krishna Infotech @.>; Author @.> Subject: Re: [gabrieldwight/Whatsapp-Business-Cloud-Api-Net] working in local not working in server (Issue #100)

Check your server if it is reachable from meta end when setting up the webhook and also check your server firewall configuration if it is getting a connection from meta.

— Reply to this email directly, view it on GitHub https://github.com/gabrieldwight/Whatsapp-Business-Cloud-Api-Net/issues/100#issuecomment-2291080401 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AR7QDSZUKOT5ZVEQGP5MHUTZRSDOVAVCNFSM6AAAAABMR6BC3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJRGA4DANBQGE . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AR7QDS47XXJMB47KKAE4LTTZRSDOVA5CNFSM6AAAAABMR6BC3OWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUIR4ONC.gif Message ID: @. @.> >

gabrieldwight commented 4 weeks ago

ping your server with another device to see if it is reachable

ki-erp commented 4 weeks ago

Thank you for your reply, I got the issue AWS is Blocked outbound TCP port 80, 8080, 443 that’s why it’s not working, let me coordinate with them and get back to you with better result, thanks again.

From: Gabriel Odero @.> Sent: 16 August 2024 03:03 PM To: gabrieldwight/Whatsapp-Business-Cloud-Api-Net @.> Cc: Krishna Infotech @.>; Author @.> Subject: Re: [gabrieldwight/Whatsapp-Business-Cloud-Api-Net] working in local not working in server (Issue #100)

ping your server with another device to see if it is reachable

— Reply to this email directly, view it on GitHub https://github.com/gabrieldwight/Whatsapp-Business-Cloud-Api-Net/issues/100#issuecomment-2293170495 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AR7QDSYMZAY6776CHIFB2C3ZRXBMZAVCNFSM6AAAAABMR6BC3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGE3TANBZGU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AR7QDSYMIDNAUZQSVVXOTGLZRXBMZA5CNFSM6AAAAABMR6BC3OWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUIV4AT6.gif Message ID: @. @.> >