我好久前曾在 MOSS & SSO 系列3 中提到过如何重置SSO用户密码的问题,其实有一个很简单的方法,直接调用MOSS管理中心里的SSO配置页面即可,
我们不用写一行代码即可实现哦!
核心文件就是:C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\ssologon.aspx 文件哦!!!
管理中心配置SSO账户时候这样:/_layouts/ssologon.aspx?App=OA 我们很容易的替换App的名字即可!或者直接修改ssologon.aspx页面(红色部分),
自动读出所有的APP List,让用户自己选就得了,避免出错:
<%@ Register TagPrefix="wssuc" TagName="AppList" src="~/_controltemplates/AppList.ascx" %> ……….. <SPSWC:InputFormSectionFieldArea runat="server" ID="InputFormSectionFieldArea1" > 企业应用程序定义:<br /> <wssuc:AppList id="idApplist" runat="server"></wssuc:AppList>
<SPSWC:InputFormTextBox runat="server" Enabled = "false" Visible="false" id="m_txbSSOLogonField1" AccessKeyLocId="SSOLogon_SSOLogonField1_AccessKey" IndentedControl="false" /> <SPSWC:InputFormTextBox runat="server" Enabled = "false" Visible="false" id="m_txbSSOLogonField2" AccessKeyLocId="SSOLogon_SSOLogonField2_AccessKey" IndentedControl="false" /> <SPSWC:InputFormTextBox runat="server" Enabled = "false" Visible="false" id="m_txbSSOLogonField3" AccessKeyLocId="SSOLogon_SSOLogonField3_AccessKey" IndentedControl="false" /> <SPSWC:InputFormTextBox runat="server" Enabled = "false" Visible="false" id="m_txbSSOLogonField4" AccessKeyLocId="SSOLogon_SSOLogonField4_AccessKey" IndentedControl="false" /> <SPSWC:InputFormTextBox runat="server" Enabled = "false" Visible="false" id="m_txbSSOLogonField5" AccessKeyLocId="SSOLogon_SSOLogonField5_AccessKey" IndentedControl="false" /> <SPSWC:InputFormTextBox runat="server" style="visibility:hidden" Enabled="false" id="m_txbNothing" /> <SPSWC:InputFormCheckBox runat="server" Enabled = "false" Visible="false" id="m_cbxStore" TextLocId="SSOLogon_SSOLogonStoreCred_Text" LabelTextLocId="SSOLogon_SSOLogonStoreCred_Text" AccessKeyLocId="SSOAdminManageApp_SSOLogonStoreCred_AccessKey" /> </SPSWC:InputFormSectionFieldArea> |
其中AppList.ascx是自己写的用户控件,主要是把所有的AppList 组合到一个下拉列表中去!如此简单方便,实在是居家旅行必备之物!
可以到 此处下载 完整代码!