473,756 Members | 4,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Login Redirect

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
DestinationPage Url.
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
2 4513
Hi Brain,

Have you handled Authenticate event? You must change
AuthenticateEve ntArgs.Authenti cated member to tell the control credentials
are valid.

protected void Login1_Authenti cate(object sender, AuthenticateEve ntArgs 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
DestinationPage Url.
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
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
AuthenticateEve ntArgs.Authenti cated member to tell the control credentials
are valid.

protected void Login1_Authenti cate(object sender, AuthenticateEve ntArgs 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
DestinationPage Url.
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2971
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a post method and either logs the user in our out given the information from the form. but every pages use sessions and cookies, if the user is successfully logged in then the cookies and session values are updated, (as well as MySQL).
11
2972
by: David W. Simmonds | last post by:
I have a form that will prompt for a user name/password. In VS.NET, I have the protected form in a folder named Admin. I have a Web.config file in that folder as well. It contains the following section: <authorization> <deny users="?" /> <allow users="*" /> </authorization> In the root folder where the other forms are located I have a Web.config
2
2908
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public users). If user is from intranet, web server should recognize it and application should create additional options in controls regarding groups the user belongs to. If user is from extranet it should be logged in as anonymous and a link to login page...
6
4696
by: BizWorld | last post by:
Hi, I have a scenario where i need to configure only Login.aspx page to use SSL. All other application will run on HTTP protocol. If someone can guide me how to accomplish this. One of my idea is to keep login.aspx page in a seperate Virtual director and apply SSL only on that directory but i dont know if it will have an impact on session (may be it will create two sessions due to two different virtual directories). If some one can...
7
1970
by: Samuel Shulman | last post by:
Is there a method that will indicate the person who logged successfully is Logged and therefore allowed to browse freely other then using the 'Web.Security.FormsAuthentication.RedirectFromLoginPage' method thanks, Samuel
1
6435
by: pj | last post by:
I'm trying to redirect users to another page after they Authenticate with the ASP.NET login controls. The user is able to login, but I can't get the response.redirect to work. Can anyone help? My code is below. Thanks, pj mcdba, mcp
12
3531
by: hotflash | last post by:
Hi Mark et. All, I have a question to see if you can educate me here since this is something new to me as well. I created a login page for the user to login and the ASP will check and redirect them to the appropriate page. So far, everything works fine. Myself and the user admin can login to the "Trform.asp" page OK without problem. My question for you and your peers is I have 5 more users. Let's say A, B, C, D, and E. I want...
3
6224
by: satishknight | last post by:
Hi, Can some one tell me how to change the validation sequence for the code pasted below, actually what I want it when any one enters the wrong login information (already registered users) then it has to tell then them its wrong information but currently it takes then to a next page and then tells them its incorrect information. This is tedious as every time they enter wrong they will be redirected to a different page and then they have to...
9
7811
by: Josh | last post by:
I run a Joomla website and am familiar with php in some but not all aspects. Currently I am trying to find some solutions related to session handling. Am I correct in saying that "login" is kept in sessions? I can see active sessions in my mysql database, but is that the only place this information is stored? Sessions and cookies I know are related also, but how specifically (session info stored in cookies?)? Right now, when users...
10
4819
by: DavidPr | last post by:
When I logout as one user and log in under a different user, it opens with the last user's information. User 1 - Unsername: Davey Jones User 2 - Unsername: David Smith I log out from Davey Jones, then login as David Smith the Welcome message below will show "Welcome Davey". And it will be Davey's information that is accessible - not David Smith's. So something is amiss but I don't know what. (BTW, this login script is based on the...
0
9487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10069
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9735
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8736
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.