【问题标题】:Blocked Webhook被阻止的 Webhook
【发布时间】:2020-11-06 15:24:03
【问题描述】:

我在 Twilio 中设置了一个消息传递 webhook,它以 https://******.*****corps.org:441/SMS 格式向 Azure 上服务器上的 URL 发送帖子控制器已经在本地使用 Ngrok 进行了测试并且效果很好,在 Azure 中,当我通过输入 URL 使用 get 时,我能够从 Web 服务器获得响应没问题,但是来自 Twilio 的帖子出现 11200 检索失败。有什么东西会阻止我不知道的 IIS 上的跨域帖子吗?

''' 公共类 SMSController : TwilioController { [HttpPost] 公共 TwiMLResult 索引(SmsRequest 请求) {

        var response = new MessagingResponse();

        UserProfile _userProfileFrom = UserProfileService.GetByTwilioFromPhone(request.From);           

...

        return TwiML(response);
    }

    [HttpGet]
    public ActionResult Index()  //works fine..
    {
        return View();
    }

}'''

【问题讨论】:

    标签: twilio webhooks


    【解决方案1】:

    感谢 Shoaib K 的编辑。我使用 Postman 发现了问题(我的代码中的数据库连接错误)。我能够创建手动帖子并在 Web.config 文件 (ASP.NET) 中设置以下内容:

           <compilation debug="true" targetFramework="4.7.2" />
           <customErrors mode="Off"></customErrors>```
    
    

    【讨论】:

      猜你喜欢
      • 2022-07-28
      • 1970-01-01
      • 1970-01-01
      • 2012-07-25
      • 2020-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-11
      相关资源
      最近更新 更多