How do you copy a file into SharePoint using a WebService?

后端 未结 10 1461
执念已碎
执念已碎 2020-12-10 06:45

I am writting a winforms c# 2.0 application that needs to put an XML file into a document library on SharePoint.

I want to use a WebService instead of using the ob

相关标签:
10条回答
  • 2020-12-10 07:20

    if your sharepoint server is built on a farm, Check your "Alternate Access Mapping" see if there is an entry: yourwebserverurl intranet yourwebserverurl if not, add it.

    for my case, after adding this, the Copy service start working.

    It probably due to farm load balance address resolve related.

    0 讨论(0)
  • 2020-12-10 07:21

    I get the same message when I use the default credentials. Try replacing them with this:

    copyWebService.Credentials 
        = new NetworkCredential("Administrator", "pass", "MyDomain");
    
    0 讨论(0)
  • 2020-12-10 07:22

    I'm not sure if it will solve your problem but, when you reference the webservice, don't use the [site] part of the URL.

    Try instead: http://[server]/_vti_bin/[webservice].

    I'm not an expert in SP but I'm pretty sure the webservices belongs to the main server, not to an especific site.

    Hope it helps.

    0 讨论(0)
  • 2020-12-10 07:31

    SharePoint responds to a plain old HTTP PUT

    0 讨论(0)
提交回复
热议问题