コード例 #1
0
        public void ChangeHostBehavior(ServiceHostBase host)
        {
            var          srvCredentials = new CoreWCF.Description.ServiceCredentials();
            LdapSettings _ldapSettings  = new LdapSettings("yourownserver.mscore.local", "mscore.local", "yourowntoporg");

            srvCredentials.WindowsAuthentication.LdapSetting = _ldapSettings;
            host.Description.Behaviors.Add(srvCredentials);
        }
コード例 #2
0
        public ServiceCredentials Clone()
        {
            ServiceCredentials result = CloneCore();

            if (result == null || result.GetType() != GetType())
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException(SR.Format(SR.CloneNotImplementedCorrectly, GetType(), (result != null) ? result.ToString() : "null")));
            }
            return(result);
        }
コード例 #3
0
 protected ServiceCredentials(ServiceCredentials other)
 {
     if (other == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(other));
     }
     UserNameAuthentication           = new UserNamePasswordServiceCredential(other.UserNameAuthentication);
     ClientCertificate                = new X509CertificateInitiatorServiceCredential(other.ClientCertificate);
     ServiceCertificate               = new X509CertificateRecipientServiceCredential(other.ServiceCertificate);
     WindowsAuthentication            = new WindowsServiceCredential(other.WindowsAuthentication);
     IssuedTokenAuthentication        = new IssuedTokenServiceCredential(other.IssuedTokenAuthentication);
     SecureConversationAuthentication = new SecureConversationServiceCredential(other.SecureConversationAuthentication);
     _saveBootstrapTokenInSession     = other._saveBootstrapTokenInSession;
     _exceptionMapper = other._exceptionMapper;
 }
コード例 #4
0
ファイル: ServiceCredentials.cs プロジェクト: sq2907/CoreWCF
 protected ServiceCredentials(ServiceCredentials other)
 {
     if (other == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(other));
     }
     userName                    = new UserNamePasswordServiceCredential(other.userName);
     clientCertificate           = new X509CertificateInitiatorServiceCredential(other.clientCertificate);
     serviceCertificate          = new X509CertificateRecipientServiceCredential(other.serviceCertificate);
     windows                     = new WindowsServiceCredential(other.windows);
     this.issuedToken            = new IssuedTokenServiceCredential(other.issuedToken);
     this.secureConversation     = new SecureConversationServiceCredential(other.secureConversation);
     saveBootstrapTokenInSession = other.saveBootstrapTokenInSession;
     exceptionMapper             = other.exceptionMapper;
 }