SharePoint CSOM and “The node to be inserted is from a different document context.”

0
2
There are a few reasons you can get the “The node to be inserted is from a different document context.” error, and most of them appear to involve updating certain types of fields multiple times in the same request.  Here is an example: using (var clientContext = new ClientContext("UrlToYourSite")) {    //Load all fields   … Read more
0
2

SharePoint CSOM: Fixing the “Value does not fall within the expected range” Error Calling GetFolderByServerRelativeUrl

0
0
There are times when you just need to get a reference to a folder in the master page gallery of a site collection using CSOM, and that’s where I found myself the other day.  I had a SharePoint context, so I attempted to get my folder using: var folder = clientContext.Web.GetFolderByServerRelativeUrl(      "/_catalogs/masterpage/SomeFolder") Unfortunately, instead … Read more
0
0

Missing or Invalid property value for $(MsDeployServiceUrl) Building SharePoint Apps

0
0
I was using an automated build to package up a SharePoint App when I received the following error: Missing or Invalid property value for $(MsDeployServiceUrl) I used grepWin to search through our project files looking for any references to this value and found none, leading me to initially believe that it was in fact missing.  … Read more
0
0

Key Points to Know When Using SP.SOD.executeFunc and SP.SOD.executeOrDelayUntilScriptLoaded

3
7
So there I was trying to get SharePoint’s script on demand (SOD) working correctly and I thought I had it all figured out.  I ran across a post called SharePoint Scripts on Demand which covers the topic very thoroughly, but there is some behavior between executeOrDelayUntilScriptLoaded and executeFunc that I don’t think is really clearly … Read more
3
7

Managing ClientContext.ExecuteQuery Errors in SharePoint CSOM

0
6
One of the underlying realities of working with SharePoint’s client side object model (CSOM) is that you are not continuously connected to SharePoint. This means that as you build commands and queries in CSOM that they are stored up and then executed in batch when you call the ClientContext.ExecuteQuery method. Another unfortunate reality of working … Read more
0
6

Incorrect Client ID in SharePoint App Package

0
0
Interesting issue today.  I was attempting to install a SharePoint app today and ran into the following error: 8fff7a1f-f0ea-4d73-8c7d-aa97279b6d20 Stack trace:   at Microsoft.SharePoint.SPUser.get_UserToken()    at Microsoft.SharePoint.Lifecycle.SPAppLifecycleEventCalloutTask.CallRemoteEventReceiver(Uri url, SPAppInstance instance)    at Microsoft.SharePoint.Lifecycle.SPAppLifecycleEventCalloutTask.CallRemoteEventReceiver(SPAppInstance instance)    at Microsoft.SharePoint.Lifecycle.SPAppLifecycleEventCalloutTask.Deploy()    at Microsoft.SharePoint.Administration.SPAppTask.DeployOperation()    at Microsoft.SharePoint.Lifecycle.MonitoredTaskExecution.DoTask()    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)    … Read more
0
0

Fixing “An update error has occurred” When Modifying Alternate Access Mappings in SharePoint

0
0
A while back, I made  change to my SharePoint configuration to modify my alternate access mappings.  For some unknown reason, the mappings keep reverting back to their original state and when I go to modify them again, I get the following error: An update conflict has occurred, and you must re-try this action. The object … Read more
0
0