You are not logged in.
I use a wireliess router for a desktop PC and a notebook to access the internet, and they are set with the static ip as 192.168.1.101 and 192.168.1.103, both can ping the other successfully!
but the samble code: 14 - Interface based services and 04 - HTTP Client-Server seems not work!
TSQLRestClientURINamedPipe can't connect to server "RestService"
via "\\.\pipe\Sqlite3_RestService":
system cannot find the file
(name pipe)
or
"Calculator" interface or REST routing not supported by server: {
"ErrorCode":403,
"ErrorText":"Forbidden"
}.
(htttp/ tcp/ip)
the error msg happened when both run on the desktop PC
when the client ran on the notebook, similar errors happened!
will anyone be kind enough to give me any instruction, thank you all!
Last edited by childem (2013-03-27 10:38:51)
Offline
I suspect most of your information is already in the SAD pdf - ensure you got the latest 1.18 revision.
1. The named pipe protocol does not work over a network since Windows Vista, unless you do a lot of IT security tuning.
2. You need to have the same RESTful authentication on both sides (i.e. call SetUser - or not - on both sides).
And let your firewall allow to serve the content over the network.
Online
Thank you, ab!
it is a great help, I will check every aspect to set the right conditions!
(I ran the server on win7, the client on xp)
Offline
No problem to have diverse versions of Windows.
There is no system requirement.
You do not need to install IIS or have a Windows Server edition.
Windows XP is good enough to have all mORMot features, including high speed http.sys web server.
It will even work in Windows 2000, but with some points disabled (http server will be socket-based, in Windows 2000, so will be less scalable).
Online
I was very hesitating to follow to ask again, because it may be a quite stupid question!
Still It's about example 14 - Interface based services.
I ran the client on notebook (192.168.1.103), and the server on the desktop PC (192.168.1.101), so I modified the example unit to:
0: Client := TSQLHttpClient.Create('192.168.1.101','888',Model);
I checked the server program in winhex to view the modules loaded, but I couldn't find either winsock.dll or ws2_32.dll (the latter was found with the client).
And I set a breakpoint at unit synwinsock(.pas) at the following point before running the server:
function InitSocketInterface(const Stack: TFileName= ''): Boolean;
begin
Result := False;
SockEnhancedApi := False;
but it was not fired, (while fired when the client is running), which meaning, it didn't load either dll.
I had tried a third-party example, which works normally on two computers in the same ethernet.
I'm skin shallow over the source codes!
so I'm wondering if I had missed something, which caused the error "Server not available - Unable to connect to 192.168.1.101:888 - .....".
Thank you very much, ab!
By the way, the codes come from the trunk dated 2013-03-27 16:29:35.
Last edited by childem (2013-03-27 21:34:38)
Offline
For remote access, you need to use HTTP/IP transmission protocol.
That is, you need to use Project14ServerHttp.dpr as server and select "HTTP / TCP-IP" as protocol in Project14Client.exe, after having set the server IP, as you made.
I just tested it, and it works with no problem.
Is there any error in the server .log file?
Which version of the Delphi compiler are you using?
Online