By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,002 Members | 2,157 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,002 IT Pros & Developers. It's quick & easy.

Login Redirect

P: n/a
Hello All:
I used a Login control to authenticate a user to login. The problem is
that when I login with good username & password, the login view would
say that the login was successful.

But for some reason the login control does not redirect the control to
DestinationPageUrl.
Even when I hardcoded to redirect to another page, it still remains in
the same page on successful login.

Does anyone know what is going wrong here?

Thanks in advance.

Oct 30 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Brain,

Have you handled Authenticate event? You must change
AuthenticateEventArgs.Authenticated member to tell the control credentials
are valid.

protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
Login login = (Login) sender;

e.Authenticated =
(String.Compare(login.UserName, "brain", true) == 0) &&
(String.Compare(login.Password, "password") == 0);
}

hope this helps
--
Milosz Skalecki
MCAD
"IdleBrain" wrote:
Hello All:
I used a Login control to authenticate a user to login. The problem is
that when I login with good username & password, the login view would
say that the login was successful.

But for some reason the login control does not redirect the control to
DestinationPageUrl.
Even when I hardcoded to redirect to another page, it still remains in
the same page on successful login.

Does anyone know what is going wrong here?

Thanks in advance.

Oct 30 '06 #2

P: n/a
Thanks Milosz for your reply..

Unfortunately your solution didnot seem to work for me.
I am using VB script with ASP 2.0. I use the Configuration manager to
create the users and I am not exactly sure how your code would work. I
explicity set the e.Authenticated = true. But even that it didnot work.
I see that the login control is redirecting the control to the page I
wanted to go on successful login. This page is again redirecting the
control to the login page with a return url.
I am not sure if IE is doing it. (Cookies)
Thanks agian.
Hi Brain,

Have you handled Authenticate event? You must change
AuthenticateEventArgs.Authenticated member to tell the control credentials
are valid.

protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
Login login = (Login) sender;

e.Authenticated =
(String.Compare(login.UserName, "brain", true) == 0) &&
(String.Compare(login.Password, "password") == 0);
}

hope this helps
--
Milosz Skalecki
MCAD
"IdleBrain" wrote:
Hello All:
I used a Login control to authenticate a user to login. The problem is
that when I login with good username & password, the login view would
say that the login was successful.

But for some reason the login control does not redirect the control to
DestinationPageUrl.
Even when I hardcoded to redirect to another page, it still remains in
the same page on successful login.

Does anyone know what is going wrong here?

Thanks in advance.
Oct 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.