When I create a new instance of a ChannelFactory:
var factory = new ChannelFactory<IMyService>();
and that I create a new channel, I have an exception saying that the address of the Endpoint is null.
My configuration inside my web.config is as mentioned and everything is as it is supposed to be (especially the address of the endpoint).
If I create a new MyServiceClientBase, it loads all the configuration from my channel factory:
var factoryWithClientBase = new MyServiceClientBase().ChannelFactory;
Console.WriteLine(factoryWithClientBase.Endpoint.Address); //output the configuration inside the web.config
var factoryWithChannelFactory = new ChannelFactory<IMyService>();
Console.WriteLine(factoryWithChannelFactory.Endpoint.Address); //output nothing (null)
Why?