If the 4D TCP Network Components is not present and you try to start the built-in web server from the Web Server menu in User Mode, 4D will prompt you with: "You need the TCP/IP protocol to start 4D Web Server."
If you wish to start the web server procedurally using the command "Start Web Server", you will need to check the value of the OK system variable to know if the web server was started successfully. If the Web Server is successfully started, OK will be set to 1, otherwise OK is set to 0 (zero).
For example, lets say you have a couple of menu items that allow the user to turn the web server on an off as follows:
Then you could use the following code in the do_StartWebServer project method to manage the menu items properly:
START WEB SERVER
DISABLE MENU ITEM(3;1)
ENABLE MENU ITEM(3;2)