How-to use X509AlternateNameString?

Sep 18, 2009 at 1:22 PM
Edited Sep 18, 2009 at 1:22 PM

Could you provide an example of how to use X509AlternateNameString?

Thanks in advance,

Frédéric Queudret

 

Coordinator
Jun 24, 2010 at 9:57 PM

You might do something similar to:

foreach (X509AlternateName alternateName in x509Certificate.GetSubjectAlternateNames())
{
    X509AlternateNameString nameString = alternateName as X509AlternateNameString;
    if (nameString != null)
    {
        Console.WriteLine(nameString.Name);
    }
}