首先以管理员的用户进入 SharePoint 3.0 Central Administration
点击 Application Management
单击 Create or Extend Web Application 后,把网站的端口填入40000
注意在Allow Anonymous处选择Yes,即允许匿名访问。点击OK后
稍等片刻,这个过程可能时间会长一点,去倒杯茶。
创建完成以后,在运行里,输入 iisreset/noforce
重启IIS后,点击Create Site Collection创建网站集。
输入网站相应的内容,点击OK。
打开Central Administration->Application Management->Authentication Providers,修改为form认证
点击Default,修改默认的AD认证为Form认证及填入membership和roleManage Provider。并把membership Provider name填入AspNetSqlMembershipProvider在 roleManager name处填写AspNetSqlRoleProvider后,点击OK。
访问刚创建的网站。即已经实现Form认证方式登陆。
在此网站的web.config中及网站的管理中心的web.config做如下修改。
在<SYSTEM.WEB>的上方插入<CONNECTIONSTRINGS>节,在<SYSTEM.WEB>的内部插入<MEMBERSHIP>和<rolemanager>节
<remove name="AspNetSqlProvider" />
<add name="AspNetSqlProvider" connectionString="server=server; database=aspnetdb; Trusted_Connection=True" />
</connectionStrings>
<membership defaultProvider="AspNetSqlMembershipProvider">
<providers>
<remove name="AspNetSqlMembershipProvider" />
<add connectionStringName="AspNetSqlProvider" passwordAttemptWindow="10" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" description="Stores and retrieves membership data from the Microsoft SQL Server database" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
<providers>
<remove name="AspNetSqlRoleProvider" />
<add connectionStringName="AspNetSqlProvider" applicationName="/" description="Stores and retrieves roles data from the local Microsoft SQL Server database" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>
配置sharepoint站点为Form认证(下)