Get icon for different file types SharePoint2010

If you are working in custom search and your search result in returning various file types like

html, pdf, excel or word etc. and you want to show a small icon for corresponding file types then this article will help you.

This function will take parameter as the itemURL and it will return corresponding icon URL. MapToIcon function of SPUtility class will give us the iconURL.


private string GetIconURL(string itemURL)
{
string iconURL = string.Empty;

iconUrl = “/_layouts/images/” + SPUtility.MapToIcon(SPContext.Current.Web, itemURL, string.Empty, IconSize.Size16);

return iconURL;
}

Replace “Add New Item” Link Text to Different Link Text SharePoint 2010

This article explore to  user’s requirement is to change “Add New Item” link text to ” Different Link text”, so that it will be more meaningful on list.

This article explore to  user’s requirement is to change “Add New Item” link text to ” Different Link text”, so that it will be more meaningful on list.

By default the “Add new item” appears like below:

change add new item text sharepoint

change add new item text sharepoint

Follow below steps to change the text:

  1. Go to the target page >> Site actions>> Edit Page
  2. Insert a CEWP just below the list view web part.
  3. Place the cursor in CEWP, Click on “Edit HTML Source” link from HTML Ribbon Item’s drop down menu. check fig below:
change add new item text sharepoint

change add new item text SharePoint

4. In Content Editor web part enter the script:
  document.getElementById(“idHomePageNewItem”).innerHTML=”Add New InterviewTracker”

  1. Save the page! see the result in action, it will appear like below:
change add new item text sharepoint

change add new item text sharepoint

Accounts used by application pools or service identities are in the local machine Administrators group SharePoint

Rule Name:  Accounts used by application pools or service identities are in the local machine Administrators group.

Summary:  A user account that is used by application pools or services must have permissions of a domain user account and must not be a member of the Farm Administrators group or a member of the Administrators group on the local computer. Using highly privileged accounts for application pools or services poses a security risk to the farm, and could allow malicious code to execute.

Cause:  Accounts that are used by application pools or services are members of the Administrators group on the local computer.

Resolution: Change the user account to a predefined account, or to a domain user account that is not a member of the Administrators group.

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.
  2. On the Central Administration home page, in the Security section, click Configure service accounts.
  3. On the Service Accounts page, in the Select the component to update list, click the application pool or service that uses the credentials of a member of the Administrators group on the local computer as its security account.
  4. In the Select an account list, click an appropriate account for this component — for example, the predefined account Network Service — or click Register new managed account, and then on the Register Managed Account page, specify the credentials and the password change settings that you want.
  5. Click OK.