|
-
Feb 14th, 2005, 07:18 PM
#1
Thread Starter
Hyperactive Member
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
-
Feb 14th, 2005, 07:54 PM
#2
Frenzied Member
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.
-
Feb 16th, 2005, 09:44 AM
#3
Frenzied Member
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
-
Feb 16th, 2005, 10:02 AM
#4
Frenzied Member
Re: User Name and Passwords...
 Originally Posted by dj4uk
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.
-
Feb 16th, 2005, 10:13 AM
#5
Frenzied Member
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
-
Feb 16th, 2005, 10:16 AM
#6
Frenzied Member
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.
-
Feb 16th, 2005, 10:28 AM
#7
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|