asp:Login works with Windows users email address only

Posted on 2012-08-13
Last Modified: 2012-08-30
I have an ASP.NET application in C#.
I am using Forms Authentication with AD.

My login screen uses .NET provieded <asp:Login> control.
I am able to logon using user name ase FirstName.LastName@CompName.Com BUT I am not able to logon using CompName\FirstName.LastName .
What am I missing in the application ?
Question by:vu3lmg
    LVL 77

    Expert Comment

    by:David Johnson, CD, MVP
    CompName\FirstName.LastName try networkname\FirstName.LastName
    for example my network is windows8tips.local
    windows8tips\FirstName.LastName works as does FirstName.LastName@windows8tips.local

    Computername is only applicable for local users and not AD users. and it has to be the computer that the iis server is running on to get the authentication records.
    LVL 51

    Expert Comment

    If the website is used in an intranet with domain users, then you shouldn't be using forms authentication.  You should use Windows Integrated Authentication in IIS.  Is this an intranet application?
    LVL 1

    Accepted Solution

    OK I got it to work with attribute : attributeMapUsername="sAMAccountName"In the membership - providers' section.
    Thanks for your help

    LVL 1

    Author Closing Comment

    Following is my provider string for membership

    <membership defaultProvider="MyADMembershipProvider">
                <add name="MyADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=,  Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ADConnectionString"                          attributeMapUsername="sAMAccountName"/>

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now