| | |
good way of validating login info vs SQL D/B
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
Hi all. just wondered if there was a quick and easy way (or good tutoriaL) to validate user input (on a login control) against a SQL database where the users username and password credentials are stored. Any suggestions will be greatly appreciated! Thanks for your time.
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: Jan 2008
Posts: 2,052
Reputation:
Solved Threads: 118
the easiest way is to enable asp.net membership provider, it creates all the required tables and procedures for you. drag and drop create user wizard to your webform, then run the page. when you create your first user, asp.net creates the membership tables in your AppData folder. then drag and drop a login control, when you enter the credentials that you previously registered, you will see that login successes or fails.
Due to lack of freedom of speech, i no longer post on this website.
that simple eh ? many thanks for your reply. Does this method provide a means of edting login credentials? For example if I have an administrator user type and a general user type, the admin should be able to edit the general user
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
hmm ok thanks fo your ideas both of you. however what serkansendur has suggested is great but I do not want to create users onthefly. I want to have a prebuilt DB to validate against you see. any suggestions ?
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: Feb 2008
Posts: 30
Reputation:
Solved Threads: 4
hi majestic0110,
There is ASP Login Control exists in VS 2005 OR VS 2008, but you still want to use traditional database technique to design login control. For this, i have one article which help's you a lot.
Just check this link, hope this will help you.
http://www.4guysfromrolla.com/webtech/100500-1.shtml
If problem persist then feel free to share with us.
Thanks & Regards
Dilip Kumar Vishwakarma
Programmer
.Net Consulting
There is ASP Login Control exists in VS 2005 OR VS 2008, but you still want to use traditional database technique to design login control. For this, i have one article which help's you a lot.
Just check this link, hope this will help you.
http://www.4guysfromrolla.com/webtech/100500-1.shtml
If problem persist then feel free to share with us.
Thanks & Regards
Dilip Kumar Vishwakarma
Programmer
.Net Consulting
•
•
Join Date: Jan 2008
Posts: 2,052
Reputation:
Solved Threads: 118
Everything you can do with login controls,can be done programmatically. To create users belonging to different groups, you must enable roles. Then programmatically you can add users to those roles. Also you can use create user wizard to set user roles. Add an extra step to create user wizard and add a checkbox there determining whether the user is an admin or not. Create user wizard is derived from wizard control so it can be added as many steps as wanted
Last edited by serkan sendur; Feb 13th, 2008 at 6:54 am.
Due to lack of freedom of speech, i no longer post on this website.
•
•
Join Date: Jan 2008
Posts: 2,052
Reputation:
Solved Threads: 118
ok, basically you need to modify your web.config file's <authention element. set the authentication type to Forms. then create your own login page using your own textboxes. query your database with the credentials, if the credentials match then in the button_click handler of your login button add this code : FormsAuthentication.RedirectFromLoginPage(string username,bool createPersistentCookie); if you want you can add a checkbox so that user credentials be remembered. pass the checkbox.checked value to createPersistentCookie parameter.
Due to lack of freedom of speech, i no longer post on this website.
the trouble I am mainly having is in connecting to the Db. When I use the WAT utility I keep getting error messages saying I am not connected to db
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: Saving text in asp.net
- Next Thread: Using UserControls in ASP.NET
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax appliances asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn cac checkbox child class click compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownmenu dynamic edit embeddingactivexcontrol feedback fileuploader findcontrol flash flv forms gridview homeedition hosting iframe iis javascript jquery list menu mono mssql multistepregistration nameisnotdeclared novell objects order problem ratings relationaldatabases rotatepage save search security serializesmo.table sessionvariables silverlight smartcard sql ssl suse textbox tracking treeview typeof unauthorized validatedate validation vb.net video virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment wizard xml






