<p>Hi,</p><p> </p><p>I have setup a library to upload documents to the iServer and it is working fine as long as the documents are below 100 MB, larger documents are throwing an Out of Memory Exception. </p><p>I am using the example given here: <a data-ipb='nomediaparse' href='
http://developer.actuate.com/be/documentation/ihub3/help/BIRTDesigner/index.html#page/AIG/DevAppsNET.18.11.html'>http://developer.actuate.com/be/documentation/ihub3/help/BIRTDesigner/index.html#page/AIG/DevAppsNET.18.11.html</a></p><p> </p><p>Here is the stack trace from .net:</p><div> at System.IO.MemoryStream.set_Capacity(Int32 value)</div><div> at System.IO.MemoryStream.EnsureCapacity(Int32 value)</div><div> at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)</div><div> at System.IO.MemoryStream.WriteTo(Stream stream)</div><div> at ServerProxy.UploadExtension.ProcessMessage(SoapMessage message)</div><div> at System.Web.Services.Protocols.SoapMessage.RunExtensions(SoapExtension[] extensions, Boolean throwOnException)</div><div> at System.Web.Services.Protocols.SoapHttpClientProtocol.Serialize(SoapClientMessage message)</div><div> at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)</div><div> at ServerProxy.ActuateAPIEx.uploadFile(UploadFile UploadFile)</div><div> at ServiceLibrary.IDAPICalls.UploadFile(String actuateFilePath, UInt64 scheduleTableCode, String server, String volume, String reportName, String localFile) in C:app-serverIntelliWebIntelliWebServiceLibraryIDAPICalls.cs:line 548</div><div> </div><div>I have attached the section of my code throwing the error. The only workaround I can think of is to construct my own soap message any help is appreciated.</div><div> </div><div><pre class="_prettyXprint"> public static UploadFileResponse UploadFile( string actuateFilePath, ulong scheduleTableCode, string server, string volume = "Actuatedev", string reportName = "", string localFile = "") { ActuateAPI proxy = Login("user", "pass", server, volume, scheduleTableCode); if (proxy != null) { ActuateAPIEx proxyEx = new ActuateAPIEx(); proxyEx.HeaderValue = new Header(); proxyEx.HeaderValue.AuthId = proxy.HeaderValue.AuthId; proxyEx.Url = proxy.Url; try { ActuateAPIEx.UploadStream = new FileStream(localFile, FileMode.Open); } catch (Exception e) { ProcessError pe = new ProcessError(e, e.Message, 0, "IntelliServ - IdapiCalls.UploadFile"); return null; } NewFile fileToUpload = new NewFile(); fileToUpload.Name = actuateFilePath; fileToUpload.ReplaceExistingSpecified = true; fileToUpload.ReplaceExisting = true; Attachment att = new Attachment(); att.ContentId = "Attachment"; att.ContentType = "binary"; List<string> copyFromLatest = new List<string>(); copyFromLatest.Add("Permissions"); copyFromLatest.Add("Description"); copyFromLatest.Add("ArchiveRules"); UploadFile uf = new UploadFile(); uf.Content = att; uf.NewFile = fileToUpload; uf.CopyFromLatestVersion = copyFromLatest.ToArray(); UploadFileResponse ufr = null; try { ufr = proxyEx.uploadFile(uf); } catch (Exception e) { ProcessError pe = new ProcessError(e, e.Message, 0, "IntelliServ - IDAPICalls.UploadFile"); } finally { if (uf != null) uf = null; if (att != null) att = null; if (fileToUpload != null) fileToUpload = null; ActuateAPIEx.UploadStream.Close(); } return ufr; } return null; }</pre></div><div>Thanks,</div><div> </div><div>John</div>