我目前正在为我正在进行的一个新项目设计会员/个人资料方案,我希望能从其他人那里得到一些意见.
I am currently designing a Membership/Profile scheme for a new project I am working on and I was hoping to get some input from others.
该项目是一个 ASP.NET Web 应用程序,由于时间短,我正在尝试尽可能使用任何内置的 .NET 框架组件.该网站可能会招待<5000 个用户.每个用户都有一个配置文件,其中自定义设置和对象将在访问之间保留.
The project is a ASP.NET web application and due to the short time frame, I am trying to use any and all built in .NET framework components I can. The site will probably entertain < 5000 users. Each user will have a profile where custom settings and objects will be persisted between visits.
我需要使用现有的 Active Directory 进行身份验证.由于无法扩展 AD 架构以保存新字段,因此我需要将用户设置和对象保存在不同的数据存储中.我也被告知 ADAM 可能不是一个可行的解决方案.
I am required to use an existing Active Directory for authentication. Since the AD schema cannot be extended to hold new fields, I am required to hold user settings and objects in a different data store. I have also been told ADAM is probably not a possible solution.
我希望将 Active Directory 成员身份提供程序用于我的身份验证方案,并将 SQL 配置文件提供程序用作用户配置文件数据存储.我不希望构建自定义配置文件提供程序,但如果需要,我认为这不会造成太大问题.
I was hoping to use the Active Directory Membership Provider for my authentication scheme and the SQL Profile Provider as a user profile data store. I would prefer not to build a custom profile provider, but I do not see this posing much of a problem if need be.
我想知道这是否是一个可能的解决方案,如果是,那么有人对这种方法有好运吗.
I was wondering if this is even a possible solution, and if so, has anyone had any luck with this approach.
如有任何意见,我们将不胜感激.
Any comments would be greatly appreciated.
谢谢.
首先 - 我自己从未这样做过.
First off - I've never done this myself.
Scott Mitchell 在 Rolla 的 4 个人.
There's a really excellent series (14 !! parts) on the whole topic of ASP.NET 2.0 membership, roles and profile provider systems by Scott Mitchell at 4 Guys from Rolla.
根据我的理解,您应该能够通过在 web.config 中使用这两个部分来配置您正在寻找的行为:
According to my understanding, you should be able to configure this behavior you are looking for by using basically these two sections in your web.config:
<!-- configure Active Directory membership provider -->
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.3600, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>
<!-- configure SQL-based profile provider -->
<profile defaultProvider="SqlProvider">
<providers>
<add name="SqlProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="SqlProfileProviderConnection"
applicationName="YourApplication" />
</providers>
<!-- specify any additional properties to store in the profile -->
<properties>
<add name="ZipCode" />
<add name="CityAndState" />
</properties>
</profile>
我认为这应该可行:-)
I would think this ought to work :-)
这篇关于ASP.NET Active Directory 成员资格提供程序和 SQL 配置文件提供程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!