Results 1 to 7 of 7

Thread: User Name and Passwords...

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    Canton, GA
    Posts
    487

    User Name and Passwords...

    I can't seem to locate any tutorials that deal with using a form and matching a user / password against a SQL database... can anyone help?

    Anjari

  2. #2
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: User Name and Passwords...

    SELECT Password FROM Users WHERE Name = @Name

    If txtPassword.Text == r["Password"].ToString() Then login(Response.Redirect)

    Also put you user info in the seesion and check it for every page if you want a secure login.... you could use a cookie too
    Magiaus

    If I helped give me some points.

  3. #3
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: User Name and Passwords...

    Its better to use ASP.NET built-in Forms Authentication than writing everything bespoke.

    Loads of articles -> http://www.google.co.uk/search?hl=en...e+Search&meta=

    HTH

    DJ

  4. #4
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: User Name and Passwords...

    Quote Originally Posted by dj4uk
    Its better to use ASP.NET built-in Forms Authentication than writing everything bespoke.

    Loads of articles -> http://www.google.co.uk/search?hl=en...e+Search&meta=

    HTH

    DJ
    No it' not. There quite a few pitfalls you can come across when using Forms, and isn't it based on your windows login name? You couldn't pay me to use forms.
    Magiaus

    If I helped give me some points.

  5. #5
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: User Name and Passwords...

    Chill out!

    It's a matter of opinion - why reinvent the wheel when a system is already available - granted there may be a couple of pitfalls for some situations but in general these don't apply or can be avoided.

    You are getting Windows-Based authentication mixed up with Forms-Based authentication which can use a database, XML, or even web.config file to store authentication details.

    DJ

  6. #6
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: User Name and Passwords...

    Ok. Didn't mean to come across as hostile. I just like to be in control. You know backdoor and all that....
    Magiaus

    If I helped give me some points.

  7. #7
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: User Name and Passwords...

    Tis ok.

    Every system has weaknesses - I've used Forms-Based authentication quite a bit and have had no problems so far - I have been careful to keep abreast of any issues e.g. SQL injection weaknesses etc. and ensured these have been addressed. I just think its too good a system just to ignore and start again from the ground up.

    I'm sure if I wrote a system from scratch it would work just as well but I wouldn't be able to test it against as many attack techniques as an existing system has been. Its best to be aware of problems and fix them than to be blissfully ignorant.

    Each to their own.

    DJ

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