Crash while downloading files via /v2/nodes/[NodeID]/content
Hello! 🐒
I'm trying to download all the files that a search query on content server returns.
Basically for every file that's returned, I'm calling the API to get the content and save it.
However, in a test-case where I want to download 90 files, it always crashed at file #65 with the error message:
{"An error occurred while sending the request."} {"The server committed a protocol violation. Section=ResponseStatusLine"}
*workaround implemented* (<httpWebRequest useUnsafeHeaderParsing="true" />
)
{"Error while copying content to a stream."} "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
The next 25 files work normally after that. When i download again (skipping all the files that are already there) file #65 downloads normally too.
Is there a setting on Content Server OR IIS that might help me in this situation?
Please give this ticket to someone with coding knowledge (preferably in C#) to look over it together.
Because most of the files work, i think the problem is either CS or its WebServer (IIS).
Thanks in advance! I'm looking forward to talking with you! :)
Code to download 1 files (inside forach-loop):
string completeURLFolder = string.Format("{0}/v2/nodes/{1}/content", configObject.config.baseURL, nodeID); var responseFolderSearch = config.GetInstance().httpClient.GetAsync(completeURLFolder).Result; //CRASHES HERE! if (responseFolderSearch.IsSuccessStatusCode) { //Save downloaded Content Byte[] responseByteArray = responseFolderSearch.Content.ReadAsByteArrayAsync().Result; File.WriteAllBytes(filepath, responseByteArray); //using(Stream input = responseFolderSearch.Content.Respon) pbDownloadStatus.Value = row.Index + 1; downloadedDocs += 1; lblDownloadStatus.Text = String.Format("{0} von {1} Dokumenten verarbeitet", row.Index + 1, dgvResults.Rows.Count); writeLog(String.Format("INFORMATION_{0}:Dokument mit Namen {1} wurde erfolgreich im Pfad {2} angelegt", DateTime.Now.ToString(), filename, filepath)); }
Comments
-
looking at google, this suggests its a queuing issue on the OT side so your request is not processed immediately, do you have capacity ?
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 150 General Questions
- 148 Thrust Services
- 57 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories