添加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?

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

问题描述

我是通过这个职位在这里阅读 MisfitGeek:添加ASP .NET成员到自己的数据库。

和认为我的自我常见的做法是什么。什么是使用ASP.NET成员资格和授权在其应用程序的开发者推荐为最佳做法?创建成员表中存储的应用程序的数据相同的数据库或配置第二个数据库只存储在会员资料?

我目前的设置是为会员信息仅供但我想,增加了数据库我要保持数量不同的数据库。如果我有使用ASP.NET会员5应用程序,那么这意味着5个ASP.NET成员资格数据库。

那么,你通常建立在你的主数据库中的ASP.NET成员资格表或配置一个单独的成员关系表?


解决方案

我个人刚刚添加的asp.net成员资格的东西我自己的数据库。然后我写了一个基本的包装类各地System.Web.Security.Membership类,以便在code行为其使用其自己的成员这样的东西。它的pretty光滑,并不难做到。如果您需要帮助设置它,这里是我做的。

您如何设置它提供的链接是waaaaaaaaaayy更复杂,我用什么:


  

      
  1. 运行C:\\ WINDOWS \\ Microsoft.NET \\框架\\ v4.0.30319 \\ aspnet_regsql.exe的

  2.   
  3. 点击下一步。

  4.   
  5. 选择配置SQL Server应用服务......并点击下一步。

  6.   
  7. 选择Windows身份验证和XXXX数据库,点击Next。

  8.   
  9. 您的设置,然后presented ...然后点击下一步。

  10.   
  11. 最后,你应该用做屏幕psented $ P $,命中完成。

  12.   

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

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:\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天全站免登陆