title: Unexpected results when using UPN vs legacyUsername vs Shortname validation against AD
body: <p>I'm using the AD Membership provider to validate user names and am having issues getting anything other than user@upnDomain.com to work.</p>
  
  <p>Is it possible to get the other username formats to work?</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>        MembershipProvider domainProvider;
          domainProvider = Membership.Providers["MyADMembershipProvider"];
  
          if (domainProvider.ValidateUser("zzTest123", "pass"))
          {
  
          }
          if (domainProvider.ValidateUser(@"PARTNERSGROUP\zzTest123", "pass"))
          {
  
          }
          if (domainProvider.ValidateUser("zzTest123@company.com", "pass"))
          {
  
          }
          if (domainProvider.ValidateUser("zzTest123@testfirm.com", "pass"))
          {
            // this is the UPN and the only one that works.
          }
  </code></pre>
  
  <p><strong>Web.config</strong></p>
  
  <p>
      
    </p>
  
  <p>
      </p>
  
  <pre><code>&lt;authentication mode="Forms"&gt;
    &lt;forms loginUrl="~/Account/Login.aspx" name=".ADAuthCookie"  timeout="10" /&gt;
  &lt;/authentication&gt;
  
  &lt;membership&gt;
    &lt;providers&gt;
      &lt;add  name="MyADMembershipProvider"   type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0,  Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"  connectionStringName="TestDomain1ConnectionString"       /&gt;
    &lt;/providers&gt;
  &lt;/membership&gt; 
  </code></pre>