You are not logged in.
Pages: 1
How check that port is already in use when creating a server TSQLHttpServer (http.sys)?
Offline
@ab you are right, if a port is once registered it stays registered. The matter is that if you also register it for http/https access...
We had the problem at a customer where we switched from https to http and could "sometimes" (very serious) could not register Port.
As solution we made a little service start script which unregisters our ports before service start
// netsh http show urlacl
netsh http delete urlacl http://+:5001/root
netsh http delete urlacl https://+:5001/root
net start ourservice
hopefully this - "workaround" can help
Last edited by itSDS (2016-06-10 07:54:32)
Rad Studio 12.1 Santorini
Offline
You could just change the method to useHttpApi instead of useHttpApiRegisteringURI, with having previously registered the URI.
And you have the "deletion" feature using THttpApiServer.RemoveUrl instead of netsh commands (but need admin rights).
Offline
My approach: every time the program is being installed, it will first try to "delete" the url registration, then does the registration.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Pages: 1