private void DisplayRAName() { string domainID = this.selectedDomain; DomainController domController = DomainController.GetDomainController(); string emailID = null; try{ string raName = domController.GetRAName(domainID); byte [] RACertificateObj = domController.GetRACertificate(domainID, raName); if( RACertificateObj != null && RACertificateObj.Length != 0) { System.Security.Cryptography.X509Certificates.X509Certificate Cert = new System.Security.Cryptography.X509Certificates.X509Certificate(RACertificateObj); emailID = Cert.GetIssuerName(); char[] EmailParser = {'=',','}; string [] ParsedString = emailID.Split(EmailParser); if (ParsedString.Length > 1) { for(int x = 0; x < ParsedString.Length; x++) { char [] FinalEmailParser = {'@'}; string [] FinalParsedString = ParsedString[x].Split(FinalEmailParser); if(FinalParsedString != null && FinalParsedString.Length > 1) { emailAddress = ParsedString[x]; } } } recoveryAgent.Text = raName; this.emailID.Text = emailAddress; }} catch(Exception ) { } }