Aug 24 2021 04:54 PM
I installed the Aug 2021 CU to both my Dev and PreProd environments. In my PreProd environment I can no longer create a site collection. It works fine in Dev. The ULS log is showing these errors.
Exception from site settings manager. Using default value. Key: 'EveryoneClaimEnabled', Default: 'True', Exception 'System.ArgumentNullException: Value cannot be null. Parameter name: siteSubscription
at Microsoft.SharePoint.SPSiteSubscriptionSettings.GetSettings(SPSiteSubscription siteSubscription)
at Microsoft.SharePoint.Administration.Claims.SPAllUserClaimProvider.GetClaimVisibilitySetting(String siteSubscriptionKey, SPSiteSubscription siteSubscription, Boolean defaultValue)'.
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.SharePoint.Administration.SPContentDatabaseCollection.FindBestContentDatabaseForSiteCreation(IEnumerable`1 contentDatabases, Guid siteIdToAvoid, SPContentDatabase database, SPContentDatabase databaseTheSiteWillBeDeletedFrom)
at Microsoft.SharePoint.Administration.SPContentDatabaseCollection.FindBestContentDatabaseForSiteCreation(SPSiteCreationParameters siteCreationParameters, Guid siteIdToAvoid, SPContentDatabase database, SPContentDatabase databaseTheSiteWillBeDeletedFrom)
at Microsoft.SharePoint.Administration.SPContentDatabaseCollection.FindBestContentDatabaseForSiteCreation(SPSiteCreationParameters siteCreationParameters)
at Microsoft.SharePoint.Administration.SPSiteCollection.GetContentDatabaseForSiteCreation(SPSiteSubscription siteSubscription, Boolean useHostHeaderAsSiteName, Uri siteUri)
at Microsoft.SharePoint.Administration.SPSiteCollection.AddInternal(SPSiteCollectionAddParameters param)
at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPSiteCollectionAddParameters param)
at Microsoft.SharePoint.ApplicationPages.CreateSitePage.BtnCreateSite_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Anyone else having this issue?
Sep 02 2021 08:09 AM
Sep 02 2021 08:15 AM
Sep 02 2021 08:17 AM
Sep 02 2021 08:18 AM
Sep 02 2021 06:14 PM
SolutionHi @David-Haver
With the help of Microsoft Support, we resolved the issue in our environment. I'm not sure if the same root cause will apply to yours, but what we found is the SharePoint_Config database had a reference to a missing Content Database. This caused process to create the site collection to fail using both the Central Admin UI and PowerShell. I did notice however that explicitly setting the target content databases for the site collection did work.
## Succeeded
New-SPSite -Url https://portal.domain.com/sites/ccotetest -Template "STS#3" -Name "ccotetest" -OwnerAlias "domain\ccote" -ContentDatabase "Portal_Content_01"
## Failed - New-SPSite : Object reference not set to an instance of an object.
New-SPSite -Url https://portal.domain.com/sites/ccotetest1 -Template "STS#3" -Name "ccotetest1" -OwnerAlias "domain\ccote"
Resolution: With the help of Microsoft Support
1) Get the SharePoint Web Application ID for the web application where you can create new site collections:
Add-PSSnapin Microsoft.SharePoint.PowerShell
get-spwebapplication | ? {$_.displayname -eq "NameOfYourWebApplication"} | fl
You retrieve the Application ID - example: 4a23e792-6701-41e8-89f7-00c4eaefddce
2) Run the following Query on the SQL Server - where the ID is of the Web Application:
*** Important: You do require a Microsoft Support Case to run any SQL queries to be supported under the service agreement. Running queries on SQL SharePoint databases voids your support otherwise. Always have Microsoft Support approve running SQL queries against your environment. ***
use [SharePoint_Config]
select ID, Name, CAST (properties as xml) from Objects where ID = '4a23e792-6701-41e8-89f7-00c4eaefddce'
go
Locate the orphaned Content Database record from the XML output - Microsoft Support can help you to locate the orphaned database with the output file.
3) Using PowerShell, remove the orphan entry from the configuration:
$wa = get-spwebapplication | ? {$_.displayname -eq "NameOfYourWebApplication"}
$wa.contentdatabases.delete('guid-of-the-orphan-content-database')
I hope this helps!
Regards,
Charles
Sep 10 2021 12:57 PM
This resolved my issue in my 2019 Production environment but not in my 2019 Dev/Test environment. Thanks for posting this is great detail so I could just follow along and remove the orphan.
Sep 02 2021 06:14 PM
SolutionHi @David-Haver
With the help of Microsoft Support, we resolved the issue in our environment. I'm not sure if the same root cause will apply to yours, but what we found is the SharePoint_Config database had a reference to a missing Content Database. This caused process to create the site collection to fail using both the Central Admin UI and PowerShell. I did notice however that explicitly setting the target content databases for the site collection did work.
## Succeeded
New-SPSite -Url https://portal.domain.com/sites/ccotetest -Template "STS#3" -Name "ccotetest" -OwnerAlias "domain\ccote" -ContentDatabase "Portal_Content_01"
## Failed - New-SPSite : Object reference not set to an instance of an object.
New-SPSite -Url https://portal.domain.com/sites/ccotetest1 -Template "STS#3" -Name "ccotetest1" -OwnerAlias "domain\ccote"
Resolution: With the help of Microsoft Support
1) Get the SharePoint Web Application ID for the web application where you can create new site collections:
Add-PSSnapin Microsoft.SharePoint.PowerShell
get-spwebapplication | ? {$_.displayname -eq "NameOfYourWebApplication"} | fl
You retrieve the Application ID - example: 4a23e792-6701-41e8-89f7-00c4eaefddce
2) Run the following Query on the SQL Server - where the ID is of the Web Application:
*** Important: You do require a Microsoft Support Case to run any SQL queries to be supported under the service agreement. Running queries on SQL SharePoint databases voids your support otherwise. Always have Microsoft Support approve running SQL queries against your environment. ***
use [SharePoint_Config]
select ID, Name, CAST (properties as xml) from Objects where ID = '4a23e792-6701-41e8-89f7-00c4eaefddce'
go
Locate the orphaned Content Database record from the XML output - Microsoft Support can help you to locate the orphaned database with the output file.
3) Using PowerShell, remove the orphan entry from the configuration:
$wa = get-spwebapplication | ? {$_.displayname -eq "NameOfYourWebApplication"}
$wa.contentdatabases.delete('guid-of-the-orphan-content-database')
I hope this helps!
Regards,
Charles