将ASP.NET成员资格表添加到我自己的现有数据库中,还是应该配置单独的ASP.NET成员资格数据库? [英] Add ASP.NET Membership tables to my own existing database, or should I instead configure a separate ASP.NET membership database?

查看:153
本文介绍了将ASP.NET成员资格表添加到我自己的现有数据库中,还是应该配置单独的ASP.NET成员资格数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读这篇文章 MisfitGeek:将ASP.NET成员资格添加到OWN数据库。

,并认为我的自己是常见的做法。开发人员在他们的应用程序中使用ASP.NET成员资格和授权是什么建议作为最佳实践?在存储应用程序数据的同一个数据库中创建成员资格表,或者配置第二个数据库来存储会员信息?

and thought to my self what the common practice is. What do developers using ASP.NET membership and authorization in their applications recommend as a best practice? Creating the membership tables in the same database that stores their applications data or configuring a second database to store ONLY the membership information?

我目前的安装是会员信息的不同数据库只是我认为增加我必须维护的数据库的数量。如果我有5个应用程序使用ASP.NET成员资格,那么这意味着5个ASP.NET成员资格数据库。

My current setup is a different database for membership information ONLY but am thinking that increases the number of databases I have to maintain. If I have 5 applications using ASP.NET membership, then that means 5 more ASP.NET membership databases.

您是否通常在主数据库中创建ASP.NET成员资格表,或者配置单独的成员资格表?

So do you normally create the ASP.NET membership tables in your main database or you configure a separate membership table?

推荐答案

我个人只是将asp.net会员资格添加到我自己的数据库。然后我在System.Web.Security.Membership类中编写了一个基本的包装类,以便代码的行为就像它使用自己的成员资格。它很漂亮,不是很难做到。如果您需要帮助设置,这里是我做的。

I personally just added the asp.net membership stuff to my own database. I then wrote a basic wrapper class around System.Web.Security.Membership class so that the code acts like its using its own membership stuff. Its pretty slick and not that hard to do. If you need assistance setting it up, here is what I did.

您提供的关于如何设置的链接是更复杂的,我使用的是:

The link you provided on how to set it up is waaaaaaaaaayy more complicated that what I used:



  1. 运行C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regsql.exe。

  2. 点击

  3. 选择为应用服务配置SQL Server ...,然后点击下一步。

  4. 选择Windows身份验证和XXXX数据库点击下一步。

  5. 然后显示您的设置,然后点击下一步。

  6. 最后,您应该看到完成的屏幕,点击完成。

  1. Run C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regsql.exe.
  2. Hit Next.
  3. Select "Configure SQL Server for application services…" and hit Next.
  4. Select "Windows Authentication" and the "XXXX" Database and hit Next.
  5. Your settings are then presented...then hit Next.
  6. Finally you should be presented with a done screen, hit Finish.


如果您真的需要演练,我有文档中的截图。

I have screenshots in the doc if you really need the walkthrough.

这篇关于将ASP.NET成员资格表添加到我自己的现有数据库中,还是应该配置单独的ASP.NET成员资格数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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