0

I am uploading files to SharePoint using the API Copy.CopyIntoItems. The upload works when the destination url is given as "http://sharepointserver/sitename". However, when the url is given with the domain name, like "http://sharepointserver.domain/sitename", then the CopyIntoItems API call fails, and the error returned is "Object reference not set to an instance of an object".

Any idea on why there is a strange behavior when the url changes?

skeletank
  • 2,880
  • 5
  • 43
  • 75
MithunRaj
  • 103
  • 4
  • 12

2 Answers2

0

You can not use the url with the domain name, like "http://sharepointserver.domain/sitename" for Copying item

Sigar Dave
  • 2,598
  • 1
  • 20
  • 42
0

The following answer on SO links to a thread on MSDN, which explains in detail why this behaviour occurs: https://stackoverflow.com/a/2692212/274354

Link to the MSDN thread:

CopyIntoItems errors when using destination URI with FQDN

Community
  • 1
  • 1
mydoghasworms
  • 18,233
  • 11
  • 61
  • 95