Friday, January 21, 2011

SharePoint 2010 Tips and Tricks

1. Change Site Icon/Logo of all pages in SharePoint 2010 (Wiki pages and Web part pages)

a. Wiki Pages:

Navigate to following path-
Site > Site Actions > Site Settings > Look and Feel > Title, description, and icon > URL

In URL textbox we can specify either Site Asset’s Image or 14 hive image.
Reference:
Change Wiki Page Site Logo

b. Web Part Pages:

  • Open Web Part page
  • Select Page ribbon Tab on top
  • Select Title Bar Properties
  • Scroll to the right and on the Web Part Page Title Bar properties
  • Specify either Site Asset’s Image or 14 hive image

Reference:
Change Web Part Page Site Logo



2. Enable Anonymous in SharePoint 2010


  1. Open SharePoint 2010 Central Administration
  2. Navigate to following path:
    Central Administration > Application Management > Manage web applications
  3. Select desired Web Application
  4. Click Authentication Providers icon in ribbon tab
  5. On the Authentication Providers pop-up window click on the Default zone.
  6. Under Edit Authentication, check Enable anonymous access and click Save.
  7. Go back to Web Application Management click on the Anonymous Policy icon in ribbon tab.
  8. Under Anonymous Access Restrictions select your Zone and set the Permissions to None – No policy and click Save.
  9. Now, open the desired web application in which we want to set anonymous access.
  10. Navigate to your top level site collection for the web application.
  11. Click the Site Actions > Site Settings > Users and Permissions > Site permissions.
  12. Under Permission Tools ribbon, click Anonymous Access icon
  13. Set the permissions to Entire Web site, or List and Libraries, or Nothing as per requirement
  14. Click OK.
  15. In case of Anonymous access at Web site level:
  • Navigate to Web Site > Site Actions > Site Permissions
  • Click Stop Inheriting Permissions icon in Permission Tools ribbon tab
  • After that we can see Anonymous Access icon in ribbon, click it
  • In Anonymous Access pop-up select desired check box as per requirement
  • Click Ok
        In case of Anonymous access at List and Library level:
  • Navigate to List or Library > List Tool tab > List tab > List Settings icon in ribbon > Permissions and Management > Permissions for this list
  • Click Stop Inheriting Permissions icon in Permission Tools ribbon tab
  • After that we can see Anonymous Access icon in ribbon, click it
  • In Anonymous Access pop-up select desired check box as per requirement
  • Click Ok

Reference:
Enable Anonymous Access 1
Enable Anonymous Access 1


3. Steps to use or consume SharePoint List or Libraries RSS functionality

  • If we are planning to use out-of-box RSS functionality of SharePoint’s List or Libraries using out-of-box RSS Viewer web part of SharePoint, then we have to enable Anonymous access at List or Library level.
  • If anonymous access is disabled at List or Library level then we will get following error:
    “The RSS webpart does not support authenticated feeds”

To solve the above error there are following options:

  • Set anonymous access at List or Library level
  • Use 3rd party RSS Feed Reader [available in Codeplex site]
  • Set IIS Authentication from NTLM to Kerberos
    [Central Administration > Application Management > Manage web applications > Select desired Web application > Select Authentication Providers icon in ribbon tab > Click Default link in Authentication Providers pop-up > Edit Authentication pop-up > IIS Authentication Settings > Integrated Windows Authentication > Select Negotiate (Kerberos)]


Note: As per me first option i.e. set anonymous access is best one.


4. Master page branding or UI change in SharePoint 2010

[Note: It’s was my personal experience]
I tried to change the HTML code of default.master or V4.master page/file using SharePoint 2010 Designer (SPD).
SPD reflected all changes, but when I browsed any content page, it didn’t displayed the desired changes.

Solution [as per me]:
I created a copy of default.master or V4.master and renamed it as per requirement. Made all the required HTML changes in it and saved it. Right clicked on the new custom master page and selected the Set as Default Master Page option. Changes get reflected in both SPD and all the browsed content pages.


5. How to hide first tab of SharePoint 2010 site

We need to add following CSS class to hide first tab of SharePoint 2010 site:

.s4-tn li.static:first-child{ 
display: none; 
}


Why we need to hide the first tab???
Ans: There is well known tab selection issue in SharePoint 2010. When we select first tab, second tab always remain selected (wrong tab selection as per UI). To solve this issue, I made the first tab invisible and made the second tab as home page tab. So by this when user clicks the first visible tab, he actually clicks the second tab and hence there is no UI confusion regarding tab selection.



6. Error :
Error occurred in deployment step 'Retract Solution': A deployment or retraction is already under way for the solution "MySolution.wsp", and only one deployment or retraction at a time is supported.

Solution:
a. Enumerates all pending and active deployments in the farm using following command:
stsadm -o enumdeployments

b. Cancel the troublesome Solution that was causing problem [specify the Solution GUID using above command]:
stsadm -o canceldeployment -id <solution GUID>


Reference:
SharePoint deployment or retraction issue



Google