简体   繁体   中英

VS C# Web Site Login Tool to connect to non-default SQL Database

I want to use the Login Tool from the VS Toolbox to login users on a web site, but it defaults to connect to ASPNETDB.MDF for verifying users, but I want it to connect to my own database. I think I would need to make similar User Tables like in the ASPNETDB for formatting purposes, but that's no big deal. There should be an easy method of explicitly defining which database to connect to, but I can't find it, I'm still kind of new to this. I want to use the Login box if possible because of the automatic password hashing and such, and I don't want to worry about doing it myself for such a small project. Any help?

The Login control uses the asp.net Membership Provider .

Here is a quick link that should get you on the right path:

http://www.misfitgeek.com/adding-asp-net-membership-to-your-own-database/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM