Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hallo everybody,

Is it possible to log users into an ASP.Net application while the credentials are kept at a different datasoource like MSSQLServer?
For example, I wish to compare username and password against a database table, or I want to keep those who are authorized to specific webpages on a database.

Note: I want to keep the ASP.NET configuration, in other words, I want to take all the advantages of ASP.NET security configuration.

Please tell me, if I am not clear.

Thanks
Posted

Most definitely, have a look at created aspnetdb Creating the Application Services Database for SQL Server[^]

Using this database, you can store applications \ users \ roles etc for different applications.

You just use the SQLRoleProvider for this

How To: Use Role Manager[^]

The good thing about this is you can define your own providers if you want - these can go off to whatever datastore you want

Create Custom RoleProvider[^]

However, the aspnetdb provides all of the schema you need to make full use of the membership providers, I've used this successfully for many applications.
 
Share this answer
 
Yes you can do it. Make a table in database and store the username and corresponding password.

When needed, verify against it and get back the needed data.

Example:
EmployeeID    Username    Password
     1        someuname   somepassword

Actually, you should encrypt the password and then keep it in DB. (out here I have written in clear text for sample)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900