Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login control to use sql server database.

Status
Not open for further replies.

joejack0330

Technical User
Jan 27, 2006
95
US
We are moving to aps.net and would like to use the bulit-in login control but have it go against our sql server 2005/2008 databases to verify login. We currently just use asp pages with form controls and a submit button that kicks off some vb script that executes an sql stored procedure then loads some session variables that we use to verify before displaying other pages. We don't need to allow users to be able to create or modify logins because we have that information on our sql server and is maintained there for other reasons. Can this be done in asp.net?

Thanks,
Joe
 
Yes it can be done. YOu will have to look into membership roles as well. There are many examples online.
 
if you are moving to asp.net I would recommend an MVC framework (Monorail or MS MVC) instead of webforms. it's much easier to maintain and stays true to the stateless nature of web development.

of course, you may have meant you are moving to webforms. in which case you are stuck using web server controls.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
I think I found an example how to use an existing sql server database and seems to work correctly when still use asp.net to administer site to create and manage users and roles. I had to run the aspnet_regsql.exe and add some information to web.config. Since it is just storing all the users, roles, applications and so on in sql tables, is is possible for us to populate these ourselves outside of the asp.net administration. If we were to figure out the table relationships and load them correctly, would this be possible? We have a couple hundred users along with passwords and some other information already setup in other sql tables that we currently use so we could probably write a query to load them and then run something to update when changes made in our other system. Thanks.
 
YOu can confiure the memebership providers to point your current sql server, however, you will still need the tables that the .exe creates.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top