Hi Friends,
In this section, we will look at Config-Less Hosting.
WCF does not require config file. It only requires endpoint information. It does not matter which medium it is coming from. You can provide all these information from the code itself. You can get all mandatory information from some source say xml file or database to construct the endpoint. I will give the demo by simply hardcoding the same. Let us go to console hosting. Nevertheless, before making any change in code, let me just comment the config section for WCF in APP.config file. Below is the snippet in the finished state.