Document movement in SharePoint 2003

  • Thread starter Todd Jasper via .NET 247
  • Start date
T

Todd Jasper via .NET 247

I am running into problems in SharePoint Portal 2003 when my webpart goes to move documents from a document library on onesub-site to a document library on a different sub-site. Bothsub-sites are on the same level, which is one level down off themain portal site. Also, my web part has full trust privelegesto run. The security exception that I receive says:

The security validation for this page is invalid. Click Back inyour Web browser, refresh the page, and try your operationagain. ---> System.Runtime.InteropServices.COMException(0x8102006D):

Here is my code:

Dim File As SPFile = m_Web.GetFile("/sites/FirstSite/DocumentLibrary/Folder/ExcelSpreadsheet.xls")
Dim Site As New SPSite("https://portal")
Dim Web As SPWeb = Site.OpenWeb("/sites/SecondSite")
Dim FilesCollection As SPFileCollection
FilesCollection = Web.GetFolder("/sites/SecondSite/DocumentLibrary/Folder").Files

' SECURITY EXCEPTION OCCURS HERE ON THE ADD
FilesCollection.Add(File.Url, File.OpenBinary)

Any thoughts or ideas would be much appreciated, thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top