public abstract GetRemoteSecurity ( ) : SecurityMessageProperty | ||
Результат | SecurityMessageProperty |
void SetupSecurityIfNecessary(StreamUpgradeAcceptor upgradeAcceptor) { StreamSecurityUpgradeAcceptor securityUpgradeAcceptor = upgradeAcceptor as StreamSecurityUpgradeAcceptor; if (securityUpgradeAcceptor != null) { security = securityUpgradeAcceptor.GetRemoteSecurity(); if (security == null) { Exception securityFailedException = new ProtocolException( SR.Format(SR.RemoteSecurityNotNegotiatedOnStreamUpgrade, Via)); throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(securityFailedException); } } }
void SetupSecurityIfNecessary() { StreamSecurityUpgradeAcceptor securityUpgradeAcceptor = upgradeAcceptor as StreamSecurityUpgradeAcceptor; if (securityUpgradeAcceptor != null) { RemoteSecurity = securityUpgradeAcceptor.GetRemoteSecurity(); if (RemoteSecurity == null) { Exception securityFailedException = new ProtocolException( SR.Format(SR.RemoteSecurityNotNegotiatedOnStreamUpgrade, Via)); WriteAuditFailure(securityUpgradeAcceptor, securityFailedException); throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(securityFailedException); } else { // Audit Authentication Success // WriteAuditEvent(securityUpgradeAcceptor, AuditLevel.Success, null); } } }