diff --git a/B3WeChat/Rpcs/ClientRpc.cs b/B3WeChat/Rpcs/ClientRpc.cs index 8fb6f68..cee4ac2 100644 --- a/B3WeChat/Rpcs/ClientRpc.cs +++ b/B3WeChat/Rpcs/ClientRpc.cs @@ -36,7 +36,9 @@ namespace BWP.B3WeChat.Rpcs [Rpc] public static void Send(string username, string content) { + logger.Info("Send Begin"); string oppenid = GetOpenId(username).ToString(); + logger.Info("Send+username:" + username + ",content" + content + ",oppenid"); string[] param = content.Split('|'); switch (param[0]) { diff --git a/B3WeChat/Utils/InOutMessageUtil.cs b/B3WeChat/Utils/InOutMessageUtil.cs index 741e7d0..9f2c56c 100644 --- a/B3WeChat/Utils/InOutMessageUtil.cs +++ b/B3WeChat/Utils/InOutMessageUtil.cs @@ -37,7 +37,7 @@ namespace BWP.B3WeChat.Utils public static string GetToken() { string token = string.Empty; - string uriStr = string.Format("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1}", config.AppID, config.AppSecret); + string uriStr = string.Format("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1}", config.AppID.Value, config.AppSecret.Value); WebClient client = new WebClient(); string responseBody = string.Empty; @@ -196,7 +196,7 @@ namespace BWP.B3WeChat.Utils /// * 开发者获得加密后的字符串可与signature对比,标识该请求来源于微信。 public static bool CheckSignature() { - string WeChat_Token = config.Token;//从配置文件获取Token + string WeChat_Token = config.Token.Value;//从配置文件获取Token string WeChat_Key = HttpContext.Current.Request.QueryString["key"]; //从微信服务器接收传递过来的数据