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.
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.