Monday, 12 May 2014

Sorry we're having trouble reaching the server for one web application in SharePoint 2013

In SharePoint 2013, One of my Web application having an issue with PeoplePicker Control(Person And Group field). It is not showing me my AD users and throwing couple of errors:
1- Sorry, we're having trouble reaching the server.
2- User Not Found.

Though my User profile service is working absolutely fine. After surfing the google I found this helpful link and it resolved my issue. I just posting the modified PowerShell cmdLet for others

#Get WebApplication name where you want to fix this issue
$webApp = Get-SPWebApplication http://server:port


# You need to repeat the following block for all the domains you want People Picker to work for on this particular web app
# ——————————————————————————————————————————
$domainInfo = new-object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$domainInfo.DomainName ='domain.net';  # specify the fqdn
$domainInfo.ShortDomainName ='domain'; # specify the netbios name

# =====================================
# This section is only required if there is a one-way trust to the domain and the application pool account does not have access

# First you have to run setapppassword on every server on the farm.
# This sets the encryption key used with the password you enter for the account you specify for $newdomain.loginname
stsadm -o setapppassword -password "Password"
# Where <password> is any string you want to use as an encryption key.
# This needs to be run on every server using the same value for <password>

$domainInfo.loginname = 'domain\sp_farm' # Specify an account that has access to the remote domain
# Do not change anything in the next two lines, it will prompt you to enter the password.
[System.Security.SecureString]$secureStringValue = Read-Host “Enter the account password: ” -AsSecureString
$domainInfo.setpassword($secureStringValue)
# =====================================

$webApp.PeoplePickerSettings.SearchActiveDirectoryDomains.Add($domainInfo)
# Repeat end
# ——————————————————————————————————————————-

# Finally save settings for the web app
$webApp.update()

Update:
I got another issue. One of my web application's client picker control giving no result error
I got the help from this link and able to fix the issue be following PowerShell cmdLet:

Add-PSSnapin microsoft.sharepoint.powershell
$webApp = Get-SPWebApplication http://server:port

# Save current PP settings to the text file in case you need to refer to those
$webapp.PeoplePickerSettings.SearchActiveDirectoryDomains | Out-GridView

$webapp.PeoplePickerSettings.SearchActiveDirectoryDomains.Clear()

$newdomain = new-object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$newdomain.DomainName ='yourDomain.com';  # specify the DNS name
$newdomain.ShortDomainName ='yourDomain'; # Specify the netbios name.
$newdomain.LoginName ='yourDomain\sp_farm'
$newdomain.IsForest='true'
$webapp.PeoplePickerSettings.SearchActiveDirectoryDomains.Add($newdomain)
$webapp.update()

3 comments :

  1. Great Article. I was struggling for the issue and it solved my problem.

    Thanks :)

    ReplyDelete
  2. Thanks for apreciation. :)

    ReplyDelete