ASP.NET的Active Directory成员资格提供程序和SQL配置文件提供 [英] ASP.NET Active Directory Membership Provider and SQL Profile Provider

查看:113
本文介绍了ASP.NET的Active Directory成员资格提供程序和SQL配置文件提供的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在设计一个新的项目,我工作的一个会员/档案方案,我希望能得到别人的一些投入。

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架构不能扩展到举行新的领域,我需要保存用户设置和对象在不同的​​数据存储。我也一直告诉亚当可能不是一个可行的解决方案。

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配置文件提供为用户配置文件数据存储。我想preFER不建立一个自定义配置文件提供者,但我不认为这构成太大的问题,如果需要的话。

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.

任何评论都将大大AP preciated。

Any comments would be greatly appreciated.

感谢。

推荐答案

首先 - 我从来没有这样做我自己。

First off - I've never done this myself.

有对ASP.NET 2.0成员,角色和用户信息提供系统由斯科特·米切尔的 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配置文件提供的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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