The Lanham Factor

Balancing the Technology-Business Equation

  Home  |   Contact  |   Syndication    |   Login
  124 Posts | 2 Stories | 112 Comments | 106 Trackbacks

News

Article Categories

Archives

Post Categories

Image Galleries

BLOGS

Companies

My Articles

Wednesday, September 17, 2008 #

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