Fixed – Exception calling “CreateSPNavigationNode” with “4” argument(s): Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) in SharePoint 2013

Got this error while running a PowerShell script that creates Navigation in the portal.

Adding the logged in user as to Site Collection Administrator group fixed the issue.

Hope it helps..

Fixed – An unrecoverable error has occurred. Please contact your system administrator error while uploading the profile picture in SharePoint 2013

Hi ,

got the below error while trying to upload profile picture for the user.

The reason was because no My Site was configured.

Creating a My Site site collection and specifying it as My Site Host location fixed the issue.

Profile picture getting updated.

Hope it helps..

Fixed – “There was a problem retrieving data for this field. Updating values in this field is disabled temporarily. You can still update values in the other fields” error in User Profile Service application in SharePoint 2013

Got this error while trying to edit user profile

There was no Managed Metadata Service Application configured.

Configuring it as mentioned in the post fixed the issue

Hope it helps..

The file or folder name contains characters that are not permitted SharePoint 2013. Removing the invalid characters using Regex C#.

Was getting the below error while uploading attachment to SharePoint document library.

string pattern = "[\\~#%&*{}/:<>?|\"-]";
string replacement = " ";

Regex regEx = new Regex(pattern);

string sanitized = Regex.Replace(regEx.Replace(input, replacement), @"\s+", " ");

Helpful post

Hope it helps

Code to upload multiple attachments to SharePoint Folder using Client Object Model

public static void UploadDocument(
string siteURL,
string documentListName,
string documentListURL,
string documentName,
byte[] documentStream,
string folderName,
string invoiceId)
using (var clientContext = new ClientContext(siteURL))
// Get Document List
var documentsList = clientContext.Web.Lists.GetByTitle(documentListName);

// check if folder already exists else create folder

if (!FolderExists(clientContext.Web, documentListName, folderName))
var info = new ListItemCreationInformation();
info.UnderlyingObjectType = FileSystemObjectType.Folder;
info.LeafName = folderName.Trim();
var newItem = documentsList.AddItem(info);
newItem["Title"] = folderName;

var fileCreationInformation = new FileCreationInformation();

// Assign to content byte[] i.e. documentStream
fileCreationInformation.Content = documentStream;

// Allow owerwrite of document
fileCreationInformation.Overwrite = true;

// Upload URL
fileCreationInformation.Url = siteURL + documentListURL + folderName + "/" + documentName;
var uploadFile = documentsList.RootFolder.Files.Add(fileCreationInformation);

// Update the metadata for a field having name "DocType"
uploadFile.ListItemAllFields["Invoice_x0020_Id"] = invoiceId;


public static bool FolderExists(Web web, string listTitle, string folderUrl)
var list = web.Lists.GetByTitle(listTitle);
var folders = list.GetItems(CamlQuery.CreateAllFoldersQuery());
var folderRelativeUrl = string.Format("/{0}/{1}", list.RootFolder.Name, folderUrl);
return Enumerable.Any(folders, folderItem => (string)folderItem["FileRef"] == folderRelativeUrl);

Remove web part that is causing error from a SharePoint page


On adding a web part if in a page at times it throws error and we need to access the page and remove that web part.

To do so we need to add the following querystring to the page url


It will open the page and will present the list of web parts in the page from wherein we can select and delete the web part that was causing the error.

Hope it helps..