I've posted this question a couple of times before, but everytime
someone tries to help, it seems they completely misunderstand the
problem I am having and offer a solution to a different problem.
I have a web site written entirely in ASP.Net. There is a login page,
which has 2 text boxes... one for e-mail address and the other for
password. When I enter the e-mail address and password and login, IE
asks if I want to save the password. I click Yes, and continue to use
the site. If I log off and return to the login page using the same
e-mail address as before, the password is retreived by IE and
everything works as I think it should.
However, after a couple of hours or a reboot, if I return to the login
page and use the same e-mail address as before, the password is not
retrieved by IE. I have to enter it in again. IE prompts me to save the
password, I say yes, and everything works as expected for a few hours.
I do not know why the password is retrieved, but only for a couple of
hours. I appreciate any help that can be offered for this. Thanks!
-Elroyskimms 3 1323
Elroyskimms wrote: I've posted this question a couple of times before, but everytime someone tries to help, it seems they completely misunderstand the problem I am having and offer a solution to a different problem.
I have a web site written entirely in ASP.Net. There is a login page, which has 2 text boxes... one for e-mail address and the other for password. When I enter the e-mail address and password and login, IE asks if I want to save the password. I click Yes, and continue to use the site. If I log off and return to the login page using the same e-mail address as before, the password is retreived by IE and everything works as I think it should.
However, after a couple of hours or a reboot, if I return to the login page and use the same e-mail address as before, the password is not retrieved by IE. I have to enter it in again. IE prompts me to save the password, I say yes, and everything works as expected for a few hours. I do not know why the password is retrieved, but only for a couple of hours. I appreciate any help that can be offered for this. Thanks!
-Elroyskimms
I don't think this has anything to do with asp.net. It's an IE
feature (or maybe bug), so maybe you should ask in an IE group?
I think it should happen with other sites as well, is that correct?
--
Hans Kesting
The problem only exists in login pages that I make. All other IE stored
passwords are retreived as expected. I've made several login pages,
some using cookies to retreive the username/e-mail and others where
nothing is stored on the local machine. This problem exists on all of
them, which tells me that I am doing something wrong.
-Elroyskimms
At first glance I assumed it was related to the Viewstate control that
is placed on each page, but I've been tracking the viewstate value
everytime I log in and logging whether or not the password was
retrieved... and I can't find any sort of a pattern here.
You'll find the PageLoad and Submit_Clicked functions below:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
If Not Request.Cookies("Action") Is Nothing Then
If Request.Cookies("Action").Value.ToUpper = "LOGOUT"
Then
If Not Request.Cookies("SessionID") Is Nothing Then
local.Logout(Request.Cookies("SessionID").Value)
Response.Cookies("SessionID").Expires =
DateTime.Now.AddYears(-30)
End If
lblError.Text = "You have been logged out"
End If
Response.Cookies("Action").Expires =
DateTime.Now.AddYears(-30)
End If
If Not Request.Cookies("Message") Is Nothing Then
If Request.Cookies("Message").Value.ToUpper = "TIMEOUT"
Then
If Not Request.Cookies("SessionID") Is Nothing Then
local.Logout(Request.Cookies("SessionID").Value)
Response.Cookies("SessionID").Expires =
DateTime.Now.AddYears(-30)
lblError.Text = "Your session has expired. Please
login again."
Else
lblError.Text = Request.Cookies("Message").Value
End If
Response.Cookies("Message").Expires =
DateTime.Now.AddYears(-30)
End If
End If
If Not Request.Cookies("Email") Is Nothing Then
txtEMail.Text = Request.Cookies("Email").Value
cbxRememberMe.Checked = True
End If
End Sub
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnLogin.Click
If cbxRememberMe.Checked Then
Response.Cookies("Email").Value = txtEMail.Text
Response.Cookies("Email").Expires =
DateTime.Now.AddDays(30)
Else
Response.Cookies("Email").Expires =
DateTime.Now.Subtract(TimeSpan.FromDays(365))
End If
Dim AccessReader As SqlDataReader =
qryGetContactIDByEmailANDPassword(txtEMail.Text,
local.EncodePassword(txtPassword.Text))
Dim SessionID As String = local.CreateSessionID(32)
Dim SessionReader As SqlDataReader =
qryGetSessionsBySessionID(SessionID)
Do While SessionReader.Read
SessionReader.Close()
SessionID = local.CreateSessionID(32)
SessionReader = qryGetSessionsBySessionID(SessionID)
Loop
SessionReader.Close()
If AccessReader.Read() Then
Response.Cookies.Set(New HttpCookie("SessionID",
SessionID))
Response.Cookies("SessionID").Expires =
DateTime.Now.AddDays(7)
insAddNewAccessSession(SessionID, AccessReader.GetInt16(0),
DateTime.Now, DateTime.Now)
AccessReader.Close()
Response.Redirect("AdminMenu.aspx?Module=Incoming" )
Else
lblError.Text = "<font size=2>Invalid E-Mail Address and/or
Password. Please try again</font>"
txtEMail.Text = ""
txtPassword.Text = ""
End If
AccessReader.Close()
End Sub This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Midgar |
last post by:
Hi, I have a problem with vb.net : I create dinamically
labels in a panel with this code (simplified):
panel1.controls.clear
dim a as new label
a.text="Test"
panel1.controls.add(a)
I have 6...
|
by: Bã§TãRÐ |
last post by:
I have been working on this particular project for a little over 2 weeks now. This product contains between 700-900 stored procedures to handle just about all you can imagine within the product. I...
|
by: jrefactors |
last post by:
I want to ask how password is stored and how to check the
authentication?
I have heard password is never encrypted and decrypted, but it is
hashed.
For example, consider a simple email logon...
|
by: Diogo Biazus |
last post by:
From time to time I'm getting this error message:
WARNING: Error occurred while executing PL/pgSQL function atualizabusca
WARNING: line 25 at for over select rows
ERROR: unknown cmdtype...
|
by: Joshua Kendall |
last post by:
This is the code that I currently Have for one password
how do I specify multiple ones? There is no "or"
statement! What do I do?
Private Sub LoginBTN_Click(ByVal sender As System.Object,
ByVal...
|
by: 2803stan |
last post by:
In the past I spent hours and hours and hours writing, editing and
compiling stored procedures (I am not a pro). It could take me two
days to get a single stored procedure to work.
Then came...
|
by: jasonsford |
last post by:
I need to grant modify permission for the local user account ASPNET to
the C:\WINNT\Temp folder in order to run an application. However, after
these permissions have been granted in NTFS, they...
|
by: Simon.Whiteside |
last post by:
If someone has created a database for me and transferred it over is
there any way that I can check I have full access to all areas?
I am a beginner with Access and so the development has been...
|
by: sh26 |
last post by:
I need to be able to add entries to the Windows 'Stored User Names and Passwords' using c# code. Is this possible, if so how can I accomplish this?
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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...
| |