Pages

Tuesday, July 18, 2023

Site Collection Quotas and Locks greyed out in Central Administration

 Problem 

One our site collections in SharePoint 2016 farm was in read only mode. When I navigate through Central administration the options under Site Collection Quotas and Locks are greyed out and I was not able to change the options. 

Solution 

To remove the read only I ran the below PowerShell script and it worked.


$site = Get-SPSite "siteurl"

$site.GetType().GetProperty("MaintenanceMode").GetSetMethod($true).Invoke($site, @($false))


Saturday, November 5, 2022

Type 'WebPartContext' is not assignable to type 'ISPFXContext' error in SPFX

Problem 

Getting an error when trying to create spfxContext in SPFx framework. At that time getting the below error. 

Type 'WebPartContext' is not assignable to type 'ISPFXContext'.
The types of 'msGraphClientFactory.getClient' are incompatible between these types.
Type '(version: "3") => Promise<MSGraphClientV3>' is not assignable to type '() => Promise<any>'





Solution

spfxContext: this.context as any



Tuesday, November 1, 2022

Warnings messages lead to fail the SharePoint Framework build process

Problem Background

I was trying to build a SPFx solution using the command gulp bundle --ship.
I was getting lot of warning and the build is getting failed. Image attached below.



Solution
Instruct the gulp to ignore the warnings when building the solution. 
For that you have to add build.addSuppression(/Warning/gi);in gulpfile.js









Tuesday, September 20, 2022

Cannot read configuration file because it exceeds the maximum file size - SharePoint Central Admin not loading

Problem Background

I was patching SharePoint 2013 servers, after completing the patching and running the PS Config the central admin didn't load and it was giving the below error. 



Solution

  • Create a Key named Configuration under HKEY_LOCAL_MACHINE\ SOFTWARE\Microsoft\InetStp
  • Create a DWORD and add the key as MaxWebConfigFileSizeInKB add the value as 300
  • Save








Friday, February 18, 2022

How can we create hidden list in SharePoint Online via SPFx using PnP JS

Problem Background 

I wanted to create Hidden List to store some setting values. The list is provisioned in SharePoint Online using SPFx with the help of  PnP JS.

Solution 

sp.web.lists.ensure("ListName", "List Description", 100, false, { Hidden: true });

Reference

Tuesday, January 25, 2022

Microsoft 365 Essential Training for Damsila Exports

Delivered 30 Hours  on "Microsoft 365 Essential Training" for Damsila Exports over the couple of days. Damsila Exports are the exporters of Phlogopite Mica from Sri Lanka with over 40 years of experience.



Thursday, December 16, 2021

SharePoint On-premise (Tech Lead+) Interview Questions and Answers - 01

What are zones and what are the type of Zones in SharePoint?

Zones are the logical paths for accessing the same web application. For each web application, five zones can be created, and they are:
    • Default
    • Intranet
    • Extranet
    • Internet
    • Custom

What are the databases which are created when we install a SharePoint farm?

The Configuration, Central Administration Content, and Content databases are the three databases that are automatically installed when you deploy SharePoint Server.

Provide couple of Backup and restore best practices in SharePoint Server. 

  • Minimize latency between SQL Server and the backup location
  • Avoid processing conflicts
  • Keep databases small for faster recovery times
  • Use incremental backups for large databases
  • Follow SQL Server backup and restore optimization recommendations
  • Configure SharePoint settings to improve backup or restore performance
  • Consider site collection size when you determine the tools to use
Is it smart to have your backups on the C drive of your server where your SQL server instance is running?
  • No