I am seeking feedback on how to download any file from ECM (Enterprise Content Management) of OpenText.
Using the following code I can download any file from the web except the ECM site.
using (var client = new WebClient())
{
client.DownloadFileAsync(new Uri(URLLocation, UriKind.Absolute), "file102.pdf");
}
When using URL of an ECM page then the file gets downloaded but only 2 KB even if the original file size is, for example, > 1 MB, and this 2 KB file is not readable.
I have checked the response header from the ECM URL, giving it below, hoping it will help finding a solution to this problem:
Header Name:X-Frame-Options, Header value :SAMEORIGIN
Header Name:Content-Language, Header value :en
Header Name:Content-Length, Header value :1162
Header Name:Content-Type, Header value :text/html;charset=UTF-8
Header Name:Date, Header value :Thu, 26 Sep 2019 19:46:44 GMT
Header Name:P3P, Header value :CP="NON IND UNI COM NAV INT"
And here is the response header from a pdf file (non ecm) that is downloaded without having any problem:
Header Name:X-SERVER, Header value :bx1,bx01.infobox.ru
Header Name:Age, Header value :10777
Header Name:Connection, Header value :keep-alive
Header Name:Accept-Ranges, Header value :bytes
Header Name:Content-Length, Header value :20597
Header Name:Content-Type, Header value :application/pdf
Header Name:Date, Header value :Thu, 26 Sep 2019 16:48:13 GMT
Header Name:ETag, Header value :"5075-500fc43c07c00"
Header Name:Last-Modified, Header value :Tue, 19 Aug 2014 14:25:52 GMT
Header Name:Server, Header value :nginx/1.12.0
Header Name:Via, Header value :1.1 companyNamecpfp.companyName.com
Thank you.