web services - UpdateListItems throws "Cannot access a closed Stream." -


i have been trying find out issue faced documents while uploading in libraries using list.asmx service in web application.
steps follow:

  1. uploads document using copy service.
  2. update uploaded document properties.

i facing issue documents while updating properties. don't know whether document size or document type causing problem. if document size or type, might wrong have uploaded similar document same type , larger size no exception.
following code using update document's properties.

        xmldocument doc = new xmldocument();         xmlelement batch = doc.createelement("batch");         batch.setattribute("onerror", "continue");         batch.setattribute("listversion", "1");         batch.setattribute("viewname", viewname);         batch.innerxml = "<method id='1' cmd='update'>" +                          "<field name='id'>" + id + "</field>" +                          "<field name='" + columnname + "'>" + colvalue + "</field></method>";         xelement xelement = utility.toxelement(batch);          //listssoapclient object         var proxy = utility.getserverlistproxy();         proxy.updatelistitems(listname, xelement); 

exception is

soapserverexception

fault exception details:

cannot access closed stream.

thanks in advance.

later figure out that, document trying upload has weird characters other special characters in file properties attributes.

so after removing characters, working fine.


Comments