关于表单认证的小结

Posted on 2008-03-17 10:18  moss2007  阅读(319)  评论(0编辑  收藏  举报

花了快一个星期弄表单认证,弄来弄去感觉自己被忽悠了,做个小结

1、肤浅的看表单认证是很简单的,就是将MOSS从windows的AD读取用户信息的方式转变成从其他存储形式比如数据库中读取,只需要在MOSS管理中心中指定认证的提供方,然后修改web.config,在web.config中指定即可

2、建议使用拓展站点,但是拓展站点貌似会出问题,还在探索中。。。。
     至于建议使用拓展站点的原因在Andrew Connell 的文章中有写到
           ......but why make them to the http://extranet site when we're going to use it for Forms authentication? If we didn't, it would be somewhat difficult and inconvenient (but not impossible) when we needed to grant any special permissions in the Acme Web application to one of the users or roles in our data store. This way, one of our content owners can authenticate using his/her Active Directory credentials and still grant a user who will authenticate via Forms Authentication access within the site......

3、解决实现Form认证后无法再用SharePoint Designer编辑网站的问题:(http://www.cnblogs.com/Eallies/archive/2006/08/22/482986.html
    下面将记录这一步的操作过程。
  1、首先确保网站已经设为Form认证模式,打开网站首页,使用管理员帐户登录,请注意,登录前把下面的Sign me in automatically复选框的勾打上。


  2、登录成功后,再点击Internet Explorer工具栏中的Edit with Microsoft Office SharePoint Designer按钮,即可顺利打开SharePoint Designer了。

08.03.19
时间过得好快,弄了好几天的表单认证,发现网络上提供的管理用户的控件很不好用,于是转为自己写
由于视图是无法更新的,于是为了能保证由SQL生成的用户权限数据库能够正常使用只好通过目测,使用SQL触发器的方式来对应更新其他表中的数据,只对aspnet_user进行操作,同时对aspnet_user表添加了几个自定义的字段。触发器SAMPLE:

CREATE TRIGGER user_update1
ON dbo.aspnet_Users
for update
AS
begin
    declare @email nvarchar(256)
    declare @userid uniqueidentifier
    select @userid = userid
      from aspnet_users

    if update (email)
    begin
       select @email = email
         from aspnet_users
        where userid = @userid
 
       update aspnet_Membership set email=@email
       where userid = @userid
    end
end

同时,为了能够在WSS中使用自己书写的代码,使用QUICKPARTS比较方便
至此,用户管理的思路是有了,实现上也基本上可以,明天把所有代码完成,嘻嘻

拍拍屁股回家~~~~
(未完待续哈哈^^)

Copyright © 2024 moss2007
Powered by .NET 8.0 on Kubernetes