views:

200

answers:

4

Hello all,

I have a form that has text boxes, buttons on it for the user to sign up and sign in. I need to store the entered sign up credentials in any database(Oracle, Service based database, local database). Then when he tries to sign in, entered credentials should be compared with stored sign up values for authentication.

This is done in visual studio, c#. Can anyone please give me hints or any references?

Thank you

+3  A: 

I would recommend using ASP.NET membership provider, why try to reinvent the wheel.

Dustin Laine
what is it exactly?
It is an authentication system built into .NET, which provides user accounts, profiles, roles, etc. It can be extended and is pretty complete out of the box. http://www.asp.net/Learn/Security/#membership
Dustin Laine
+1  A: 

I agree with what durilai suggested and here is a useful link that might help you get started http://msdn.microsoft.com/en-us/library/tw292whz(v=VS.100).aspx

Using a DB or even AD is to just authenticate is pretty easy and a membership provider does most of the work for you.

Jisaak
it looks like we need to modify some code and connect .net to membership provider. I don't think I need such complex to work for this project.Can we do anything with .net's local database or service based database?
Well you could create a local sql DB and use a connection string to point the membership provider to the database. Maybe this will help: http://msdn.microsoft.com/en-us/library/6e9y4s5t(v=VS.100).aspx I wish I knew more to help you out but using forms auth and a membership provider would probably my plan of attack to get something out quick.
Jisaak
+1  A: 

use the membership provider in ASP.NET

Go here for examples: http://www.asp.net/Learn/Security/#membership

Pat
A: 

First, because you are dealing with security, be absolutely certain to use a parameterized stored procedure in lieu of an ad hoc query to help prevent against SQL injection hacking. Stored procedures also perform better than ad hoc queries, overall, traditionally.

After that, are you asking how to use ADO .NET to use a SqlDataReader or OleDbDataReader to return the results, or just what to consider?

Jim McFetridge
Mine is a very simple application. I dont think I will have to write a stored procedure.I have two forms. First form has text boxes,button for the user to sign in. If he is not signed in then he should be asked to signup, which is in the same form. If his credentials match while signing in, he will be able to see form 2. So, now I need to find a place to store the data entered during sign up and retrieve name and password during sign in. It can be a very small and simple database like "local database" or "service based database" in visual studio 2008.I have no idea of how to do it!