以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  启动WEB服务提示:仅允许以“/”结尾的 URI 前缀  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=176057)

--  作者:qzy
--  发布时间:2022/3/28 22:42:00
--  启动WEB服务提示:仅允许以“/”结尾的 URI 前缀
我想建立一个WEB数据源,涉及多个本地源,使用内部数据库表记录数据库连接参数和WEB服务名称,代码如下:
For Each dr As DataRow In DataTables("数据服务器").DataRows
    dr("状态")="1"
    HttpServer.Prefixes.Add("http://0.0.0.0/" & Tables("数据服务器").Current("服务器名称") & ".htm")
    HttpServer.Start()
Next
DataTables("数据服务器").Save()
运行时报错:仅允许以“/”结尾的 URI 前缀
                    参数名: uriPrefix
单独运行:    HttpServer.Prefixes.Add("http://127.0.0.1/")
                    HttpServer.Start()
也同样报错,请问大师是什么原因?
[此贴子已经被作者于2022/3/28 22:52:46编辑过]

--  作者:有点蓝
--  发布时间:2022/3/28 22:55:00
--  
启动服务仅需要ip和域名,不需要添加网页

HttpServer.close
HttpServer.Prefixes.Add("http://127.0.0.1/")
HttpServer.Start()

--  作者:qzy
--  发布时间:2022/3/28 23:18:00
--  
我需要多个本地数据源,操作手册介绍说是这样
Select Case e.Path
   
Case "DataServer.htm"
        e.AsDataServer("Orders")

   
Case "Sales.htm"
        e.AsDataServer("Sales")

End
Select
怎么创建不同的e.Path?


--  作者:有点蓝
--  发布时间:2022/3/28 23:29:00
--  
这个和启动服务没有什么关系

不同的数据源是在客户端指定的:http://www.foxtable.com/mobilehelp/topics/286.htm

--  作者:qzy
--  发布时间:2022/3/28 23:33:00
--  
懂了,谢谢老师!