微信企业号回调模式 请求该url失败

大大黑眼圈 2015-08-15 11:26:54
不是主动模式 回调模式情况下 为什么输入的url总是提示失败 我只想调用webjs
请求url过不去 如果帮我解决另外赠送分数
这里面的请求网址我是用的mvc 里面的一个jsonresult 返回方法
...全文
6102 13 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
a1449 2017-03-01
  • 打赏
  • 举报
回复
引用 10 楼 huang361964533 的回复:
已解决 谢谢大家
怎么解决的,我用微信里的调试也是不能请求url
rimonlee 2017-02-14
  • 打赏
  • 举报
回复
我配置的php版的,老是提示:请求URL失败,HTTP返回码500
kampoo 2016-03-17
  • 打赏
  • 举报
回复
还没解决,服务器端没有收到响应!服务器在阿里云,有自己的域名,配置时跟楼主的错误一样!

    @RequestMapping(value = "auth", method = RequestMethod.GET)
    public @ResponseBody String auth(
            @RequestParam("signature") String signature,
            @RequestParam("timestamp") String timestamp,
            @RequestParam("nonce") String nonce,
            @RequestParam("echostr") String echostr,
            HttpServletRequest req) {
        log.info("REQ from {}:{} - {} {} {} {}", req.getRemoteHost(), req.getRemotePort(),
            signature, timestamp, nonce, echostr);
大大黑眼圈 2016-02-22
  • 打赏
  • 举报
回复
已解决 谢谢大家
跳打小鱼人 2016-01-17
  • 打赏
  • 举报
回复
兄台,如果你是用java语言,tomcat作为web容器的话 请参照官方文档在tomcat中覆盖两个jar包,根据jdk版本不同下载不同的UnlimitedJCEPolicyJDK版本里面有那两个jar包
陈秋歌 2015-09-28
  • 打赏
  • 举报
回复
该帖子已收录在微信开发学习路线专题中的子技术点企业号中。微信开发学习路线专题:http://bss.csdn.net/m/topic/learning_path_weixin。
大大黑眼圈 2015-09-14
  • 打赏
  • 举报
回复
@guowang457 已经解决了 这种主动模式的验证 重要的是当前页面的url 以及你要在手机微信里面测试才行
香蕉猪 2015-08-28
  • 打赏
  • 举报
回复
看看命名是否符合规范,,,token是否有效。。。微信接口测试是否正常通过。。。
guowang457 2015-08-26
  • 打赏
  • 举报
回复
我也遇到这样的问题,不知道怎么解决,楼主解决了吗
zekelove 2015-08-24
  • 打赏
  • 举报
回复
是不是页面没有进行网页授权
大大黑眼圈 2015-08-22
  • 打赏
  • 举报
回复
回调模式的url验证都通不过 下一步就没法进行下去了
大大黑眼圈 2015-08-22
  • 打赏
  • 举报
回复
    public void ProcessRequest(HttpContext context)
        {
            //string postString = string.Empty;
            if (HttpContext.Current.Request.HttpMethod.ToUpper() == "GET")
            {
                Auth();
            }
        }

        private void Auth()
        {
            #region 获取关键参数
            string token = ConfigurationManager.AppSettings["CorpToken"];//从配置文件获取Token
            if (string.IsNullOrEmpty(token))
            {
                //LogTextHelper.Error(string.Format("CorpToken 配置项没有配置!"));
            }
            string encodingAESKey = ConfigurationManager.AppSettings["EncodingAESKey"];//从配置文件获取EncodingAESKey
            if (string.IsNullOrEmpty(encodingAESKey))
            {
                //LogTextHelper.Error(string.Format("EncodingAESKey 配置项没有配置!"));
            }
            string corpId = ConfigurationManager.AppSettings["CorpId"];//从配置文件获取corpId
            if (string.IsNullOrEmpty(corpId))
            {
                //LogTextHelper.Error(string.Format("CorpId 配置项没有配置!"));
            }
            #endregion

            string echoString = HttpContext.Current.Request.QueryString["echoStr"];
            string signature = HttpContext.Current.Request.QueryString["msg_signature"];//企业号的 msg_signature
            string timestamp = HttpContext.Current.Request.QueryString["timestamp"];
            string nonce = HttpContext.Current.Request.QueryString["nonce"];

            string decryptEchoString = "";
            if (CheckSignature(token, signature, timestamp, nonce, corpId, encodingAESKey, echoString, ref decryptEchoString))
            {
                if (!string.IsNullOrEmpty(decryptEchoString))
                {
                    HttpContext.Current.Response.Write(decryptEchoString);
                    HttpContext.Current.Response.End();
                }
            }
        }
完全是按照网上的例子放到服务器上的ashx文件 这个有什么问题吗 求教大神
业余草 2015-08-18
  • 打赏
  • 举报
回复
多查看接口文档。 都有例子的。 实在不懂了,就把源码贴出来,看看

39,117

社区成员

发帖
与我相关
我的任务
社区描述
HTML5是构建Web内容的一种语言描述方式。HTML5是互联网的下一代标准,是构建以及呈现互联网内容的一种语言方式.被认为是互联网的核心技术之一。
社区管理员
  • HTML5社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧