在SharePoint Online中使用Designer报错,错误为:This Feature has been disabled by your administrator.找了好久发现原因,分享给大家。 1、在SharePoint Online的列表中,点击编辑列表,如下图: 2、弹出确认对话......
2021-06-25 122 使用Designer报错
最近,需要在SharePoint上传文件到文档库,但是,上传的过程报错了。
错误代码
{
"error": {
"code": "-2130575251, Microsoft.SharePoint.SPException",
"message": {
"lang": "en-US",
"value": "The security validation for this page is invalid and might be corrupted. Please use your web browser's Back button to try your operation again."
}
}
}
操作就是调用SharePoint Plus 添加文档
https://aymkdn.github.io/SharepointPlus/files.html#createFile
有兴趣的可以看一下这个插件,本来以为是插件的问题,后来发现并不是。
发现插件在执行这个方法的时候,其实是Call REST Service。
然后,调用了REST API上传,也是报一样的错误。
后来发现,是Request Digest token需要刷新一下:
复制代码
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/contextinfo",
method: "POST",
headers: { "Accept": "application/json; odata=verbose"},
success: function (data) {
$('#__REQUESTDIGEST').val(data.d.GetContextWebInformation.FormDigestValue)
},
error: function (data, errorCode, errorMessage) {
alert(errorMessage)
}
});
复制代码
执行完上面的代码以后,就可以正常上传文件了。完事儿以后,有想了想为什么,可能是因为根网站集调用同web application下其他网站集吧。
标签: SharePoint REST 上传 文件 请求 403 错误 最近 需
相关文章
在SharePoint Online中使用Designer报错,错误为:This Feature has been disabled by your administrator.找了好久发现原因,分享给大家。 1、在SharePoint Online的列表中,点击编辑列表,如下图: 2、弹出确认对话......
2021-06-25 122 使用Designer报错
最近,在SharePoint 应用程序页中写JavaScript API,进行一些数据交互。其实,很简单的事情却遇到了问题,记录一下,希望能对遇到类似问题的人以帮助。 引用JavaScript 首先,SharePoint 应用程序页......
2021-06-25 400 SharePoint,JavaScript,API,application,pages,最近,在,
本文介绍如何在Office 365中创建资产库库,以及资产库的一些基本设置。 通过登录地址登录到Office 365的SharePoint Online站点中,我们可以在右上角的设置菜单中,选择添加应用程序; 或者,进入......
2021-06-25 289 SharePoint创建资产库
错误截图 错误日志 位置:C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS 主要错误 The current user is not an SharePoint Server farm administrator. 处理过程 查看了当前User确实不是场管理员,但......
2021-06-25 825 SharePoint,Error,The,current,user,not,Server,farm,错误,
客户提出的很有趣的一个关于Windows SharePoint Services的问题。要求我快速解答并且不能增加任何的代码量。下面是我巧妙的(个人认为)解决方案。 在我们使用由WSS构建的网站时,往往会遇到这......
2021-06-25 232 SharePoint,隐藏,自定义,列表,中的,某些,栏,客户,