<p>When I create a new instance of a ChannelFactory:</p>

<pre><code>var factory = new ChannelFactory&lt;IMyService&gt;();
</code></pre>

<p>and that I create a new channel, I have an exception saying that the address of the Endpoint is null. </p>

<p>My configuration inside my web.config is as mentioned and everything is as it is supposed to be (especially the address of the endpoint).</p>

<p>If I create a new MyServiceClientBase, it loads all the configuration from my channel factory:</p>

<pre><code>var factoryWithClientBase = new MyServiceClientBase().ChannelFactory;
Console.WriteLine(factoryWithClientBase.Endpoint.Address); //output the configuration inside the web.config


var factoryWithChannelFactory = new ChannelFactory&lt;IMyService&gt;();
Console.WriteLine(factoryWithChannelFactory.Endpoint.Address); //output nothing (null)
</code></pre>

<p>Why?</p>

Will it work if you provide the endpoint with a name like this in Web.Config:
```
```
<endpoint address="http://localhost:2000/MyService/" binding="wsHttpBinding"
    behaviorConfiguration="wsHttpBehaviour" contract="IService"
    name="MyWsHttpEndpoint" />
```
```
And create the channel using ChannelFactory like this:
```
```
var factory = new ChannelFactory<IMyService>("MyWsHttpEndpoint");
```
```