authenticate again email using login control.

authenticate again email using login control.

Post by goku3 » Sun, 12 Apr 2009 18:12:04



Hi there

Is it possible to authenticate against email address instead of logon
name using the login control in asp.net web forms.

I couldn't find a property for this.  Is it possible to override?

Thanks in advanced.

 
 
 

authenticate again email using login control.

Post by goku3 » Mon, 13 Apr 2009 08:11:54


I found a reference artical that will help me do this.

http://support.microsoft.com/kb/910440

will test later.

Quote:> Hi there

> Is it possible to authenticate against email address instead of logon
> name using the login control in asp.net web forms.

> I couldn't find a property for this. ?Is it possible to override?

> Thanks in advanced.


 
 
 

authenticate again email using login control.

Post by Cerebru » Mon, 13 Apr 2009 18:01:11


Interesting question... I'm surprised there isn't more info on this.
Here are two relevant threads I found:

http://forums.asp.net/p/1362666/2818858.aspx
http://forums.asp.net/t/1145460.aspx

And here is an article that demonstrates how to write your own
Membership provider to use the Email-password combo instead of a
username:

http://www.15seconds.com/issue/050216.htm


Quote:> Hi there

> Is it possible to authenticate against email address instead of logon
> name using the login control in asp.net web forms.

> I couldn't find a property for this. ?Is it possible to override?

> Thanks in advanced.

 
 
 

authenticate again email using login control.

Post by gerard ngawat » Mon, 20 Apr 2009 07:13:32


Thanks for that. Alot easier then overridding the MembershipProvider.

All I ended up doing was.

Change the usernamelabeltext to E-Mail:

double clicked the login box: added event handeler as bellow.

protected void Login1_Authenticate1(object sender, AuthenticateEventArgs e)

{

string user = Membership.GetUserNameByEmail(this.Login1.UserName);

if (System.Web.Security.Membership.ValidateUser(user, this.Login1.Password))

{

e.Authenticated = true;

Quote:}

else

{

e.Authenticated = false;

this.Login1.FailureText = "Incorrect username and password";

Quote:}
}

Cheers
 
 
 

authenticate again email using login control.

Post by Cerebru » Mon, 20 Apr 2009 21:33:40


Glad to know you got it to your satisfaction. Happy coding! :-)


Quote:> Thanks for that. Alot easier then overridding the MembershipProvider.

> All I ended up doing was.

> Change the usernamelabeltext to E-Mail:

> double clicked the login box: added event handeler as bellow.

> protected void Login1_Authenticate1(object sender, AuthenticateEventArgs e)

> {

> string user = Membership.GetUserNameByEmail(this.Login1.UserName);

> if (System.Web.Security.Membership.ValidateUser(user, this.Login1.Password))

> {

> e.Authenticated = true;

> }

> else

> {

> e.Authenticated = false;

> this.Login1.FailureText = "Incorrect username and password";

> }
> }

> Cheers

 
 
 

1. sign out and sign in again always redirect to login page even after authenticated.

When I sign in for the first time in the login page it authenticates and
redirects to the specified page.
But,
When I sign out from the web page (which clears session) and when  I Sign In
again it  redirects to login page and authenticates the username and
password and go to the navigating menu page.But when I go from that page it
further redirects to login page again instead of going to the specified
mentioned page.
What could be the reason for  redirecting to login page again even after
authenticated.

Thanks
ekta

2. Bison?

3. Login Page creation in ASP.NET using C# (without using the Login Control)

4. Open the 'About Database' from another database

5. creating a login page authenticating against LDAP

6. TCP/IP problem! HELP!

7. Possible to authenticate a user with a custom login form?

8. Planning and Implementing Your Year 2000 Strategy: A Handbook for IT Managers

9. Using different login name other than system login - VSS

10. Login page (again)

11. Login Again

12. retrieve username of login control on the next page using ASP.NET & C#

13. Modifying Message-id of email before sending email using smtpclient