Friday, 9 March 2012

Error: Access Services is unable to process the request

Error: Access Services is unable to process the request

Checked the permissions of the service account on database as well as on service application all was well with it. We recently installed Service Pack 1 and later June 2011 cummulative update in our environment. That seems to disturb the security token service.

Run the following PowerShell to resolve the issue.

PS c:\> Get-SPServiceApplication
PS c:\> $sts = Get-SPServiceApplication | ?{$_ -match "Security"}
PS c:\> $sts
PS c:\> $sts.Status
PS c:\> $sts.Provision()

IISreset  and once iis was reset, we were all good to leverage our access based sites. 

Wednesday, 7 March 2012

Reset SharePoin 2010 farm passphrase powershell


As a part of SharePoint’s migration from pilot to new production environment we had to Join two new application servers but somehow the old farm passphrase didn’t work when  joining the application server in the farm may be I had an incorrect password. Anyways, this life saving PowerShell command helped massively to change the farm passphrase.

Open the SharePoint 2010 Management Shell

Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint 2010 Management Shell

Enter this at the PowerShell prompt:

$passphrasereset = ConvertTo-SecureString -asPlainText -Force

Input the new passphrase and hit Enter
Enter this at the PowerShell prompt:

$Set-SPPassPhrase -PassPhrase $passphrasereset -Confirm

You will be asked to confirm the passphrase by re-entering it.  Re-enter the passphrase and hit Enter

You will be asked if you are sure that you want to perform this action, type Y (for Yes) and hit Enter. 

Your farm passphrase has now been reset!

The security validation for this page is invalid in InfoPath form

Error  Message : Failed to get SPGroupName from GroupID. Error Message: Group cannot be found. Callstack: at Microsoft.SharePoint.SPGroupCollection.Get ByID(Int32 id) at Microsoft.SharePoint.WebControls.PeopleEditor.set_SharePointGroupID(Int32 value). 
The security validation for this page is invalid in InfoPath form

Most of the articles suggest to disable Web Page Security Validation in the Web Application settings which is alright to fix the issue on a temporary basis specially if its not a production environment. Here are the steps:
  1. Open Central Administration -> Manage Web Applications -> General Settings
  2. Web Page Security Validation -> Off.
  3. OK
If it’s a production environment I wouldn’t suggest using this as a solution could cause serious security risk. I was able to resolve this by adding an entry here:

Under the 14 hive, under template/layouts, find the formserver.aspx file. 
Backup the file and then edit it with any text tool, say, notepad.
Under the <body> tag, add the highlighted line of code.

<body runat="server" id="PageBody">
<SharePoint:FormDigest runat="server" />

Save it.

iisreset won’t hurt

You may have to do this if on each server . In my case, I had to republish the InfoPath form as an administrator approved form and change the form template in the form library to the published form content type which solved the issue after adding the entries in formserver.aspx. 

Thanks to MSDN for offering this solution. Saved time !

Change SharePoint central admin port number


In my current environment we had 2 wfe’s in our environment with wfe and app server roles clubbed together on it during the pilot phase. As a part of SharePoint infrastructure migration to a production environment and a new logical design we added 2 new app servesr and segregated the roles on i.e. wfe  and app server roles inthe new environment.

The requirement was host to central administration from app server and somehow the port was changed automatically while doing so. And it didn’t allow us to re-run product configuration wizard as the ports were different.

Got this error: Failed to register SharePoint services.  An exception of type System.UriFormatException was thrown.  Additional exception information: Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed.
System.UriFormatException: Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at System.Uri.CreateUri(Uri baseUri, String relativeUri, Boolean dontEscape)
   at Microsoft.SharePoint.Administration.SPSiteCollection.get_Item(String strSiteName)
   at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.get_HealthRules()
   at Microsoft.SharePoint.Administration.Health.SPHealthAnalyzer.RegisterRules(Assembly assembly)
   at Microsoft.Office.InfoPath.Server.Util.HealthAnalyzerRegistration.RegisterHealthRules()
   at Microsoft.Office.InfoPath.Server.Administration.FormsService.Update()
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInConfigDB(Boolean provisionTheServiceToo, String serviceRegistryKeyName)
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServices(Boolean provisionTheServicesToo)
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.Run()
   at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

Run the following PowerShell command and reran product config wizard and it meet the need.

Set-SPCentralAdministration -Port <port number>

Example: Set-SPCentralAdministration -Port 2222

Note:

The Set-SPCentralAdministration cmdlet blocks the following ports:
Lower than 1023
Higher than 32767
443 (SSL)

Wednesday, 22 February 2012

error the search service instance on this server is not online cannot start Search service

The search service instance on this server is not online cannot start Search service
 
Cannot start search from Central Admin via system settings > Manage services on this server. Checked ULS logs and did lot of goggling and found different resolutions what worked for me was to reapply the topology for search.

Go to Central Admin > Application Management > Manage Service application
Click on your Search Service Application, scroll down the page till you see Modify button
Check if any of the Crawl or Query or Admin component is not online or not responding
Click on Modify button and Apply Topologies may consume 5-10 minutes to complete the process Hurray now it works for me.

If that doesn’t work for you have a look at ULS logs, PowerShell may resolve the issue for you. Run the following command

$searchinstance = Get-SPEnterpriseSearchServiceApplication

Check the search status here
Now pause the search instance run $searchinstance.Pause()
And to resume search run $searchinstance.Resume()

If this throws an error, check for the corresponding error or correlation id in ULS logs.

It could be an issue with Admin component to resolve this, run the following PowerShell command

$searchadmininstance = Get-SPEnterpriseSearchServiceApplication -local   

Type $searchadmininstance and press enter to see Search instance details, if you see the search status as disabled, now run

Get-SPEnterpriseSearchServiceInstance -Local | Start-SPEnterpriseSearchServiceInstance

Once above runs successfully, execute below:

$searchapp = Get-SPEnterpriseSearchServiceApplication

Now set search Admin component:

set-spenterprisesearchadministrationcomponent –searchapplication $searchapp –searchserviceinstance $searchadmininstance

This process may consume 5-10 minutes, now manoeuvre to search service application it shall be all okay.

Please let me know if this helps so I can update my solution

Thursday, 16 February 2012

This view cannot be displayed because the number of lookup and workflow status columns it contains exceeds the threshold (8) enforced by Administrator

SharePoint list doesn’t display the items. Get an error this view cannot be displayed because the number of lookup and workflow status columns it contains exceeds the threshold (8) enforced by Administrator

The default lookup threshold is set to 8 in a web application by default. To resolve this,

Navigate to the Central Administration

Click on Application and select the web application

In my case its http://sharepoint.portal

From the ribbon bar, select General Settings > Select Resource Throttling
  
Now set List view Lookup threshold to 20


Note the maximum number you can set is between 1 to 1000

Wednesday, 1 February 2012

Cannot create site collection error object reference not set


When you create a new site collection from central admin, you get an error object referent not set.
This can happen for various reasons. 

It could be that the Alternate access mapping is set incorrectly or some orphan entries in your database or you’ve set content hub or environment is unstable and you notice Upgrade required when you navigate Central Admin > System Settings > Manage Servers

First thing tried was to use PowerShell to create site collection thought may be this slip the attention of the ward and could let me create site collection. Nope doesn’t work.

Checked for environment stability by navigating to Central Admin> System Settings > Manage Servers. Didn’t find any server with status upgrade required which means may be cumulative update was installed but psconfig wasn’t executed or failed.

Checked the alternate access mapping intranet, extranet and default urls were intact

For Content Hub, checked the Managed Metadata Proxy Service Application properties and unchecked the last two options that didn’t resolve the issue

Had a look a at ULS logs again and pointed something about the content database.

Change your central url from default to : http://centraladmin:portnumeber/_admin/DatabaseStatus.aspx and notice for any unusual databases or the ones not responding. Found that the one which wasn’t responding was orphan database added some time back but didn’t delete.

Run the following command in Powershell
orphanedDB = Get-SPDatabase | where{$_.Name -eq "Content Database Name"}
$orphanedDB.Delete()
Performed an IIS reset and voila now able to create site collection