public class WxMessage
{
public string ToUserName { get; set; }
public string FromUserName { get; set; }
public long CreateTime { get; set; }
public string Content { get; set; }
public string MsgType { get; set; }
public string EventName { get; set; }
public string EventKey { get; set; }
}
总结
开发微信接口的过程中不能调试,唯一排除问题的方式就是在关键的地方记log。
微信事件交互主要是分析微信发送的xml数据包,解析xml,并按照消息指定格式拼接xml发送给response。在Get方法里用到的CheckSignature 是盛派微信SDK的一个类,也就是对签名校验。
向客户端发送消息时主要ToUserName和FromUserName。我一开始把两个参数写反了导致客户端收不到消息。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持ASPKU。
注:相关教程知识阅读请移步到c#教程频道。










