You are not logged in.
Pages: 1
About example 30.
If I visit localhost:8092 from PC where I run the server application I see the client side on browser, but if I try to visit 192.168.xxx.xxx:8092 (192.168.xxx.xxx is ip of my server on my LAN) from other device (I have try from android phone with chrome) I cannot establish the connection. I just have set the firewall.
Do I need anything else?
Offline
You can try with plain socket server by defining ONLYUSEHTTPSOCKET in Synopse.inc line 604 to be sure this is not a HTTP.SYS related problem
In this moment I have solve the problem using "useBidirSocket" instead of "useHttpApiRegisteringURI".
This works though I get some error message on debug.
Offline
So the problem is in HTTP.SYS registration table (useBidirSocket use plain socket server). Most of all you have some "old" entries in http.sys registration table (call `netsh http show urlacl` as admin to see all entries and remove all entries related to port 8092 in your case)
Offline
So the problem is in HTTP.SYS registration table (useBidirSocket use plain socket server). Most of all you have some "old" entries in http.sys registration table (call `netsh http show urlacl` as admin to see all entries and remove all entries related to port 8092 in your case)
So I have:
1. Show allmy "old" entries with "netsh http show urlacl" as admin;
2. Delete all entries about port 8092 with "netsh http delete urlacl url=http://+:8092/", "netsh http delete urlacl url=http://+:8092/...", ...
3. Replace "useBidirSocket" with "useHttpApiRegisteringURI";
4. Run my application as admin the first time.
In this way I get the same result. I cannot access to my MVC application from external device.
Now the entries are correct.
Last edited by array81 (2018-10-16 21:09:21)
Offline
@Sapiem write something similar it this topic - https://synopse.info/forum/viewtopic.php?id=4656
I think the problem is somewhere in your Windows settings. Yes, windows sometimes is painful.
Offline
@Sapiem write something similar it this topic - https://synopse.info/forum/viewtopic.php?id=4656
I think the problem is somewhere in your Windows settings. Yes, windows sometimes is painful.
Good. It will be fun find the problemi.
Offline
@Sapiem write something similar it this topic - https://synopse.info/forum/viewtopic.php?id=4656
I think the problem is somewhere in your Windows settings. Yes, windows sometimes is painful.
Today I did some tests on a new PC (just bought so with Windows 10 clear installation), the result is the same. The "client side" is accessible from PC (when I run the application as administrator the first time) but not from other PCs connect by LAN (both cable and wifi).
useBidirSocket works but not useHttpApiRegisteringURI.
Any suggestions?
Offline
The latest info from my DevOps - for external access to Windows 10 HTTP.SYS based server initial registration (urlacl entry) should be a host name, not a + or *. So you should replace "+" to the host name. Hope it help
Offline
The latest info from my DevOps - for external access to Windows 10 HTTP.SYS based server initial registration (urlacl entry) should be a host name, not a + or *. So you should replace "+" to the host name. Hope it help
I have replace symbol with IP address of my server PC but nothing change. Works only in local. I cannot access from external (LAN) PC/smartphone.
This is crazy thing. Am I the only one to have this problem?
Offline
I think this is an issue related with windows firewall or antivirus.
Please, first check locally
· http://192.168.xxx.xxx:8092/<root defined>/timestamp
· or http://192.168.xxx.xxx:8092/<root defined>/mvc-info
then disable firewall and any antivirus and check from another computer same urls.
If it works, create an exception in firewall and enable again, and recheck it.
If the issue persists, please publish the results.
Hope it help
Offline
I am running more or less to the same connection problem:
- on the same PC, client is able to connect to server
- with firewall on client cannot connect to server although the server has been added to the firewall rules.
I have already run the server as administrator
- with firewall off client can connect to server
server code: fHttpServerDefault := TSQLHttpServer.Create('8092', [fRestServerDefault], '+', HTTP_DEFAULT_MODE);
client code: fRestClient := TSQLHttpClient.Create(fServerName, '8092', fModelDefault); // fServername='192.168.1.xxx'
FYI, the sample Project04 works flawlessly.
Does someone have an idea what I am missing?
Thanks in advance.
Last edited by wai-kit (2019-03-19 16:07:34)
fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...
Offline
Since sample project04 was working and the difference was in the Port used, I decided to change the port number from 8092 to 8080 and
now it worked! My client can connect to the server! :-)
fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...
Offline
Pages: 1