【问题标题】:Sharepoint 2010 - Document Upload via Web Service (Exception)Sharepoint 2010 - 通过 Web 服务上传文档(例外)
【发布时间】:2010-12-02 01:47:33
【问题描述】:

我正在使用“复制”网络服务尝试将文档上传到 SP2010 网站。但是,当我执行“CopyIntoItems”方法时,我会收到一个 WebException(详情如下)。我正在遵循这篇文章中建议的一般方法: Simplest way to Upload a document to sharepoint using web services

有什么建议吗?

System.Net.WebException was unhandled
  Message="The request failed with the error message:\r\n--\r\n<html><head><title>Object moved</title></head><body>\r\n<h2>Object moved to <a href=\"%2f_login%2fdefault.aspx%3fReturnUrl%3d%252fsites%252fnn%252f_vti_bin%252fcopy.asmx\">here</a>.</h2>\r\n</body></html>\r\n\r\n--."
  Source="System.Web.Services"
  StackTrace:
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

【问题讨论】:

    标签: sharepoint sharepoint-2010


    【解决方案1】:

    您可能引用了错误的 asmx URL,请在此处查看 http://www.landofsharepoint.com/2009/08/error-when-trying-to-reference-custom.html

    另外,站点的身份验证是什么? NTLM 还是 FBA?

    【讨论】:

    • 我使用的 URL 在浏览器中正确打开。该站点正在针对 Active Directory 使用 FBA。
    • FBA 有问题。如果您看到错误,它会将您重定向到登录页面。您需要将 Web 服务访问到接受 NTLM 凭据的站点。您可以将您的网站扩展到另一个接受 NTLM 的区域。
    • 啊哈。是的,与我 2007 年工作时相比,这确实有点响亮。我会试一试并相应地更新这篇文章。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-21
    • 2013-07-17
    相关资源
    最近更新 更多