更新时间:2022-10-16 23:30:14
您的代码中,我不知道可能是什么问题.
When we are trying to add an attachment to SharePoint list item we are getting following error message:
"Error processing response stream. Server failed with following message:\r\nAn error occurred while processing this request."
We are using WCF Data Services in MVC to add item into SharePoint List item, after adding the item, we are adding the attachment, and it saving the attachment but with getting the error.
var file1 = attach.FileAppCPR;
AttachmentsItem item1 = AttachmentsItem.CreateAttachmentsItem("Promotions", promotion.Id, file1.FileName);
msdc.AddObject("Attachments", item1);
msdc.SetSaveStream(item1, file1.InputStream, true, file1.ContentType, item1.EntitySet + "|" + item1.ItemId + "|" + item1.Name);
msdc.SaveChanges();
Please help me determine the solution of this error.
your code is part that I can not figure out what the issue could be.