Port number file

In which file inside the application code we can find the list of port numbers that the application is entitled to listen?

Usually there's a configuration file (or files) outside the application code and its name and location vary between application. What's the name of your application?

My application is essbase. Could you please let me know the extension of the config file and any path deatils will be helpful.

Unless you mean ports with numbers <= 1024. Those are reserved for root.

This site:
Service Name and Transport Protocol Port Number Registry

lists ports that outside vendors will use and ports the OS expects to use.

Some of it is odd to say the least. The developers of doom (id software) got port 666 for example.

It seems that its agent's default port is 1423. I suppose it's all written in the documentation.