#### 6.4.2 Registering the reference to the COS Naming server

You have two ways to register the reference to the root context of the COS Naming server the application will use:

- Setting up the `name_service` entry in the `[corba]` section in your configuration file, `name_service` is the `IOR` or `corbaloc` of the COS Naming server to use. See Using a configuration file for more details.
- Registering an initial reference using the `-ORBInitRef NamingService=<IOR>` or `-ORBInitRef NamingService=<corbaloc>` command-line argument. See the CORBA specifications for more details.
- Registering an initial reference for `NamingService` using the `CORBA.ORB.Register_Initial_Reference` function. See the CORBA specifications for more details.