以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  foxtable web server has started(error 404)  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=170893)

--  作者:qwz405
--  发布时间:2021/8/10 16:44:00
--  foxtable web server has started(error 404)
通过微信模板信息,点击【查看详情】登录,偶尔会弹错误页面:foxtable web server has started(error 404)
然后关闭错误页面,再点击【查看详情】又可以正常开启需要的页面。

个人感觉可能是登录验证的问题。

If e.host = "www.bbb.cn" Then Dim OpenID As String Dim sb As New StringBuilder sb.AppendLine("<meta name=\'viewport\' c>") If e.GetValues.ContainsKey("code") Then Dim ul As String = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={0}&secret={1}&code={2}&grant_type=authorization_code" ul = CExp(ul,"wxd0106***","541e1c7d***",e.GetValues("code")) Dim hc As new HttpClient(ul) Dim jo As JObject = JObject.Parse(hc.GetData) If jo("openid") IsNot Nothing Then OpenID = jo("openid") e.AppendCookie("openid",OpenID) End If Else OpenId = e.Cookies("openid") End If Dim Verified As Boolean Dim dr As DataRow = DataTables("Users").SQLFind("[openid] =\'" & OpenID & "\'") If OpenId > "" AndAlso dr IsNot Nothing Then \'If OpenId > "" AndAlso dr IsNot Nothing AndAlso dr("离职") = 0 Then Verified = True ElseIf e.GetValues.ContainsKey("code") = False Then \'msgbox(UrlEncode(e.Request.URL.ToString)) Dim ul As String = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd0106***&redirect_uri=" & UrlEncode(e.Request.URL.ToString) & "&response_type=code&scope=snsapi_base&state=123#wechat_redirect" \'Dim ul As String = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd0106a4***&redirect_uri=http%3a%2f%2fwww.abc.cn&response_type=code&scope=snsapi_base&state=123#wechat_redirect" sb.Append("<meta http-equiv=\'Refresh\' c>") e.WriteString(sb.ToString) Return \'必须的 End If Dim wb As New weui If Verified = False Then wb.InsertHTML("<meta http-equiv=\'Refresh\' c>") e.WriteString(wb.Build) \'生成网页 Return \'必须的 ElseIf e.path = "" Then \'从登录页访问 wb.InsertHTML("<meta http-equiv=\'Refresh\' c>") e.WriteString(wb.Build) \'生成网页 Return \'必须的 End If End If


--  作者:有点蓝
--  发布时间:2021/8/10 16:50:00
--  
请贴出完整代码
--  作者:foxtable-hg
--  发布时间:2021/8/19 9:11:00
--  
我也遇见这个问题了,微信扫码登录就跳这个错误。。之前运行正常 好奇怪
--  作者:有点蓝
--  发布时间:2021/8/19 9:23:00
--  
可能原因:

1、代码中间出错没有执行完,导致没有数据返回前端
2、重复调用e.WriteString


--  作者:foxtable-hg
--  发布时间:2021/8/19 12:00:00
--  

用的是类似e.Redirect("../")代码。这一句之前执行的e.AppendCookie("token",token)执行成功,但是没有跳转到入口页面
页面直接显示了
foxtable web server has started(error 404).
[此贴子已经被作者于2021/8/19 12:01:00编辑过]

--  作者:有点蓝
--  发布时间:2021/8/19 12:04:00
--  
Redirect这个是bug,等下个版本更新
--  作者:foxtable-hg
--  发布时间:2021/8/19 12:29:00
--  
如果确认是个bug,那现在是不是只能用e.writestring来代替了?
--  作者:有点蓝
--  发布时间:2021/8/19 13:30:00
--  
是的
--  作者:foxtable-hg
--  发布时间:2021/8/19 14:30:00
--  
谢谢蓝版 调整了。
--  作者:qwz405
--  发布时间:2021/11/17 9:19:00
--  
老师, 您好。

已经更新到最新版的Foxtable:修正了HttpRequest事件的Redirec方法失效的BUG。

但上述问题一直都存在:
每天第1次登录系统,报错:foxtable web server has started(error 404).
第2次点击相同的链接,可正常登录。

复制第1次报错的地址,如下所示:
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd010***&redirect_uri=https%3a%2f%2fwww.abc.cn%2f20111117.htm%3fkey%3d%2b7FWJ00147&response_type=code&scope=snsapi_base&state=123#wechat_redirect

看上面记录,是要调整redirect,不知道要怎么调整?