Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Document movement in SharePoint 2003

Reply
Thread Tools

Document movement in SharePoint 2003

 
 
Todd Jasper via .NET 247
Guest
Posts: n/a
 
      05-04-2004
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(0x8102 006D):

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.

--------------------------------
From: Todd Jasper

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>xWjAbqN9K024dLGvo7ELyw==</Id>
 
Reply With Quote
 
 
 
 
LarsDahl
Guest
Posts: n/a
 
      08-05-2005

Maybe you have to set

Code:
--------------------

FilesCollection.Web.AllowUnsafeUpdates = true

--------------------

Just before the Add ...



--
LarsDahl
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message638953.html

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MCTS Sharepoint Server or Windows Sharepoint Services RajivI MCTS 2 10-06-2007 12:13 PM
Word Document versioning similar to Sharepoint Hanover ASP .Net 0 02-01-2006 03:07 PM
ASP.Net on server with Sharepoint 2003 Robin ASP .Net 3 01-15-2005 07:05 AM
sharepoint wss, cms 2002 and vs 2003 on windows 2003 laks ASP .Net 0 12-18-2004 01:24 AM
debugging asp.net apps on a 2003 server running sharepoint Lee Connell ASP .Net 1 04-28-2004 04:22 AM



Advertisments