Friday, February 27, 2015

SharePoint Farm Solution Details

Below is a set of PowerShell commands and stsadm command to get the solution details in the farm.

1. To list all the solutions - Returns solution name, id and deployed status

Get-SPSolution

2. To list all the properties of a particular solution

Get-SPSolution –identity solutionname.wsp | select *

3. List all solutions, properties and output to a file to read

Get-SPSolution | select * > E:\SolutionDetails.txt

4. List all solutions, properties and output to a file to read (using ststadm)

stsadm.exe -o enumsolutions > E:\SolutionDetails.txt

List of Web applications where solution is deployed

In a SharePoint farm , if we need to display the list of web applications where a solution has been deployed, use the below PowerShell commands

$solution = Get-SPSolution -Identity solutionname.wsp
$solution.DeployedWebApplications | Format-Table -Property Url

Thursday, February 12, 2015

An exception occurred when trying to issue security token: The HTTP service located at http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas is too busy.

There was an unexpected server reboot for our applications server and our service application features were failing. On checking, I noticed the below error in the Windows Event Viewer

Event ID: 8306
An exception occurred when trying to issue security token: The HTTP service located at http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas is too busy.

On browsing to http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc ,  I got the below error



Fix

Identify the application pool for the Service Applications.

Application Pool -> Check Status -> Start

'gacutil' is not recognized as an internal or external command, operable program or batch file.

I was trying to install a *.dll file into GAC (Global assembly Cache) and I got the below error message

Open command prompt and run the below command :
gacutil.exe /i MyLibrary.dll
'gacutil' is not recognized as an internal or external command, operable program or batch file.



Fix
Open Visual Studio Command Prompt (2010) and run the command
gacutil.exe /i MyLibrary.dll


Wednesday, February 4, 2015

Error - “The given key was not present in the dictionary."

PowerShell command to delete the query suggestion automatically added by SharePoint(suggestions are automatically built based on what search results are actually clicked on. It takes 6 clicks within a year for SharePoint to add a suggestion)), returns an error

Remove-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication "SharePoint Server Search" -Language En-Us -Type QuerySuggestionAlwaysSuggest -Identity "ford"

Remove-SPEnterpriseSearchLanguageResourcePhrase : The given key was not present in the dictionary.
At line:1 char:48 + Remove-SPEnterpriseSearchLanguageResourcePhrase <<<<  -SearchApplication "SharePoint Server Search" -Language En-Us -Type QuerySuggestionAlwaysSuggest -Identity ford
    + CategoryInfo          : InvalidData: (Microsoft.Offic...eResourcePhrase:   RemoveSearchLanguageResourcePhrase) [Remove-SPEnterp...eResourcePhrase], KeyNotFoundException
    + FullyQualifiedErrorId : Microsoft.Office.Server.Search.Cmdlet.RemoveSearchLanguageResourcePhrase



I could not find a way to remove a query suggestion added by SharePoint. Maybe it is a bug. But we do have an option to block them. This way we can stop them from appearing on the search box.

To block the query suggestion "ford"

New-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $SearchApp -Language en-us -Type QuerySuggestionBlockList -Name “ford”
Start-SPTimerJob -Identity “Prepare query suggestions”


To unblock the Query Suggestions "ford"

Remove-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $SearchApp -Language en-Us -Type QuerySuggestionBlockList -Identity “ford”
Start-SPTimerJob -Identity “Prepare query suggestions”

To view the list of blocked Query Suggestions

Get-SPEnterpriseSearchLanguageResourcePhrase –SearchApplication "SharePoint Server Search" -Language en-us -Type QuerySuggestionBlockList

WARNING: column "Mapping" does not fit into the display and was removed.

Phrase               Type                                        Culture    Author
------               ----                                             -------       ------

ford                 QuerySuggestionBlockList            en-US      domain\user


How to Sync SharePoint Contacts with Outlook

1) Browse to SharePoint site.

2) Go to Site Actions -> More Options… Create ->Select Contacts template.

3) Create the Contacts lists and enter the data there.

4) Next steps ->List Tools -> List -> Connect to Outlook -> Click Allow -> Click Allow




5) This will Sync the SharePoint contacts with Outlook.
6) Now open Outlook -> Contacts. The Contacts would be listed there.

Changes in the SharePoint list would sync in Outlook as well

An unexpected error has occurred when trying to create an Enterprise Search Center in SharePoint 2010

Issue Description

I tried to create a SharePoint Search Center with site template as Enterprise Search Center within a site collection in SharePoint 2010 and got the below error.




Reason

The SharePoint Server Publishing Infrastructure feature must be activated at the site collection level before creating a site with Enterprise Search Center template.

Resolution

So the next step was to enable the Publishing Infrastructure feature.
1) Go to Site Actions -> Site Settings -> Site collection features -> SharePoint Server Publishing Infrastructure

2) Click on Activate