Situation:
One WebApplication, two site collections. Both site collections have the same "type" and data structure. Both collections use a document library with the same structure.
Problem/Question:
I have to implement the ability to copy one document from collection A to collection B. When I try the following...
SPFile destfile = destPageList.RootFolder.Files.Add(sourcePage.File.ServerRelativeUrl, sourcePage.File.OpenBinary());
...I get an cxception that there exists no file with the given URL in this Web. The URL is correct, so I'm wondering why this is happen? Do you have any hints or other ways to solve this issue?
Other Infos:
I'm using VisualStudio 2010, .NET 3.5, Sharepoint2010 Server.
Edit:
I need to achieve this programmatically! A content deployment is (for some reasons) no usable solution.