Wednesday, April 8, 2015

Server Error in '/' Application” my profile in Mysite.

Issue Description

Error 1
I was browsing to the .../_layouts/settings.aspx page of my Mysite and was getting the below error

Error
An unexpected error has occurred.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: ed701c42-8302-42d4-8886-121e92484460
Date and Time: 5/28/2014 4:58:36 PM
 Go back to site

Error 2
Getting an error “Server Error in '/' Application” when tried to click my profile in Mysite.

Issue Details

On checking the logs and server event viewer I got the below error messages:

Error Logs



The user does not exist or is not unique.
Object Cache: The super user account utilized by the cache is not configured. This can increase the number of cache misses, which causes the page requests to consume unneccesary system resources.  To configure the account use the following command 'stsadm -o setproperty -propertyname portalsuperuseraccount -propertyvalue account -url webappurl'. The account should be any account that has Full Control access to the SharePoint databases but is not an application pool account.  Additional Data:  Current default super user account: SHAREPOINT\system


Could not get token super user token, reverting to system account.  User is "UserName"
stsadm -o setproperty -propertyname portalsuperuseraccount -propertyvalue account -url webappurl'
PortalSiteMapProvider was unable to fetch root node, request URL: /_layouts/settings.aspx, message: The user does not exist or is not unique., stack trace:  
 at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)   
 at Microsoft.SharePoint.Library.SPRequest.GetUserToken(String bstrUrl, String bstrLogin)   
 at Microsoft.SharePoint.SPWeb.GetUserToken(String userName)   
 at Microsoft.SharePoint.Publishing.CacheManager.<.ctor>b__0(SPSite newSite)   
 at Microsoft.SharePoint.Publishing.CommonUtilities.<>c__DisplayClass1.<RunWithElevatedSite>b__0()   
 at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()   
 at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)    
 at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)   
 at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)   
 at Microsoft.SharePoint.Publishing.CommonUtilities.RunWithElevatedSite(SPSite siteNonElev, Boolean allowUnsafeUpdates, ElevatedSiteProcessor callWithElevatedSite)   
 at Microsoft.SharePoint.Publishing.CacheManager..ctor(SPSite site)   
 at Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite site, Boolean useContextSite, Boolean allowContextSiteOptimization)   
 at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.get_ObjectFactory()   
 at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.get_TryGetRootNode()


Failed to create a custom control 'PublishingSiteActionsMenuCustomizer', feature 'Publishing' (id:22a9ef51-737b-4ff2-9346-694633fe4416) using attributes (ControlSrc='', ControlAssembly='Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c', ControlClass='Microsoft.SharePoint.Publishing.WebControls.PublishingSiteActionsMenuCustomizer': System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.SharePoint.SPException: The user does not exist or is not unique. ---> System.Runtime.InteropServices.COMException (0x81020054): The user does not exist or is not unique.   
System.Web.HttpException: The DataSourceID of 'TopNavigationMenu' must be the ID of a control of type IHierarchicalDataSource.  A control with ID 'topSiteMap' could not be found.  


Issue Resolution

I analyzed that the issue was “object caching accounts don’t have the correct permission on the Mysite web application”. It was the superuser and superreader accounts-however, the issue was not that they weren't configured correctly.

1. Ran the below mentioned following commands:
stsadm -o getproperty -pn portalsuperuseraccount -url https://mysites.url.com/
stsadm -o getproperty -pn portalsuperreaderaccount -url https://mysites.url.com/

Above commands returned below output:
<Property Exist="Yes" Value="superuser"/>
<Property Exist="Yes" Value="superreader”/>

Did you notice that it was not of the format "domain\username”. This was the issue

2. Remove existing
I ran the below commands to remove the existing values set for the super user & superreader using below power shell command:
$wa = Get-SPWebApplication "https://mysites.url.com"
$wa.Properties.Remove("portalsuperuseraccount")
$wa.Properties.Remove("portalsuperreaderaccount")
$wa.update()

3. Verify
After this, I verified the status using below power shell commands:
stsadm -o getproperty -pn portalsuperuseraccount -url https://mysites.url.com/
stsadm -o getproperty -pn portalsuperreaderaccount -url https://mysites.url.com/

This returned below value for super user & superreader:
<Property Exists="No" />PS C:\Users\ domain\superuser >
<Property Exists="No" />PS C:\Users\ domain\superreader>

4. Add new
Then I ran the command to set new values for the super user & superreader using below power shell commands:
$wa = Get-SPWebApplication " https://mysites.url.com"
$wa.Properties["portalsuperuseraccount"] = " domain\superuser "
$wa.Properties["portalsuperreaderaccount"] = " domain\superreader"
$wa.update()




No comments:

Post a Comment