Geeks With Blogs

The Lanham Factor The (ir)rational thoughts of a (not-so)mad man

*** NEVERMIND...I FOUND THE PROBLEM.  ***  I was ignoring one simple line of code. 

I am attempting to programmatically add an attachment to a SharePoint list using the Lists Web services API.  Here is the algorithm I am following:

1) Created list item using CAML.  The item ID is returned.

2) Using the returned item ID from #1, call the "AddAttachment" method to add an attachment.

3) Receive "401: Unauthorized" error.

I tried adding the same attachment to list manually using the same credentials and it works.  What am I missing?  Is it a problem with the file upload?  Is it a problem with the list item not being in edit mode?  Can someone please help?  Thanks in advance!

-B

Posted on Wednesday, September 17, 2008 9:26 AM Windows SharePoint Services, et. al. | Back to top


Comments on this post: Error Adding Attachment Programmatically in SharePoint

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Brian Lanham | Powered by: GeeksWithBlogs.net