Controlling your username while binding to ActiveDirectoryMembershipProvider [ASP.NET 2.0]
When using ActiveDirectoryMembershipProvider, default login options mandate your username to be [username]@[domainName].[extn].
However, should you want to use just the username, and nothing else, then the simplest option would be to add the attributeMapUsername attribute in the configuration file (membership section).
Example :
<membership defaultProvider="ADProvider">
<providers>
<clear/>
<add name="ADProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ADConnectionString" attributeMapUsername="sAMAccountName" />
</providers>
</membership>
Options for attributeMapUsername are :