Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
1.7k views
in SharePoint Server by 14 18 26
edited by

I got this error "Provisioning did not succeed. Details: Failed to initialize some site properties for Web at Url: OriginalException: Object
reference not set to an instance of an object.
" when trying to create a new site collection or subsite in SharePoint 2019.

PS C:\Users\dev-spfarm> New-SPWeb -Url https:///test1  -Template "CMSPUBLISHING#0"
New-SPWeb : Provisioning did not succeed. Details: Failed to initialize some site properties for Web at Url: 'https:///test1' OriginalException: Object
reference not set to an instance of an object.
At line:1 char:1
+ New-SPWeb -Url https://test1  -Temp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share....SPCmdletNewWeb:SPCmdletNewWeb) [New-SPWeb], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewWeb

PS C:\Users\dev-spfarm>

SharePoint 2019 object reference not set instance of object

How can I Create a new Site collection without getting this error "object reference not set instance of object" in SharePoint 2019?


1 Answer

1 like 0 dislike
by 158 185 373
selected by
 
Best answer

Solving Failed to initialize some site properties for Web in SharePoint 2019

I got this issue "Failed to initialize some site properties for Web at Url: Original Exception: Object reference not set to an instance of an object." before when trying to create a new subsite after deploying a WSP solution that has an Event Receiver on Item Added or Updated.

In my case, I tried to debug the SharePoint solution using Visual Studio and tried to create a new site or subsite, and figured out that the issue was in my code in Event Receiver and specifically on Item Updated event. so I fixed my code and everything worked as expected.

Check also **WSP Deployer: Deploy WSP SharePoint 2019 Solutions using PowerShell**

If you don’t ask, the answer is always NO!
...