Foxtable(狐表)用户栏目专家坐堂 → [求助] 没办法连接


  共有499人关注过本帖树形打印复制链接

主题:[求助] 没办法连接

帅哥,在线噢!
2900819580
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1325 积分:9621 威望:0 精华:0 注册:2015/6/30 8:46:00
[求助] 没办法连接  发帖心情 Post By:2024/3/18 11:31:00 [显示全部帖子]

老师,以下服务端,在本地用127.0.0.1可以正常操作,但上传到阿里云就不可以,

应该如何排查,用127.0.0.1:8010 也不行

》》》 关闭iis的80端口


HttpRequest 

Functions.Execute("ErrFileWite", "e.Path =" & e.Path & ",e.Host =" & e.Host & ",e.Port = " & e.Port & ", 完整地址 = " & e.Request.URL.ToString)

Dim wb As New weui

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Dim SPath As String = e.Path

Dim err As Integer

If SPath > "" Then

    If SPath.Contains(".rar") OrElse SPath.Contains(".pdf") Then

        Dim fl As String = Vars("WbPath") & "\SKFile\" & Spath

        Functions.Execute("ErrFileWite", "SPath.Contains = true----fl =" & fl)

        If FileSys.FileExists(fl) Then

            e.WriteFile(fl)

        Else

            err = 1

        End If

    Else

        Functions.Execute("ErrFileWite", "SPath.Contains = false---" & e.Path)

          err = 1

    End If

Else

    err = 1

End If

 

If err > 0 Then

    e.WriteString("欢迎登录网站!")

        err = 0

End If


启动_But开启服务_Click

 

Dim BtName As String = e.Sender.Text

If e.Sender.Text = "开启服务" Then

    HttpServer.Prefixes.Add("http://*/")

    HttpServer.Prefixes.Add("http://*:8010/")

    HttpServer.WebPath = Vars("WbPath")

    HttpServer.Start()

    e.Form.Controls("Label1").text = e.Sender.text

    e.Sender.Theme = "Office2010Red"

    e.Sender.Text = "停用服务"

    e.Form.Controls("Label1").text = "数据服务已经启用!"

    e.Form.Controls("Label1").ForeColor = Color.Green

ElseIf e.Sender.Text = "停用服务" Then

    HttpServer.Close()

    e.Sender.Theme = "ShinyBlue"

    e.Sender.Text = "开启服务"

    e.Form.Controls("Label1").text = "数据服务已经停用!"

    e.Form.Controls("Label1").ForeColor = Color.red

End If

 

Functions.Execute("ErrFileWite", Vars("WbPath"))


 回到顶部
帅哥,在线噢!
2900819580
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1325 积分:9621 威望:0 精华:0 注册:2015/6/30 8:46:00
  发帖心情 Post By:2024/3/18 17:07:00 [显示全部帖子]

老师,改成了用ini文件配置,还是不行,msgbox出来的内容是对得上的

Dim BtName As String = e.Sender.Text
Dim util As New INIClass(ProjectPath & "config.ini")
If util.ExistINIFile Then 
    Dim MyIP As String = util.IniReadValue("Section1", "IP")
    Dim MyIPPort As String = util.IniReadValue("Section1", "IPPort") 
    Dim MyHost As String = util.IniReadValue("Section1", "Host") 
    Dim MyHostPort As String = util.IniReadValue("Section1", "HostPort")
    MessageBox.Show("MyIP:" & MyIP & ">>>MyIPPort:" & MyIPPort & ">>>Host:" & MyHost & ">>>HostPort:" & myHostPort)
    If e.Sender.Text = "开启服务" Then
        '        HttpServer.Prefixes.Add("http://*/")
        '        HttpServer.Prefixes.Add("http://*:8010/")
        HttpServer.Prefixes.Add(util.IniReadValue("Section1", "IP"))
        HttpServer.Prefixes.Add(util.IniReadValue("Section1", "IPPort"))
        HttpServer.Prefixes.Add(util.IniReadValue("Section1", "Host"))
        HttpServer.Prefixes.Add(util.IniReadValue("Section1", "HostPort")) 
        
        HttpServer.WebPath = Vars("WbPath")
        HttpServer.Start()

 回到顶部
帅哥,在线噢!
2900819580
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1325 积分:9621 威望:0 精华:0 注册:2015/6/30 8:46:00
  发帖心情 Post By:2024/3/18 17:15:00 [显示全部帖子]

Dim MyIP As String = util.IniReadValue("Section1", "IP")
    Dim MyIPPort As String = util.IniReadValue("Section1", "IPPort") 
    Dim MyHost As String = util.IniReadValue("Section1", "Host") 
    Dim MyHostPort As String = util.IniReadValue("Section1", "HostPort")
    MessageBox.Show("MyIP:" & MyIP & ">>>MyIPPort:" & MyIPPort & ">>>Host:" & MyHost & ">>>HostPort:" & myHostPort)


此主题相关图片如下:无标题20240318.png
按此在新窗口浏览图片
[此贴子已经被作者于2024/3/18 17:15:48编辑过]

 回到顶部
帅哥,在线噢!
2900819580
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1325 积分:9621 威望:0 精华:0 注册:2015/6/30 8:46:00
  发帖心情 Post By:2024/3/18 17:36:00 [显示全部帖子]

也开了。
图片点击可在新窗口打开查看此主题相关图片如下:无标题2024031801.png
图片点击可在新窗口打开查看
防火墙的8010端口也开了。

 回到顶部