Sharepoint FBAForms Based Authentication配置文档.docx
《Sharepoint FBAForms Based Authentication配置文档.docx》由会员分享,可在线阅读,更多相关《Sharepoint FBAForms Based Authentication配置文档.docx(20页珍藏版)》请在冰豆网上搜索。
SharepointFBAFormsBasedAuthentication配置文档
2010FBA配置文档
1用ClaimsBasedAuthentication方式新建一个webapplication。
·打开CentralAdministration
·点击ManageWebapplication点击new
·在弹出的新建webapp的窗口中选择ClaimsbasedAuthentication
·勾选EnableFormsBasedAuthentication(FBA)还可以勾选正常的WindowsAuthentication
·在两个name处分别填入AspNetSqlMembershipProvider和AspNetSqlRoleProvider(注:
这里的name可以随便填,但是为了下面的config文件对应就用这两个吧)
·点击create,webapplication创建成功
2利用创建数据库
·在dos命令下输入cdc:
\Windows\Microsoft.NET\Framework64\v2.0.50727
·继续输入aspnet_regsql.exe后会弹出下面的窗口
·点击下一步。
。
。
下一步会出现下面的界面。
·在server处添加sql机器的servername在database中添加自己定义的数据库名称。
·点击下一步数据库建立成功。
2修改config文件(注:
这里我们要修改三个webapp的config文件Web.configofFBAWebapplication,web.configofCentralAdministrationSite&Web.configofSTS.)
其中FBAWebapplication是刚才新建的那个webapp其config文件的路径为C:
\inetpub\wwwroot\wss\VirtualDirectories
CentralAdministrationSite为SharePoint管理中心其config文件的路径为C:
\inetpub\wwwroot\wss\VirtualDirectories
STS为SecurityTokenService其config文件的路径为C:
\ProgramFiles\CommonFiles\MicrosoftShared\WebServerExtensions\14\WebServices\SecurityToken
·下面的字段需要在三个webapp的config文件中分别添加的字段,其中datasource是填入sqlserver的name;InitialCatalog处填入刚才用建立的数据库的名称
--FBAClaimsAuth-->
--FBAClaimsAuth-->
…
·在新建的FBA的webapp中的config文件中添加下面的字段
......
......
......
......
·在sts的webapp的config文件中添加下面的字段
......
......
在ca的webconfig文件中添加这样的
......
......
......
......
3.在SQL数据库中添加用户
打开vs2008,新建一个website的项目,把下面的代码添加进去
xmlversion="1.0"?
>
--
Note:
Asanalternativetohandeditingthisfileyoucanusethe
webadmintooltoconfiguresettingsforyourapplication.Use
theWebsite->Asp.NetConfigurationoptioninVisualStudio.
Afulllistofsettingsandcommentscanbefoundin
mentsusuallylocatedin
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
--
Setcompilationdebug="true"toinsertdebugging
symbolsintothecompiledpage.Becausethis
affectsperformance,setthisvaluetotrueonly
duringdevelopment.
-->
--
Thesectionenablesconfiguration
ofthesecurityauthenticationmodeusedby
ASP.NETtoidentifyanincominguser.
-->
--
Thesectionenablesconfiguration
ofwhattodoif/whenanunhandlederroroccurs
duringtheexecutionofarequest.Specifically,
itenablesdeveloperstoconfigurehtmlerrorpages
tobedisplayedinplaceofaerrorstacktrace.