以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助] 没办法连接 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=190976) |
|
-- 作者:2900819580 -- 发布时间:2024/3/18 11:31:00 -- [求助] 没办法连接 老师,以下服务端,在本地用127.0.0.1可以正常操作,但上传到阿里云就不可以, 应该如何排查,用127.0.0.1:8010 也不行
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")) |
|
-- 作者:有点蓝 -- 发布时间:2024/3/18 11:39:00 -- 改为云服私有ip启动服务,不要使用*号:http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&replyID=714468&ID=104284&skin=1 HttpServer.Prefixes.Add("http://云服私有ip/") HttpServer.Prefixes.Add("http://云服私有ip:8010/") 如果有域名改为使用域名 HttpServer.Prefixes.Add("http://云服域名/") HttpServer.Prefixes.Add("http://云服域名:8010/") |
|
-- 作者:2900819580 -- 发布时间: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()
|
|
-- 作者:有点蓝 -- 发布时间:2024/3/18 17:12:00 -- 都显示什么内容? msgbox(util.IniReadValue("Section1", "IP")) msgbox(util.IniReadValue("Section1", "IPPort")) msgbox(util.IniReadValue("Section1", "Host")) msgbox(util.IniReadValue("Section1", "HostPort"))
|
|
-- 作者:2900819580 -- 发布时间: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编辑过]
|
|
-- 作者:有点蓝 -- 发布时间:2024/3/18 17:23:00 -- 安全组,防火墙开放端口了没有?http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&replyID=714468&ID=104284&skin=1 |
|
-- 作者:2900819580 -- 发布时间:2024/3/18 17:36:00 -- 也开了。 此主题相关图片如下:无标题2024031801.png 防火墙的8010端口也开了。
|
|
-- 作者:有点蓝 -- 发布时间:2024/3/18 20:03:00 -- 那不应该有问题。现在网页打开显示什么错误? |