473,769 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remember me in Login control.

Hi,

Environment : Asp.net 2.0 / C#

As you know, there is a "Remember me" check box in Login control is VS.NET
2005.
It allows you to get in the page without logging it if user closes browser,
instead of logging out.
It works...however , in the authenticate event, what if session is used?

For example,
In Login.aspx
....Login1_Auth enticate....met hod
{
.....
Session("Test") = "Authentica tion is done".
e.Authenticated = true;
}

In Default.aspx.

.....Page_Load. .....
{
...
Response.Write( Session["Test"].ToString());
}
Suppose that user log-in with checked "Remember me" , ...then it displays
"Authentica tion is done"....
Without explict logging out, user closes the browser, then revist the
default.aspx page..since the user has set the "Remember me", it won't ask the
login page, then load the Default.aspx... .According to my testing, the
Session variable was null at this point...
It makes sense because session is lost when browser is closed.....
However...how do I make this working for "Remember me" scenario?
If an user checks the "Remember Me" checkbox, they can close the browser
without logging out, then revisit the page again without logging in
again....In this scenario(Rememb er me)...I guess I need to keep somehow the
Session...
Should I use something other than in-proc session state??
Any way I can work-around in in-proc session mode for this?

Thanks,

............... ............... ............... ..TJ
Jan 3 '08 #1
1 3324
If you kick the person to the login page, it should automatically cycle him
back to the page he desires. If you want a user to be remembered for full
session time, even if he drops his browser, you can move to SQL Server
sessions, but it will not remember him days from now and will lead you back
to do (a deer, a female deer ;->).

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************** *************** *************** ****
| Think outside the box!
|
*************** *************** *************** ****
"TJ" <TJ@discussions .microsoft.comw rote in message
news:E2******** *************** ***********@mic rosoft.com...
Hi,

Environment : Asp.net 2.0 / C#

As you know, there is a "Remember me" check box in Login control is VS.NET
2005.
It allows you to get in the page without logging it if user closes
browser,
instead of logging out.
It works...however , in the authenticate event, what if session is used?

For example,
In Login.aspx
...Login1_Authe nticate....meth od
{
.....
Session("Test") = "Authentica tion is done".
e.Authenticated = true;
}

In Default.aspx.

....Page_Load.. ....
{
...
Response.Write( Session["Test"].ToString());
}
Suppose that user log-in with checked "Remember me" , ...then it displays
"Authentica tion is done"....
Without explict logging out, user closes the browser, then revist the
default.aspx page..since the user has set the "Remember me", it won't ask
the
login page, then load the Default.aspx... .According to my testing, the
Session variable was null at this point...
It makes sense because session is lost when browser is closed.....
However...how do I make this working for "Remember me" scenario?
If an user checks the "Remember Me" checkbox, they can close the browser
without logging out, then revisit the page again without logging in
again....In this scenario(Rememb er me)...I guess I need to keep somehow
the
Session...
Should I use something other than in-proc session state??
Any way I can work-around in in-proc session mode for this?

Thanks,

............... ............... ............... .TJ

Jan 3 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3230
by: gencode | last post by:
In asp.net 2.0 there is a Login Control, but I dont want the option to remember the person, is there anyway to hide the"remember me checkbox" I could not see one, Thanks, Ed,
2
1283
by: baerland | last post by:
Hi I'm having a hard time getting the "remember me" functionallity to work with the new Login control in ASP.NET 2.0. The Authenticate event works fine and I get logged in, but if I restart the browser, I'm presented with the login page again. I thought I only needed to set the DisplayRemeberMe=true and the control would create the cookies and everything.
1
2550
by: Dabbler | last post by:
I have a login page which requires all users to login everytime they visit, the remember me feature isn't working. We all have cookies and js enabled. Any suggestions on how to diagnose this? My login aspx: <asp:Login ID="Login1" runat="server" BackColor="#FFFFCC" BorderColor="#5400A8" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px"
0
1348
by: InnoCreate | last post by:
Hi everyone I'm sure i can't be the only one having this problem. I'm using the asp.net 2.0 login control to log users in to my website - it uses the standard sql membership provider. The problem is users can login fine but the remember me functionality does not seem to work correctly and keep the user logged in between sessions. Any idea's of what i might be doing wrong? Please help James
2
4955
by: Dan | last post by:
Hi, I use the logon control for logging into the application. When logging and checking the option "remember me next time" and then closing the browser without to press any logout button which logout the user, the next time i start the browser and go to the application, i don't need to login. That's ok. My questions are:
0
1318
by: obs | last post by:
Hi all. I have a page with a login control. I was wondering what's the way to use the remember me login control. I know it has something to do with cookies, but since I am a total noobie, I don't know how to do it. Please help, thanks in advance.
1
2340
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
Hello The site I am working on redirects the user to a "session timed out" page when: - the user's session has expired AND - the user action results in a postback to the server I then need to redirect the user to either the Login page or the Welcome page depending on whether the user logged in and checked the Remember Me
4
3505
by: adam.dmsk | last post by:
Hello, I have Login.aspx page with Login control. I found that "Remember me" checkbox does not work. I found that probably this is not matter of timeout attribute in web.config, becouse when I check checkbox, login properly, close browser and immediatelly open new browser, page shows login form again.
1
3060
by: bh | last post by:
I am using a built-in login control on a form, and have set the "DisplayRememberMe" property to false. It correctly does not display that checkbox on the login form; however, after authenticating, I'm prompted with an Autocomplete Passwords Dialog box, asking if I want to remember the password. Is there any way to disable this dialog, and force it to not remember any passwords? Thanks in advance.
0
10216
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
10049
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
9997
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
8873
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...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.