title: Could not find default endpoint element error
body: <p>I am getting below error while consuming a WCF service. I have developed a wcf service which is being consumed by a usercontrol.And user control is used as module in DNN.</p>
  
  <p>But if i simply consume the wcf in web application it is working fine but consuming in DNN module is giving below error</p>
  
  <blockquote>
    <p>Could not find default endpoint element that references contract 'OperationService.IOperation' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.</p>
  </blockquote>
  
  <p>Please advise.</p>
  
  <p>Client side config is below</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;bindings&gt;
          &lt;wsHttpBinding&gt;
              &lt;binding name="WSHttpBinding_IOperation" /&gt;
          &lt;/wsHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
          &lt;endpoint address="http://localhost:54147/WCFService/Service.svc"
              binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IOperation"
              contract="OperationService.IOperation" name="WSHttpBinding_IOperation"&gt;
              &lt;identity&gt;
                  &lt;dns value="localhost" /&gt;
              &lt;/identity&gt;
          &lt;/endpoint&gt;
      &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p><strong>Added service config of wcf service from comment</strong></p>
  
  <pre><code>&lt;system.serviceModel&gt; 
    &lt;services&gt;
      &lt;service behaviorConfiguration="ServiceBehavior" name="Operation"&gt; 
        &lt;endpoint address="" binding="wsHttpBinding" 
                  contract="IOperation"&gt;
          &lt;identity&gt;
            &lt;dns value="localhost"/&gt; 
          &lt;/identity&gt; 
        &lt;/endpoint&gt;
        &lt;endpoint address="mex" binding="mexHttpBinding" 
                  contract="IMetadataExchange"/&gt; 
      &lt;/service&gt; 
    &lt;/services&gt;
    &lt;behaviors&gt; 
      &lt;serviceBehaviors&gt;
        &lt;behavior name="ServiceBehavior"&gt; 
          &lt;serviceMetadata httpGetEnabled="true"/&gt; 
          &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt; 
        &lt;/behavior&gt;
      &lt;/serviceBehaviors&gt; 
    &lt;/behaviors&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>