第一部分:在管理中心进行配置
1.打开 管理中心à操作
2.单击 管理单一登陆的设置 后进入设置页面,如下图
3. 单击”管理服务器设置
1. 单一登录管理员帐户:
此为启用SSO服务的账号. 这个账户须是单一登录服务账户所属网域中的成员:BOCOITS\Administrator
2.企业应用程序定义管理员帐户:
设定EAP(企业应用程序定义)的帐户.这个账户须是单一登录服务账户所属网域中的成员:BOCOITS\Administrator
3. 数据库设定
3.1[服务器名称]储存单一登录的设定和帐户信息的数据库服务器名称:bocoits-moss
3.2.[数据库名称]键入单一登录数据库的名称:SSO数据库的名称:SSO
4. 逾时设定
4.1[票证超时]票证超时允许等待的分钟数。预设是2分钟。
4.2.[删除早于该时间的审核日志记录] 要保留审核记录中几天内的记录。 默认值为10天。
点击 确定 后,完成单一登录的服务器设定,且会于指定的SQL SERVER上建立SSO数据库.如下图:
4 管理加密密钥设置
打开 管理中心 > 操作 > 管理单一登录 > 管理加密密钥
点击 创建加密密钥
点击 确定后,密钥已经创建成功.
5 管理企业应用程序定义的设置
单击 新建项目
6 管理企业应用程序定义的帐户信息
单击 设置
在用户名及密码处输入gmail邮箱的用户名及密码,后单击 确定.
OK,到此第一部分就结束.
第二部分:编写代码.
首先新建一个空的asp.net web Application ,然后添加新项SsoToGMail.aspx,在Page_Load页面添加如下代码:
首先导入using Microsoft.SharePoint.Portal;using Microsoft.SharePoint.Portal.SingleSignon;这两个dll,然后添加引用,默认在以下地址:C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI\.




























第三部分:把此应用程序放到sharepoint网站上.
在我的站点新建一个虚拟目录,SSODemo,把上面的应用程序增长拷贝到此目录中.
打开Sharepoint网站,点击 网站操作-->网站设置-->顶部链接栏
点击 新建链接 在 请键入网址 中输入: http://bocoits-moss:60000/
在 键入说明 中输入:转接GMail,点击 确定.
SSODemo/SSOToGMail.aspxOK,到此为止,大功告成了.效果如下:
点击 转接GMail 后的将链接到gmail邮箱,如下图.
string strSSOLogonFormUrl = SingleSignonLocator.GetCredentialEntryUrl("CRMGSSO");
string[] rgGetCredentialData = null;
Credentials.GetCredentials(1, "CRMGSSO", ref rgGetCredentialData);
文章来源:http://hi.baidu.com/leeonger/blog/item/6b3b91fd386d8a4dd7887d08.html