Monday, March 26, 2012
Please help
I have a login screen with a remember user checkbox. I am storing the Login
Information (UserName and Password) on the client machine using cookies. The
text boxes used to accept the username and password are both ASP server
controls. The TextMode property for the box accecpting password is set to
"password". I save the login information when the user checks the "remember
user" checkbox (using cookies) and retrieve this information every time he
tries to relogin(ie when the login page is requested ). The problem is that
the password cannot be displayed in the text box(TextMode set to "password")
as astrix and is seen as blank (Though it is correctly stored in the cookie
as seen using page level trace)
I am using Microsoft Development Environment 2002 version 7.0.9466 &
Microsoft.NET framework 1.0 version 1.0.3705
Any suggestions would be highly appreciated.
TIA,
GaryAn "input type=password" (which is NOT an "input type=text" textbox object)
HTML object can not have its' value persisted. This is a Security
consideration. What would be the point of requiring a password if ANY user
that opens that URL in the browser on the machine with the password stored
in a cookie doesn't have to type in the password?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Neither a follower nor a lender be.
"Gary" <msnews@.microsoft.com> wrote in message
news:eh94ffVZDHA.2344@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I have a login screen with a remember user checkbox. I am storing the
Login
> Information (UserName and Password) on the client machine using cookies.
The
> text boxes used to accept the username and password are both ASP server
> controls. The TextMode property for the box accecpting password is set to
> "password". I save the login information when the user checks the
"remember
> user" checkbox (using cookies) and retrieve this information every time he
> tries to relogin(ie when the login page is requested ). The problem is
that
> the password cannot be displayed in the text box(TextMode set to
"password")
> as astrix and is seen as blank (Though it is correctly stored in the
cookie
> as seen using page level trace)
> I am using Microsoft Development Environment 2002 version 7.0.9466 &
> Microsoft.NET framework 1.0 version 1.0.3705
> Any suggestions would be highly appreciated.
> TIA,
> Gary
Please help
FormsAuthentication.RedirectFromLoginPage(UserName.selecteditem.value, true). The user is then redirected to a new page default.aspx. On this page I want unique information related to this users username. How do I do this ? EG it should display only accounts related to this user from the accounts database. How do I pass the username from the Login page to this page? or should I get it from the cookies? If so how?Just need to know how to get the login name from Login.aspx to default.aspx
Thanks
GrantHave you treid giving
Response.Write(user.Identity.Name)?
Test.
Hi!
I would like to know where should one give the Response.Write(user.Identity.Name)?
in the login.aspx or default.aspx file. As it does not work for me both ways.
Thanks
Do you have
<identity impersonate="true" />line in your web.config
try giving this and check if you get user name
Hi Sushila,
Thanks for your quick response. I was unable to execute the program and get a runtime error. This stops me from doing anything.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File --
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration
Your help will be appreciated.
Thanks
Sukumar
Are you enclosing this tag within
<system.web>
.....
<identity impersonate="true" />
</system.web>
Even without giving this tag <identity impersonate="true" /> User.Identity.Name works
SuKumar : can u paste the error that is shows when u give
Response.Write(User.Identity.Name)