title: Behavior is not accessible for ChannelFactory authentication
body: <p>i'm calling a SOAP webservice with basic authentication from an Asp.Net Core 5 application. Instead implement a proxy client i prefear to use a programmatically method defining a ChannelFactory object.</p>
  <p>This is the service contract declaration</p>
  <pre><code>[ServiceContract]
  public interface IMySrv
  {
      [OperationContract]
      MyVM SrvMethod(string a, string b, string c);
  }
  </code></pre>
  <p>This is the method where i make the call</p>
  <pre><code>        BasicHttpBinding myBinding = new BasicHttpBinding();
          EndpointAddress myEndpoint = new EndpointAddress(&quot;http://my.url?wsdl&quot;);
          IMySrv myChannelFactory = new ChannelFactory&lt;IMySrv&gt;(myBinding, myEndpoint);
  
          ClientCredentials loginCredentials = new ClientCredentials();
          loginCredentials.UserName.UserName = &quot;user&quot;;
          loginCredentials.UserName.Password = &quot;pwd&quot;;
  
          myChannelFactory.Endpoint.Behaviors.Add(loginCredentials);  # Error here
  
          IMySrv client = myChannelFactory.CreateChannel();
          MyVM result = client.SrvMethod(a, b, c);
  
          return result;
  </code></pre>
  <p>This is my first project on .Net and i don't know how to use WCF, i'm trying to work it by two days but i continue to have the same error.</p>
  <p><strong>'ServiceEndpoint' does not contain a definition for 'Behaviors' and no accessible extension method 'Behaviors ' accepting a first argument of type 'ServiceEndpoint' could be found</strong></p>
  <p>I suppose that it depend on service implementation.</p>
  <p>Thanks for the patience.</p>
  <p>Davide</p>