Sharepoint - 多个文档上传 - HTTP“post” 动词不允许
当尝试上传任意数量的文档(包括非常小的文件)时,似乎成功了,但随后重定向到错误页面,指示以下内容:
/_layouts/error.aspx?ErrorText=The%20HTTP%20verb%20POST%20used%20to%20access%20path%20%27%2F%5Fvti%5Fbin%2Fshtml%2Edll%2FSiteCollectionDocuments%2FForms%2FUpload%2Easpx%27%20is%20not%20allowed%2E
用于访问路径“/_vti_bin/shtml.dll/SiteCollectionDocuments/”的 HTTP 动词 POST不允许“Forms/Upload.aspx”。
关于为什么此操作会拒绝 HTTP POST 的任何想法?
更新:
直接导航到 /_vti_bin/shtml.dll/SiteCollectionDocuments/Forms/Upload.aspx 会出现:
无法显示 XML 页面 无法使用样式表查看 XML 输入。 请更正错误,然后单击“刷新”按钮,或稍后重试。
在文本内容中发现无效字符。 处理资源 'http://sitename/ 时出错... MZ
事件日志中的错误如下所示:
Critical error has occured but the exception object has already been cleared
Current Url: /_vti_bin/shtml.dll/SiteCollectionDocuments/Forms/Upload.aspx
User Login: xxxxxxx
User is Authenticated: True
Performance Counters
% Processor Time Total: 0
Processor Queue Length: 1
ASP.NET Request Queued Total: 1
.NET CLR Exceptions, # of Exceps Thrown: 55
PATH_INFO: /_vti_bin/shtml.dll/SiteCollectionDocuments/Forms/Upload.aspx
PATH_TRANSLATED: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\isapi\shtml.dll
When attempting to upload any number of documents, including very small files, seems to succeed- but subsequently redirects to an error page indicating the following:
/_layouts/error.aspx?ErrorText=The%20HTTP%20verb%20POST%20used%20to%20access%20path%20%27%2F%5Fvti%5Fbin%2Fshtml%2Edll%2FSiteCollectionDocuments%2FForms%2FUpload%2Easpx%27%20is%20not%20allowed%2E
The HTTP verb POST used to access path '/_vti_bin/shtml.dll/SiteCollectionDocuments/Forms/Upload.aspx' is not allowed.
Any ideas as to why HTTP POST would be denied for this operation?
Update:
Navigating directly to /_vti_bin/shtml.dll/SiteCollectionDocuments/Forms/Upload.aspx gives:
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
An invalid character was found in text content. Error processing resource 'http://sitename/...
MZ
Error in event log looks like this:
Critical error has occured but the exception object has already been cleared
Current Url: /_vti_bin/shtml.dll/SiteCollectionDocuments/Forms/Upload.aspx
User Login: xxxxxxx
User is Authenticated: True
Performance Counters
% Processor Time Total: 0
Processor Queue Length: 1
ASP.NET Request Queued Total: 1
.NET CLR Exceptions, # of Exceps Thrown: 55
PATH_INFO: /_vti_bin/shtml.dll/SiteCollectionDocuments/Forms/Upload.aspx
PATH_TRANSLATED: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\isapi\shtml.dll
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
解决方案是删除 IIS 中的通配符应用程序映射。
通过 HTTP POST 接收文档上传的 URL
/_vti_bin/shtml.dll/SiteCollectionDocuments/Forms/Upload.aspx
被错误地映射到C:\WINDOWS\Microsoft.NET\Framework\ v2.0.50727\aspnet_isapi.dll
因此失败。更新:
此解决方案往往会破坏其他功能,例如文档删除,并在测试期间被废弃。
事实证明,有一个 HTTP 模块导致该 url 处理不正确。 我添加了
/_vti_bin/shtml.dll/SiteCollectionDocuments/Forms/Upload.aspx
的旁路,这解决了问题,没有副作用。The solution turned out to be removing the wildcard application mapping in IIS.
The url which receives the document upload via HTTP POST
/_vti_bin/shtml.dll/SiteCollectionDocuments/Forms/Upload.aspx
was being incorrectly mapped toC:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
and thus failing.Update:
This solution tended to break other functionality, such as document deletion, and was scrapped during testing.
As it turns out, there was an HTTP module that was causing this url to be processed incorrectly. I added a bypass for
/_vti_bin/shtml.dll/SiteCollectionDocuments/Forms/Upload.aspx
and this solved the issue with no side effects.支持的将文档上传到 SharePoint 的方法有:
使用 Web 服务 (此处有详细示例)
使用 RPC (示例)
使用对象模型 (示例)
您可以使用其中一种方法吗? 如果没有,您能否编辑您的问题并提供有关原因的更多信息和一些示例代码?
猜测 HTTP POST 方法不起作用的原因可能是因为它仅供内部 SharePoint 使用。
The supported methods of uploading documents to SharePoint are:
Using web services (extensive example here)
Using RPC (example here)
Using the object model (example here)
Are you able to use one of these methods? If not can you please edit your question with more information about why and some sample code?
A guess at why the HTTP POST method isn't working is probably because it's for internal SharePoint use only.