Atozed Forums
HTTPSys AddDefaultBinding - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: HTTPSys AddDefaultBinding (/thread-2423.html)



HTTPSys AddDefaultBinding - PaulWeem - 06-01-2021

Hi,

With Intraweb 15.2.29 on Delphi 10.4.1, I created an HTTPSys application with a specific URL reservation in the ServerController.OnBind event.
Therefore, I don't need the "HTTP://+:8888/" reservation.

But when I uncheck "AddDefaultBinding", I get the errormessage "Add explicit binding(s) via BoundIP property or set AddDefaultBinding"

Am I not allowed to disable the default binding?

Cheers, Paul


RE: HTTPSys AddDefaultBinding - kudzu - 06-01-2021

Bindings are used only with SA mode. With HTTP.sys bindings are controlled when registering the service and any IP binding is done in the URL that you register.


RE: HTTPSys AddDefaultBinding - PaulWeem - 06-02-2021

I understand it is needed for SA, but when I install it as a service, I get the following results when executing
"netsh http show servicestate | findstr /r "Server\ Session HTTP"  in a command prompt.

HTTPS://<URL>:443/
HTTP://<URL>:80/
HTTP://<URL>:8888/

The first two are defined in the OnBind event, the last one is automatically genereted, but AFAIK not needed.
Why is there a switch to disable default binding, if it doesn't allow it?


RE: HTTPSys AddDefaultBinding - Jose Nilton Pace - 06-02-2021

Hi Paul. You have read this: https://doc.atozed.com/en/iw15/develop/creating-http-sys-applications-with-intraweb/
Try set:
ServerController->HostWildcard := hwWeak;
ServerController->AddDefaultBinding := False;
ServerController->VirtualHostNames := 'http://url.com';

and in your OnBind:
aHttpBindings.Clear;
aHttpBindings.Add('http://<url>:80/');
aHttpsBindings.Clear;
aHttpsBindings.Add('https://<url>:443/');



RE: HTTPSys AddDefaultBinding - PaulWeem - 06-03-2021

(06-02-2021, 11:23 AM)Jose Nilton Pace Wrote: Hi Paul. You have read this: https://doc.atozed.com/en/iw15/develop/creating-http-sys-applications-with-intraweb/
Try set:
ServerController->HostWildcard := hwWeak;
ServerController->AddDefaultBinding := False;
ServerController->VirtualHostNames := 'http://url.com';

and in your OnBind:
aHttpBindings.Clear;
aHttpBindings.Add('http://<url>:80/');
aHttpsBindings.Clear;
aHttpsBindings.Add('https://<url>:443/');

Hi Jose,

Thanks for the tip(s), appreciated and they work.
The first part I already figured out and raised my question.
The second part I didn't figure out myself, but did the trick.

Thanx again!