代码之家  ›  专栏  ›  技术社区  ›  Chris Ballance

SharePoint-多文档上载-不允许HTTP“Post”谓词

  •  1
  • Chris Ballance  · 技术社区  · 15 年前

    当尝试上载任何数量的文档(包括非常小的文件)时,似乎成功了-但随后重定向到一个错误页,指示以下内容:

    /_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
    

    不允许使用用于访问路径“/u vti_bin/shtml.dll/sitecollectiondocuments/forms/upload.aspx”的HTTP谓词日志。

    有什么关于为什么这个操作会拒绝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
    
    2 回复  |  直到 15 年前
        1
  •  1
  •   Alex Angas Colin    15 年前

    支持的将文档上载到SharePoint的方法有:

    你能用这些方法中的一种吗?如果没有,请编辑您的问题,并提供更多有关原因的信息和一些示例代码?

    对HTTP Post方法为什么不能工作的猜测可能是因为它仅供内部SharePoint使用。

        2
  •  1
  •   Chris Ballance    15 年前

    解决方案原来是在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 这解决了这个问题,没有副作用。