以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]以http://方式远程升级,多数电脑出现如下问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=116206)

--  作者:ytzn
--  发布时间:2018/3/21 11:07:00
--  [求助]以http://方式远程升级,多数电脑出现如下问题
腾讯云服务器
图片点击可在新窗口打开查看此主题相关图片如下:微信图片_20180321.jpg
图片点击可在新窗口打开查看

在浏览器中访问

http://ip地址/update/update.txt

http://ip地址/update/update1.zip

通过后又能正常升级了



但下次升级又出现以上问题,请老师解惑,多谢!

--  作者:ytzn
--  发布时间:2018/3/21 11:10:00
--  
httprequest为:

Functions.Execute("微信头",e)
Dim cmd As New SQLCommand
cmd.ConnectionName = vars("_conn")

\'*****************************************************************************************
Dim fl As String = "d:\\web\\" & e.path
If filesys.FileExists(fl)
    Dim idx As Integer = fl.LastIndexOf(".")
    Dim ext As String  = fl.SubString(idx)
    Select Case ext
        Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar",".txt"
            \'e.Resp
            e.WriteFile(fl)
            Return \'这里必须返回
    End Select
End If




Select Case e.Path
    Case "logon.htm",""
        Functions.Execute("logon",e)
    Case Else
        Dim usernam As String=""
        Dim Password As String=""
        Dim userdeptnam As String=""
        If e.Cookies.ContainsKey("usernam")  Then
            usernam= e.Cookies("usernam") \'从cookie中获取用户名
            Password= e.Cookies("password") \'从cookie中获取用户密码
            userdeptnam= e.Cookies("userdeptnam")
        End If
        usernam=usernam.trim()
        Password=Password.trim()
        userdeptnam=userdeptnam.trim()
        \'essageBox.Show(usernam & "|0|" & Password)
        If Password>"" AndAlso Password.Length>5 AndAlso usernam>"" AndAlso usernam.Length>1  AndAlso userdeptnam>"" AndAlso userdeptnam.Length>1 Then
            Select Case e.Path
                Case "xs_xzml.htm"
                    Functions.Execute("xs_xzml",e)
                Case "xs_list.htm"
                    Functions.Execute("xs_List",e) \'分页显示
                Case "xs_edit.htm"
                    Functions.Execute("xs_Edit",e) \'生成订单编辑页面
                Case "xs_xzcph.htm"
                    Functions.Execute("xs_xzcph",e) \'分页显示
                Case  "xs_fl.htm"
                    Functions.Execute("xs_fl",e)
                Case "xs_sgwyy.htm"
                    Functions.Execute("xs_sgwyy",e) \'分页显示
                Case "xs_sgwyyd.htm"
                    Functions.Execute("xs_sgwyyd",e) \'分页显示
                Case "xs_sgckyy.htm"
                    Functions.Execute("xs_sgckyy",e) \'分页显示
                Case "xs_sgckky.htm"
                    Functions.Execute("xs_sgckky",e)
                Case "xs_sgckyyq.htm"
                    Functions.Execute("xs_sgckyyq",e) \'分页显示
                Case "xs_sgckkyq.htm"
                    Functions.Execute("xs_sgckkyq",e)
                Case "xs_sgckwb.htm"
                    Functions.Execute("xs_sgckwb",e)
                Case "xs_sgckbsg.htm"
                    Functions.Execute("xs_sgckbsg",e) \'分页显示
                Case "xs_xgch.htm"
                    Functions.Execute("xs_xgch",e)
                Case "xs_ckxs.htm"
                    Functions.Execute("xs_ckxs",e)
                    
                Case "sg_xzml.htm"
                    Functions.Execute("sg_xzml",e)
                Case "sg_ckyy.htm"
                    Functions.Execute("sg_ckyy",e) \'分页显示
                Case "sg_ckky.htm"
                    Functions.Execute("sg_ckky",e)
                Case "sg_ckwb.htm"
                    Functions.Execute("sg_ckwb",e)
                    
                    
                Case "qt_xzml.htm"
                    Functions.Execute("qt_xzml",e)
                Case "qt_cwbx.htm"
                    Functions.Execute("qt_cwbx",e)
                Case "qt_cwedit.htm"
                    Functions.Execute("qt_cwedit",e)
                Case "qt_xcjl.htm"
                    Functions.Execute("qt_xcjl",e)
                Case "qt_cwpz.htm"
                    Functions.Execute("qt_cwpz",e)
                Case "qt_cwpz1.htm"
                    Functions.Execute("qt_cwpz1",e)
                Case "qt_cwfl.htm"
                    Functions.Execute("qt_cwfl",e)
                Case "qt_yc.htm"
                    Functions.Execute("qt_yc",e)
                Case "qt_ycedit.htm"
                    Functions.Execute("qt_ycedit",e)
                Case "qt_ycfl.htm"
                    Functions.Execute("qt_ycfl",e)
                Case "qt_wz.htm"
                    Functions.Execute("qt_wz",e)
                Case "qt_wzt.htm"
                    Functions.Execute("qt_wzt",e)
                Case "kxb_sgjl.htm"
                    Functions.Execute("kxb_sgjl",e)
                    
                Case "k_l.htm"
                    Functions.Execute("k_l",e)
                    
                Case "upload.htm"
                    Functions.Execute("upload",e)
                Case "receive.htm"
                    Functions.Execute("receive",e)
            End Select
        Else
            Functions.Execute("logon",e)
        End If
End Select

--  作者:有点甜
--  发布时间:2018/3/21 11:14:00
--  

单独做一个项目,单独写这个代码

 

Dim fl As String = "d:\\web\\" & e.path
If filesys.FileExists(fl)
    Dim idx As Integer = fl.LastIndexOf(".")
    Dim ext As String  = fl.SubString(idx)
    Select Case ext
        Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar",".txt"
            e.WriteFile(fl)
            Return \'这里必须返回
    End Select
End If
 
然后,你测试升级或者执行这个代码下载
 
 

--  作者:ytzn
--  发布时间:2018/3/21 11:19:00
--  
ok,试试,多谢甜老师。
--  作者:ytzn
--  发布时间:2018/3/21 11:53:00
--  
重新做项目试了,还是不行,退出再进入,4、5次时有可能成功一次

在命令窗口运行 Network.DownloadFile("http://123.207.xxx.xx/update/update1.zip", "e:\\Release.zip")  不成功

但再浏览器中访问

http://ip地址/update/update.txt

http://ip地址/update/update1.zip

都能成功


--  作者:aduydgd
--  发布时间:2018/3/21 11:55:00
--  
你怎么不用系统提供的自动升级功能啊?
--  作者:ytzn
--  发布时间:2018/3/21 12:03:00
--  
就是用的系统自动升级出现一楼图示情况,以前用的是ftp,只有小部分电脑能升级,所以改用HTTP方式,还是多数电脑升级不了。

再往以前,我用的是xp系统生成的升级文件,没发现升级不了,以后换系统了,win7,win10后出现这个问题

--  作者:有点甜
--  发布时间:2018/3/21 12:56:00
--  

我测试了一下使用foxtable搭建的http下载正常(本地测试)。foxtable的http不支持多线程,多人同时使用的时候,有可能有问题。但未测试出你说的问题。

 

如果确实有问题,建议还是使用iis单独搭建吧,至少专业一些。


--  作者:ytzn
--  发布时间:2018/3/21 14:19:00
--  
ok  多谢!
--  作者:ytzn
--  发布时间:2018/3/21 19:32:00
--  
把升级路径改为 http://123.207.xxx.xx:32177/update/ 都可以升级了