2006-08-09

Authenticate on LoginControl

I just spent 2 hours trying to get my custom membership provider to authenticate. No matter what i did i couldn't get the ValidateUser method to call. I know the provider was getting initialised because the Name and ApplicationName properties were being accessed.
Then i released that i had put this:

    protected void Page_Load(object sender, EventArgs e) {

        Login1.Authenticate += new AuthenticateEventHandler(Login1_Authenticate);

        Login1.LoggingIn += new LoginCancelEventHandler(Login1_LoggingIn);

        Login1.LoggedIn += new EventHandler(Login1_LoggedIn);

        Login1.LoginError += new EventHandler(Login1_LoginError);

    }

this was left over from some other debbuing and the OnAuthenticate was the problem. It was overriding the default provider login. Doh. So either remove the event or but my custom authentication in here. Kind of simple.

No comments: