SharePoint 2013:Subsite Creation Error

Leave a comment

Users with ‘Full Control’ permission on a site collection, even site collection administrators, could not create a subsite.

The only error they receive is “Sorry, you don’t have access to this page”SubSiteAccessDenied

First, I thought it had something to do with permissions on the hidden list (/Lists/TaxonomyHiddenList).  I granted the users ‘Full Control’ on this list.  Nope, that wasn’t it.

Then, I thought it was related to the Master Pages or Page Layouts.  I granted the users ‘Full Control’ on this list, too.  Nope, that wasn’t it either.

After digging through the ULS, I found the following entries.

FollowedContent.FollowItem:Exception:System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))     at Microsoft.SharePoint.Utilities.SPUtility.HandleAccessDenied(Exception ex)     at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bUnRestrictedUpdateInProgress, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValida… 667d969d-3189-d082-cda8-1bb13d261267
…tionCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)     at Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents, String filename, Boolean bPreserveItemUIVersion)     at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents, String filename, Boolean bPreserveItemUIVersion)     at Microsoft.SharePo… 667d969d-3189-d082-cda8-1bb13d261267
…int.SPListItem.Update()     at Microsoft.Office.Server.UserProfiles.SPSocialDataStore.WriteFollowedItem(FollowedItem item, FollowedItemData data)     at Microsoft.Office.Server.UserProfiles.SPSocialDataStore.Follow(FollowedItem item, FollowedItemData data, Boolean checkLimit)     at Microsoft.Office.Server.UserProfiles.FollowedContent.FollowItem(FollowedItem item, Boolean isInternal) 667d969d-3189-d082-cda8-1bb13d261267
Could not follow the url http://myportal.local/dept/<SiteCollection/<Sub-Site>/ 667d969d-3189-d082-cda8-1bb13d261267
SiteFeedFeatureReceiver: exception thrown while trying to auto-follow the web: Microsoft.Office.Server.UserProfiles.FollowedContentException: InternalError : Could not follow the item http://myportal.local/dept/<SiteCollection>/<Sub-Site>/ at Microsoft.Office.Server.UserProfiles.FollowedContent.FollowItem(FollowedItem item, Boolean isInternal)     at Microsoft.Office.Server.UserProfiles.FollowedContent.Follow(Uri url, FollowedItemData data)     at Microsoft.SharePoint.Portal.SiteFeedFeatureReceiver.AutoFollowWeb(SPWeb web) 667d969d-3189-d082-cda8-1bb13d261267
Feature receiver assembly ‘Microsoft.SharePoint.Portal, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’, class ‘Microsoft.SharePoint.Portal.SiteFeedFeatureReceiver’, method ‘FeatureActivated’ for feature ’15a572c6-e545-4d32-897a-bab6f5846e18′ threw an exception: System.Threading.ThreadAbortException: Thread was being aborted.     at Microsoft.SharePoint.Portal.SiteFeedFeatureReceiver.AutoFollowWeb(SPWeb web)     at Microsoft.SharePoint.Portal.SiteFeedFeatureReceiver.FeatureActivated(SPFeatureReceiverProperties properties)     at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce) 667d969d-3189-d082-cda8-1bb13d261267
Feature Activation: Threw an exception, attempting to roll back.  Feature ‘SiteFeed’ (ID: ’15a572c6-e545-4d32-897a-bab6f5846e18′).  Exception: System.Threading.ThreadAbortException: Thread was being aborted.     at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)     at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce) 667d969d-3189-d082-cda8-1bb13d261267

From what I can translate, the “Site Feed” feature was not able to be activated thus not allowing the new site to appear (or written) to “Sites you’re following” on the user’s My Site. This is true when selecting a Team Site, Project Site, or Community Site template.

I realized that all My Sites have been set to read-only (Governance Policy).  By switching from ‘Read-only’ to ‘Not locked’ via Central Admin, the users were able to create subsites successfully.

Read-Only

Learn more about Centric’s Portals and Collaboration Practice

Content Search Web Part (CSWP) – Sort by Modified Date/Time

3 Comments

I was asked to look into Search crawl schedule because one Content Search Web Part settings was changed to sort the content by modified date.  Some contents were modified today, but did not appear at the top of page even though it was configured to sort in descending order.

Search was working fine.  It crawled at the schedule times for both incremental and full crawls.  I kicked off full crawl again, just to make sure.  Still the results displayed on the CSWP was incorrect.

I then looked into the CSWP settings itself.  Under SORTING, the only available field for modified time is LastModifiedTime.

CSWP - Sorting1

I select this property and sorted the list in descending order.

CSWP - Sorting2

I then went back to the Web Part settings and configured CSWP to display two lines with FileName and LastModifiedTime.  The page showed this:

CSWP - Sorting3

It sorted by LastModifiedTime, but this is not the result I was expecting.  It sorted by the LastModifiedTime that the documents were saved not when they were uploaded or the properties were modified in SharePoint.  I expected it to sort the same way my document library is sorted.  This is what I want to have displayed on my CSWP.  My document library looks like this.

DocumentLibrary

As you can see from the last two images, the result are nothing alike.

After searching many posts out on the internet, I did not find a solution.  So, I decided to do some testing on my own.

I went to Managed Properties and reviewed LastModifiedTime settings.  It contained this:

ManagedPropertyLastModifiedTime

After more research, I found that all Mappings to Crawl Properties listed above were related to documents.

I did not want to change any OOTB Managed Properties, so I decided to create a new one called Modified.

Here’s what I have in my new Modified Managed Property.

ManagedPropertyModified

I then started the full crawl.

Now my new Modified Managed Property is available for me to select in my CSWP Sorting.

CSWP - Sorting4

After changing the CSWP Web Part settings, it sorted in the same order as my document library, by Modified column.

CSWP - Sorting5

I hope this helps others who have the same problem I encountered.

Sandboxed Solution on SharePoint 2013 with Domain Controller – Worked!

6 Comments

Have you tried adding a sandboxed solution to a SharePoint page and get the following error?

SandboxUnknownerror

And the ULS log looks something like this?

An unknown exception occurred while executing a sandboxed code solution request in the worker process.\r\n|0 – userCodeWrapperType.FullName = “Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper”, userAssemblyGroup = “.UserCodeAssemblyGroupId = “, GroupId = “EE658350464A4B0AB37ADBB899FEA418-p2GIBxqe026W+GAXIcO3HPrvA5gUwRU3Och/MrL+OhM=””, .RootDirectoryPath = “C:\ProgramData\Microsoft\SharePoint\UCCache\8D0670542EFBECB\EE658350464A4B0AB37ADBB899FEA418%2Dp2GIBxqe026W%2BGAXIcO3HPrvA5gUwRU3Och%2547MrL%2BOhM%3D-1″”, siteCollectionId = 0c17a14d-76a7-4b04-930c-53ae6e9f2a06 – Inner Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.Runtime.Remoting.RemotingException: An attempt to connect to the remote activator failed with exception ‘System.Runtime.Remoting.RemotingException: Cannot resolve ‘channel’ template reference: ‘http client’.     at System.Runtime.Remoting.Activation.RemotingXmlConfigFileParser.ReportUnableToResolveTemplateReferenceError(ConfigNode node, String referenceName, RemotingXmlConfigFileData configData)     at System.Runtime.Remoting.Activation.RemotingXmlConfigFileParser.ProcessChannelsChannelNode(ConfigNode node, RemotingXmlConfigFileData configData, Boolean isTemplate)     at System.Runtime.Remoting.Activation.RemotingXmlConfigFileParser.ProcessChannelsNode(ConfigNode node, RemotingXmlConfigFileData configData)     at System.Runtime.Remoting.Activation.RemotingXmlConfigFileParser.ProcessApplicationNode(ConfigNode node, RemotingXmlConfigFileData configData)     at System.Runtime…

These were the symptoms I had on my VM built with all of the essentials to develop SharePoint.  It’s a single VM with Windows Server 2012, Domain Controller, SQL Server 2012, SharePoint 2013, and Visual Studio 2012. I know Microsoft does not support this configuration, but this is the environment I use to do my testing.

After some research via the internet, deciphering the ULS, event log, changing Application Pool identity to an account with higher privilege, and many other attempts to fix this, it continued to fail.

After a couple of hours, I decided to turn on verbose logging for Sandboxed Code Service to see if I could see more information to troubleshoot this error.  I went back to my SharePoint page and attempted to add my “HelloWorld” (sandboxed) Web Part again.  I couldn’t (still can’t) explain it, but it worked.  So I did it a few times just to make sure.

SandboxWorked

I thought this could not possibly be the “fix”.  So I reset Sandboxed Code Service back to default.  I same error appeared.  I cleared my cache, reset IIS, even rebooted my VM.  Same results…with verbose logging enabled, the Web Part worked…with verbose logging set to default, the Web Part could not be added.

Just to restate, I don’t believe this is the “fix”, but at least it’s a workaround that worked for me.

One last note…

I tested adding a sandboxed solution to an environment where the Domain Controller, SQL Server, and SharePoint are installed on separate servers.  No verbose logging is required to add sandboxed solutions.