我已经注册了主题和订阅,并且正在接收到我网站的推送通知。
watch命令是从控制台应用程序发送的,而推送通知订阅是发送到我的asp.net应用程序的。
但是,似乎我无法确认任何这些通知,因为相同的历史记录ID一遍又一遍地发送。我知道这一点,因为我的日志文件显示了这一点。我给出了600的确认时间。
public async Task<HttpResponseMessage> Post([FromBody] Message email)
{
try
{
string historyid = null;
string emailaddress = null;
if (email != null)
{
var data = Encoding.UTF8.GetString(Convert.FromBase64String(email.message.data));
JObject historyidobj = JObject.Parse(data);
historyid = (string)historyidobj["historyId"];
emailaddress = (string)historyidobj["emailAddress"];
Logger.Write(Encoding.UTF8.GetString(Convert.FromBase64String(email.message.data)));
loggerWrapper.PickAndExecuteLogging(emailaddress);
}
}
catch (Exception e)
{
loggerWrapper.PickAndExecuteLogging("general error" + e.ToString());
}
var response = new HttpResponseMessage();
response.StatusCode = HttpStatusCode.OK;
return response;
}