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

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

问题描述

我在这里阅读了这篇文章MisfitGeek:将 ASP.NET 成员身份添加到您自己的数据库.

并思考我自己的常见做法是什么.在他们的应用程序中使用 ASP.NET 成员资格和授权的开发人员推荐什么作为最佳实践?在存储其应用程序数据的同一数据库中创建成员资格表,还是配置第二个数据库以仅存储成员资格信息?

我当前的设置是一个仅用于会员信息的不同数据库,但我认为这会增加我必须维护的数据库数量.如果我有 5 个应用程序使用 ASP.NET 成员资格,那么这意味着还有 5 个 ASP.NET 成员资格数据库.

那么您通常是在主数据库中创建 ASP.NET 成员资格表还是配置单独的成员资格表?

解决方案

我个人只是将 asp.net 成员资格内容添加到我自己的数据库中.然后我围绕 System.Web.Security.Membership 类编写了一个基本的包装类,以便代码的行为就像它使用自己的成员资格一样.它非常光滑,并不难做到.如果您需要帮助进行设置,这就是我所做的.

您提供的有关如何设置的链接比我使用的要复杂得多:

<块引用>

  1. 运行 C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_regsql.exe.
  2. 点击下一步.
  3. 选择为应用程序服务配置 SQL Server..."并点击下一步.
  4. 选择Windows 身份验证"和XXXX"数据库,然后点击下一步.
  5. 然后会显示您的设置...然后点击下一步.
  6. 最后,您应该看到一个完成的屏幕,点击完成.

如果你真的需要演练,我在文档中有截图.

I was reading through this post here MisfitGeek: Adding ASP.NET Membership to your OWN Database.

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?

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.

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

解决方案

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. Run C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_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 Membership 表添加到我自己现有的数据库中,还是应该配置一个单独的 ASP.NET 成员资格数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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