简体   繁体   English

VS C#网站登录工具可连接到非默认SQL数据库

[英]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. 我想使用VS Toolbox中的Login Tool来登录网站上的用户,但是默认情况下它连接到ASPNETDB.MDF来验证用户,但是我希望它连接到我自己的数据库。 I think I would need to make similar User Tables like in the ASPNETDB for formatting purposes, but that's no big deal. 我认为我需要像在ASPNETDB中一样制作类似的用户表以进行格式化,但这没什么大不了的。 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 . 登录控件使用asp.net成员资格提供程序

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/ http://www.misfitgeek.com/adding-asp-net-membership-to-your-own-database/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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