用户登录网站我们选择的数据库和会员资格适用于它? [英] Website with User Login with database of our choice and Membership applied to it ?

查看:58
本文介绍了用户登录网站我们选择的数据库和会员资格适用于它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

建立一个网站会员和用户登录 [ ^ ]



i阅读本文并理解它,但它创建的数据库是会员角色的默认值是ASPNETDB.MDF



它在章节中说明 - 配置该文章的成员资格



当您完成安装向导时,在项目的App_Data文件夹中创建一个名为ASPNETDB.MDF的SQL Server数据库。



但是是ASP.NET Web管理工具自己创建的默认数据库



如果我们想要/希望创建数据库及其选择和模式的表,那该怎么办? 并对其应用会员角色。





i表示我们使用我们创建的ADO.NET和数据库登录用户,然后重定向登录用户欢迎页面,然后将会员资格应用于该欢迎页面,以便

为其申请会员资格保护。



可以是无论如何这样做了?我的意思是在使用我们创建的数据库时应用的成员资格?

Building a Web Site with Membership and User Login[^]

i read this article and understood it , BUT the database it creates by default for Membership roles is ASPNETDB.MDF

it says so in Section - Configuring Membership of that article

"When you complete the Setup Wizard, a SQL Server database named ASPNETDB.MDF is created in the App_Data folder of the project."

But that is default database , which ASP.NET Web admin tool creates by itself

WHAT if we want/wish to create Database and it's tables of our choice and schema , and apply Membership Roles to it.


i mean we make Login for Users using ADO.NET and Database created by us , and then redirecting that Logged in user to welcome page , and yet applying Membership to that welcome page, so as
to apply membership protection to it.

Can it be done so anyhow ? i mean Membership applied to while working with database created by us ?

推荐答案

事实上,成员资格数据库相当复杂。将它与主数据库分开是非常好的。



话虽如此, this [ ^ ]似乎涵盖了你想要做的事情。
The thing is, the membership DB is reasonably complex. You're really a lot better off having it separate from your main DB.

Having said that, this[^] seems to cover what you want to do.


这篇关于用户登录网站我们选择的数据库和会员资格适用于它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆