The WCF endpoint was not found for the service interface


There are similar/same questions on stackoverflow but none really helper. I'm trying to authenticate WPF user through WCF service, but when i call IdentityValidator, instantly this error is thrown

"Could not find default endpoint element that references contract
'CongregatioServiceReference.ICongregatioService' 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."

As much as I understand WCF (And I only have really limited knowledge of it) new WCF should generate endpoints by itself and well it did as long as I haven't tried adding identity validation in it.

My Service App namespace is 'Congregatio.ServiceApp', this is config:

<?xml version="1.0" encoding="utf-8"?>

    <!-- For more information on Entity Framework configuration, visit -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
    <add key="owin:AutomaticAppStartup" value="false" />
      <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
             <add name="xml" />
      <source name="System.ServiceModel.MessageLogging">
            <add name="xml" />
      <source name="myUserTraceSource" switchValue="Critical, Error, Warning">
            <add name="xml" />
        <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="Error.svclog" />
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
        <binding name="AuthenticationBinding">
          <security mode="Message">
            <message clientCredentialType="UserName" />

          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true" />
        <behavior name="authBehavior">
            <userNameAuthentication userNamePasswordValidationMode="Custom"
                                    customUserNamePasswordValidatorType="Congregatio.ServiceApp.IdentityValidator,Congregatio.ServiceApp" />
          <serviceAuthorization principalPermissionMode="Custom" serviceAuthorizationManagerType="Congregatio.ServiceApp.RoleValidator,Congregatio.ServiceApp">

      <add binding="basicHttpsBinding" scheme="https" />
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />

    <modules runAllManagedModulesForAllRequests="true" />
        To browse web app root directory during debugging, set the value below to true.
        Set to false before deployment to avoid disclosing web app folder information.
    <directoryBrowse enabled="true" />
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion="" />
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion="" />
        <assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion="" />
        <assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion="" />
    <!-- Some connection strings i won't be sharing :( -->

Tried changing endpoint as told in other similar questions, however then I got Content not supported exception

Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost:50767/Service1.svc.  The client and service bindings may be mismatched

WPF client enpoints:

     <!--Default Working One-->
            <endpoint address="http://localhost:50767/Service1.svc" binding="basicHttpBinding"
                name="BasicHttpBinding_ICongregatioService" />
     <!-- My messy one -->

By default, WCF will use basicHttpBinding for an endpoint over http. It looks like you are trying to use wsHttpBinding, but there are no endpoints defined for it, nor does WCF know to use wsHttpBinding as the default for any communication over http.

There are two ways to resolve this. First, you can tell WCF to use wsHttpBinding for any communication over http in the <protocolMaping> section of the service config file, like this:

  <add binding="basicHttpsBinding" scheme="https" />
  <add binding="wsHttpBinding" scheme="http" />

Note that this would effectively disable the basicHttpBinding endpoint, as you have told WCF to use wsHttpBinding for any http endpoint that is not explicitly set to another http binding. You will also get the default values for wsHttpBinding, as there is no endpoint defined that uses the binding configuration you specified.

The second way is to define an endpoint explicitly in the service config that uses wsHttpBinding in the <system.serviceModel> section, like this:

  <service name="Congregatio.ServiceApp">
    <endpoint address="" binding="wsHttpBinding"
              contract="CongregatioServiceReference.ICongregatioService" />

Note that the name attribute needs to match the name attribute in the markup of the .svc file.