Example #1
0
 public void ImpersonateContext()
 {
     this.ThrowIfDisposed();
     if (!this.IsValidContext)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(-2146893055));
     }
     SspiWrapper.ImpersonateSecurityContext(this.securityContext);
 }
        public void ImpersonateContext()
        {
            ThrowIfDisposed();
            if (!IsValidContext)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception((int)SecurityStatus.InvalidHandle));
            }

            SspiWrapper.ImpersonateSecurityContext(this.securityContext);
        }