public ActionResult VerifyUrl() { //_logger.Debug("OneBoxService Verify Start"); string echostr = Request.QueryString["echoStr"]; string signature = Request.QueryString["signature"]; string timestamp = Request.QueryString["timestamp"]; string nonce = Request.QueryString["nonce"]; string reply = string.Empty; StringBuilder sb = new StringBuilder(); //_logger.Debug(string.Format("?echostr={0}&signature={1}×tamp={2}&nonce={3}", echostr, signature, timestamp, nonce)); if (WXBizMsgCrypt.CheckSignature(WeiXinAppToken, signature, timestamp, nonce, (a) => { return(FormsAuthentication.HashPasswordForStoringInConfigFile(a, "SHA1")); })) { reply = echostr; } else { reply = Guid.NewGuid().ToString(); } //_logger.Debug(string.Format("reply: {0}", reply)); //_logger.Debug("OneBoxService Verify End"); return(Content(reply)); }