Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

sharepoint "security validation invalid"

  Asked By: Brenda    Date: Jan 01    Category: Sharepoint    Views: 1372

I wrote some code with the SDK and tried to test the SDK programming
example "Uploading a file to sp from a local folder".
When I try to upload a file to a sharepoint site (using the SDK
code), I receive following error:
"The security validation for this object is invalid". I checked
security settings and I am logged in a administrator, so this should
not be the problem. I also registered the FormDigest correctly,
because the problem only arises when I try to upload to sites
(e.g. "http://localhost/sites/uploadsite/shared documents/file.txt").
If I upload to a portal area
(e.g. "http://localhost/uploadarea/doclibrary/file.txt") is works
perfectly fine.

Did enybody experience the same problem? Would appreciate some help
here!

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Karan Hosagrahara     Answered On: Jan 01

I have run this sample and uploaded to both SPS document libraries
and WSS document libraries.

You need to make sure that you have the webform running in the right
context.

To upload  to a SPS document library you should be using
http://server/_layouts/uploadfile/webform1.aspx

To upload to a WSS document library you need to run the webform
under the site, example is
http://server/sites/sitename/_layouts/uploadfile/webform1.aspx

 
Answer #2    Answered By: Elise Weber     Answered On: Jan 01

The context was the solution.............

 
Didn't find what you were looking for? Find more on sharepoint "security validation invalid" Or get search suggestion and latest updates.