基于Asp.NET MemberShip的简单SSO方案
时间:2011-05-08 来源:PatrickYu
如果多个web application都是基于Asp.NET MemberShip的,要实现SSO怎么办?需要WIF(Windows Idenfity Framework)吗?不需要,真的不需要,而且很简单-_-
web.config配置如下:
<roleManager enabled="true"/>
<membership>
<providers>
<add connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Encrypted" maxInvalidPasswordAttempts="1000" minRequiredPasswordLength="3" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="20" passwordStrengthRegularExpression="" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
<machineKey decryptionKey="AutoGenerate" validation="SHA1" validationKey="AutoGenerate" />
</system.web>
绿色高亮部分是所有的web application的web.config公共配置。