Wednesday, January 21, 2009

Configure MOSS 2007 FBA with LDAP Provider

In SharePoint 2003 only Active Directory authentication method was supported. MOSS2007 allow a range of authentication types.
The authentication types available on MOSS2007 are:
Active Directory Provider
Active Directory Application Mode (ADAM)
SQL Membership Provider
LDAP Provider
Custom Provider
Web Single Sign-On
Active Directory Federation Services (ADFS)
3rd part Identity Management Systems

In these scenario I will use LDAPMembershipProvider to configure Forms authentication.
Follow these steps:

- Identify the subdirectory that is associated with the Central Administration site and associated with your site
- Open web.config files of both sites (the provider information must be added on both files)
- Above the tag <system.web> add following section to define a connection to LDAP

<membership defaultProvider="LdapMembership"> 
        <add name="LdapMembership" type="Microsoft.Office.Server.Security.LDAPMembershipProvider, Microsoft.Office.Server, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" server="" port="389" useSSL="false" userDNAttribute="distinguishedName" userNameAttribute="cn" userContainer="ou=cadauser,dc=cadario,dc=biz" userObjectClass="user" userFilter="(ObjectClass=user)" scope="Subtree" otherRequiredUserAttributes="sn,givenname,cn" connectionUsername="cn=test_conn,ou=cadauser,dc=cadario,dc=biz" connectionPassword="mypwd&9876" />

- Save and close both files
- On command prompt execute iisreset
- Open Central Administration site and click on Application Management tab
- Under the Application Security section, click on Authentication Providers
- Be sure that correct web application in selected
- On the Authentication Providers page, click the link associated with the zone
- In the Edit Authentication page, on Authentication Type section select Forms
- In Membership Provider Name section type Membership Provider Name (LdapMembership is the name of the provider that I wrote in the web.config file)
- Click on save button
- Click on Application Management tab
- Under the Application Security section, click on Policy for Web application
- Be sure that correct web application in selected
- Click on Add User
- Select the zone that you previously modify (in the Authentication Providers page)
- In the next page add user (test_conn) and click on check name (note that account name displayed is LdapMembership:test_conn)
- Choose Full Control in the Choose Permission section
- Click on Finish button

Saturday, January 17, 2009

Changing SharePoint Central Administration port

SharePoint 2007 chooses a random port for Central Administration Site.
With stsadm command is possible to change Central Administration port number on MOSS 2007/WSS 3.0.
To change port, go to
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
Enter command
stsadm -o setadminport -port <<port_number>>
After a bit of time you will receive on command prompt
Operation completed successfully.

That's all!

Friday, January 9, 2009

Sharepoint Query String

Sometimes, during Sharepoint administration, the Edit Page button won't appear.
In this case is possible to insert, directly in the URLs, the parameters listed below:
Edit Mode -> Mode=Edit
View Mode -> Mode=View
Personal Mode -> PageView=Personal
Shared Mode -> PageView=Shared
Add Web Parts/Browse -> ToolPaneView=2
Add Web Parts/Search -> ToolPaneView=3
For example:

Also, to go on Site Settings insert in the URLs _layouts/settings.aspx