Sharepoint 2010
SharePoint
Tag Archives: Open
Custom Login Page for Forms based authentication
December 7, 2010
Posted by on While migrating the SharePoint 2007 sites for one of the clients running on Forms based authentication, I had to break my head on making the default login page to work in the migrated SharePoint 2010 environment.
On a deep dive into the SharePoint 2007 Login Page and SharePoint 2010 Login Page for Forms based authentication in the Fiddler, I found out that the SharePoint 2007 Login page generates a cookie ASPXAUTH which is different from the SharePoint 2010 environment which generates the FedAuth cookie.
To dig more deeper and understand things better, when I opened the default.aspx, I could see that it inherited from the FormsSignInPage rather than the LayoutsPageBase.
With all this, I decided to create a New Custom Login Page for My Requirement using Visual Studio 2010.
CUSTOM LOGIN PAGE
-
Open the Visual Studio 2010 and create an Empty SharePoint Project.
- In the Configuration Wizard, Select the option of “Deploy as FARM Solution”, because we will be using the Application Pages and deploying the solution to the SharePoint 14 hive folder. The Sandboxed Solutions cannot be deployed on the SharePoint 14 hive folder.
- Once the solution is created, right click on the solution and click to add an Application page which will be used as a Login page in my application.
- If you plan to use any images on the login page control, the add the mapped image folder by right click on the solution and click “Add” and then select “SharePoint Mapped Images Folder”
- Add a reference of the Microsoft.SharePoint.IdentityModel.dll
For adding the reference of the Microsoft.SharePoint.IdentityModel dll, navigate to the c:\Windows\Assembly\GAC_MSIL folder.
Select the folder “Microsoft. SharePoint.IdentityModel”
once the folder is opened, you will find a version and guid mapped folder,
once you open the folder, you will see the dll from which you need to add a reference to your application.
- Once the reference of the dll has been added into the solution, we need to add a Reference of the Microsoft.SharePoint.IdentityModel in the aspx page as a directive.
<%@ Assembly Name=”Microsoft.SharePoint.IdentityModel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>
- Also Add the default Login control
<asp:Login ID=”signInControl” FailureText=”<%$Resources:wss,login_FailureText%>”
runat=”server” Width=”100%” DisplayRememberMe=”false” />
Custom Login Logic
If you want to add the Custom Login logic into your control, like, you need to perform some additional activities like sending mails to the user, generating notification alerts for the user, then you will need to place your custom logic in the code behind pages.
- Add the directive using Microsoft.SharePoint.IdentityModel.Pages;
- open the code behind page,Login.aspx.cs, and change the default parent class from LayoutsPageBase to FormsSignInPage.
Once all this has been performed, the development of the login page is complete and we need to configure the Login page in the central administration.
CONFIGURE THE CUSTOM LOGIN PAGE IN CENTRAL ADMINISTRATION
- Open the central administration, click on the “Manage Web Applications”
- select your web application and then click on the “Authentication Providers” button.
- Select the zone on which you want to set this Custom login page and then go to the Sign In Page URL and set the Custom Sign In Page with the page just created.
- Once all this has been performed, you will be able to see the Customized Login Page.
SharePoint 2010 Recycle Bin
October 21, 2010
Posted by on The recycle bin in SharePoint is synonymous to Recycle bin in windows and helps the users in recovering files which have been deleted accidentally.
The files in the recycle bin can either be recovered or can be deleted after a pre defined period of time.
Recycle Bin Stages
SharePoint supports two levels of Recycle bin. The initial or First level Recycle bin comes in picture when the user deletes an item from a list. Once the item is deleted again from the First level of Recycle bin it moves to the second stage of Recycle bin.
Access Restrictions on Recycle Bin
The restoration access on the First Stage Recycle Bin is available to all the site users. However, restoration access on the second stage Recycle Bin is available only to the Site Collection Administrators.
Number of Recycle Bin
There is one First Stage recycle bin available per site in a site collection. However, there is only one Second Stage Recycle Bin available per Site Collection.
Item not available in Recycle Bin
If you try to find an item in the recycle bin and fail to locate it then you need to verify the following :
- The contents in the recycle bin are driven by the access control. The user who has deleted the content will be able to see the content in the recycle bin. Other users will not be able to see the items in the recycle bin.
- If you have deleted a top level item like a folder or a list, and try to find a document available at an inner location, then the item will not be viewable. By default the Recycle bin shows the top level content and does not have the capability to show the items in a tree structure or drill down mode.
- The contents in the recycle bin contains only the items within the site. A deleted site is outside the scope of the Recycle bin and is not available for deletion.
- The recycle bin contains the items for a pre defined period which can be set from the Web Application –> General Settings. if the thresh hold is crossed, the item is deleted permanently.
Configure Recycle Bin
Recycle Bin can be configured from the central administration.
- Click on Manage Web Applications
- Select the Web Application for which the recycle bin configuration needs to be configured.
- Click on General Settings in the Ribbon –> General Settings from the drop down as well.
Remove “Recycle Bin” Link from SharePoint Site
- Open the SharePoint Designer
- Check out the master page
- Open the master page in SharePoint Designer
- Find the </Head> tag
- Add the following text above the <HEAD> tag.
1: <style>
2: .s4-specialNavLinkList
3: {
4: display:none!important;
5: }
</style>
6. Check in the master page