title: Referenced WCF Service doesn't use app.config
body: <p>I coded a WCF service which is referenced in DLL.
  After I added that sevice reference an app.config was automatically generated with the requried data.</p>
  
  <p>The client is using the dll to communicate with the wcf service...nothing special.
  But when I'm trying to create an object of the service reference..its crashing, saying that it wasn't able to find an endpoint adress.</p>
  
  <p>I googled around and fixed it by passsing the the binding and adress to the service reference:</p>
  
  <pre><code>readonly BasicHttpBinding _binding = new BasicHttpBinding();
  readonly EndpointAddress _address = new EndpointAddress("http://localhost:50309/CustomerService.svc");
  
  using (CustomerServiceClient client = new CustomerServiceClient(_binding, _address))
  {
      return client.GetActions(customerNumber);
  }
  </code></pre>
  
  <p>I'm wondering now, why I have to pass those parameters, when those data is already in the automatically genrated app.config.
  I deleted the content of the app.config...and it seems those data isnt't used anywhere.</p>
  
  <p>Am I doing something wrong?</p>
  
  <p>EDIT:</p>
  
  <p>app config in the dll project:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
  &lt;system.serviceModel&gt;
      &lt;bindings&gt;
          &lt;basicHttpBinding&gt;
              &lt;binding name="BasicHttpBinding_ICustomerService" closeTimeout="00:01:00"
                  openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                  allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                  maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                  messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                  useDefaultWebProxy="true"&gt;
                  &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                      maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
                  &lt;security mode="None"&gt;
                      &lt;transport clientCredentialType="None" proxyCredentialType="None"
                          realm="" /&gt;
                      &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
                  &lt;/security&gt;
              &lt;/binding&gt;
          &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
          &lt;endpoint address="http://localhost:50309/CustomerService.svc"
              binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICustomerService"
              contract="ServiceReference.ICustomerService" name="BasicHttpBinding_ICustomerService" /&gt;
      &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;    
  </code></pre>