Hello:
I'm trying to upload a file in a Document Library using the List.asmx Web Services of SharePoint and the AddAttachment method, who requires of 4 parameters. The problem that I'm having is that when I pass the parameters I obtain an "Microsoft.SharePoint.SoapServer.SoapServerException" type error, "The value is not in the expected interval" ("Value does not fall within the expected range", sorry for the translation). I suppose that the point is "List Item ID" parameter, but Im not shure.
try
{
// AddAttachment(string listName, string listItemID, string fileName, byte[] attachment)
string AddAttach = listService.AddAttachment("Document shared", "3", FileUp.FileName, FileUp.FileBytes);
Response.Write(AddAttach );
{
catch (System.Web.Services.Protocols.SoapException ex)
{
Response.Write(ex.Message);
}
It is makes me crazy, I have tryed with all te possibles values, but it doesn't work!
If somebody could help me with your expirience and knowledge I really apretiate it.