NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Robert Iliuta on June 08, 2009, 02:44:41 AM

Title: Change web server port at run time
Post by: Robert Iliuta on June 08, 2009, 02:44:41 AM
Hallo,


There is a way to change the port at runt time ?


Thank you,
Robert
Title: Re: Change web server port at run time
Post by: Alberto on June 08, 2009, 07:07:13 AM
Mhhh I dont know if you can do it at runtime and do not imagine the reazon, but if what you want is a way to define the port outside the exe, then, define a variable as the port and at startup read it from an ini file, for exaple:

loc:port = getini('gmed','port',88,'.\gmed.ini')

Hope this helps
Alberto
Title: Re: Change web server port at run time
Post by: Bruce on June 08, 2009, 10:01:34 PM
Hi Robert,

I use what Alberto suggested.

It is possible to actually change the port while the app is running though.
You need to .Close the server, and then .Open it again with the new port value.

Cheers
Bruce
Title: Re: Change web server port at run time
Post by: Robert Iliuta on June 09, 2009, 05:18:01 AM
Hallo Bruce,

Now it works. Forgot about .Close the server :-)

Thank you Alberto for suggestion.

Regards,
Robert