HTTPSys AddDefaultBinding

<< Click to Display Table of Contents >>

Navigation:  Forum >

HTTPSys AddDefaultBinding

Forum link

 


 

06-01-2021, 03:11 PM:

 

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

 


 

06-01-2021, 04:32 PM:

 

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.

 


 

06-02-2021, 07:54 AM:

 

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?

 


 

06-02-2021, 11:23 AM:

 

Hi Paul. You have read this: https://doc.atozed.com/en/iw15/develop/c...-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/');

 


 

06-03-2021, 08:23 AM:

 

(06-02-2021, 11:23 AM)Jose Nilton Pace Wrote: [ -> ]Hi Paul. You have read this: https://doc.atozed.com/en/iw15/develop/c...-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!