Skip to main content

Posts

Showing posts from November, 2014

We apologize for any inconvenience, but we've made the site read only while we're making some improvements

This message shows when I accidentally close my backup script of the SharePoint site. This massage is prompted by the SharePoint when  a site is in a maintenance mode. Resolutions Method 1 Go to the central administrator Application management –> Site Collection Quotas and Locks Select the site collection and change the locks information to Not Locked . Some times this page looks like disabled thus you need to try the method two. Method 2 $Admin = new- object Microsoft .SharePoint .Administration .SPSiteAdministration ('https: //www.site/sites/sitecollection') $Admin .ClearMaintenanceMode () This PowerShell Script changes the site collection back to normal.

How to initialize the SharePoint Client Context in SharePoint Apps (Provider Hosted / SharePoint Hosted) using JSOM (JavaScript Object Model)

  SharePoint Provider Hosted Apps First of all we need to understand the SharePoint Provider Hosted hosting blocks. Provider hosted involves two hosting domains (ex host, sphost ). thus request sending to host to sphost considering as cross domain request. For cross domain request we need to provide SPAppWebUrl to initialize the context. SPAppWebUrl  is available in Url. Ex:- https://host.azurewebsites.net/pages/default.aspx?SPHostUrl=https:%2F%2Fsphost.sharepoint.com%2Fsites%2app&SPLanguage=en-US&SPClientTag=0&SPProductNumber=16.0.3417.1223&SPAppWebUrl=https:%2F%2Fsphost-265535272e9c8d.sharepoint.com%2Fsites%2Fapp%2FSample&Source=https://app.azurewebsites.net/pages/default we can get AppWebUrl by accessing Url parameter. following shows a utility function for getting Url parameter. function getQueryStringParameter (paramToRetrieve) = { var params = document.URL.split( "?" )[1].split( "&" ); for ( var i = 0; i < para