我正在使用 C#.NET 在 ASP.NET 中构建一个 Web 应用程序,它使用 clickatell 发送 SMS。
我试图通过创建一个名为 ClickatellCallBack.aspx 的回调页面从 clickatell 接收返回的状态,但未成功这是该页面的代码隐藏:
public partial class ClickatellCallBack : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// 从 QueryString 中检索值。
字符串 apiID = Request.QueryString["api_id"];
字符串来自 = Request.QueryString["from"];
字符串 to = Request.QueryString["to"];
字符串时间戳 = Request.QueryString["timestamp"];
字符串 apiMsgId = Request.QueryString["apiMsgId"];
字符串 cliMsgId = Request.QueryString["cliMsgId"];
字符串状态 = Request.QueryString["status"];
字符串费用 = Request.QueryString["charge"];// Insert the SMS Status values into the database. int smsStatusID = SMSManager.InsertSMSStatus(apiID, from, to, timestamp, apiMsgId, cliMsgId, status, charge);
}
}
基本上,此页面检索从 clickatell 发送的查询字符串值并将它们插入到数据库表中。
我已经使用 clickatell 注册了以下回调 URL:http : //www.mydomain.com/ClickatellCallBack.aspx 并选择了回调类型:HTTP GET
在我的“sendmsg”命令中,我将传递确认和回调请求设置如下:deliv_ack=1 和 callback=3
唯一的问题是似乎什么都没有发生。Clickatell 似乎无法访问回调 URL。
我错过了什么吗?难道我做错了什么。我是否需要使用 ASP.NET 页面以外的东西来实现这个回调 URL?我缺少一些clickatell设置吗?
任何帮助将不胜感激。
问候
沃尔特