Results 1 to 7 of 7

Thread: remember system on log in.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Posts
    72

    Lightbulb remember system on log in.

    Dear experts,
    I've a login form with user id and password fields.Also form contains a checkbox saying that remeber userid n password.Now If a user comes first time and provide all details n check the box then next time when he logs in system should not ask for userid and password.Can you pls tell me how can I solve this problem.

    Pls Answer me.....It's urgent........

    Thanks n Regards
    Uttam kumar
    _________________________________________________________________
    Success n Failure r two face of the same coin

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383

    Re: remember system on log in.

    you would need to write their info to something like a textfile so it can be retrieved the next time they open the program... if you are storing senstive information, like password info, you should really use encryption, otherwise the password would be in plain text in the file...

  3. #3
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: remember system on log in.

    How about storing it in the registry. You could use SaveSetting and GetSetting to save and retrieve the values from the Registry. You coiuld also encrypt the information before writing it to the registry.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    35,242

    Re: remember system on log in.

    An intermediate option would be to encapsulate the username and password in a class, and use binary serialization to save it to a binary file. While this is still hackable as is, it is not written in plain text, so it would be a little harder for casual perusal.

    You could extend the class such that it encrypts/decrypts it's contents in the Get and Set parts of the property. Internally it would hold the encrypted strings, so a binary serialization would store the encrypted string in a binary file. In this fashion, a casual reader wouldn't see anything, and somebody who read the binary file would see encrypted data.

    If you want to go that route, I think I have posted stuff on binary serialization several times, but could do so again...it's amazingly simple, only about two lines. However, I tend to think that Shuja Ali's suggestion, when coupled with some encryption, is the standard means of doing what you are talking about.
    My usual boring signature: Nothing

  5. #5
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,468

    Re: remember system on log in.

    If you're using VB 2005 (which you haven't specified, please do so in future) then you can use applciation settings and the config file. .NET 2.0 supports encrypting all or part of the config file and on-the-fly encryption and decryption. Having said that, only User-scoped settings are read/write at run time. Application-scoped settings are read-only, so that means that you'd have to be logged in as the same Windows user each time to access the information. This is also true of using SaveSetting and GetSetting, which access the HKCU hive of the registry.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Posts
    72

    Post Re: remember system on log in.

    Dear Experts,
    Thanks for answering me.but I've 1 more problem.My software has multiple login system so how will i identify the user after cheking the checkbox when next time user loged in.Any way to do that?

    Thanks in advance.
    Please help me.

    Uttam

  7. #7
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,468

    Re: remember system on log in.

    What is your user logging into? Is it all stored on the local system or are they accessing a remote system or database? Is each Windows user a user in your system or does your app keep its own user records? It may be that this is a pointless system anyway. If you have multiple users access a local system through a login that doesn't require a password then what's the point of logging in?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width