534 Request denied for policy reasons

+1 vote

Hi,

We are getting '534 Request denied for policy reasons' when trying to download a file:

11:35:00 C: LIST
11:35:00 S: 150 Here comes the directory listing.
11:35:00 Data connection established.
11:35:00 S: 226 Directory send OK.
11:35:00 S:
-rw-------    1 1003     1003          620 May 17 09:31 NURG_XXXXXX.xml
-rw-------    1 1003     1003          620 May 17 09:31 URGP_XXXXXX.xml
-rw-------    1 1003     1003          620 May 17 09:31 URGP_XXXXXX.xml

11:35:01 C: TYPE I
11:35:01 S: 200 Switching to Binary mode.
11:35:01 C: SIZE NURG_XXXXXX.xml
11:35:01 S: 534 Request denied for policy reasons.
asked May 17, 2018 by Ace

1 Answer

0 votes
 
Best answer

This error comes from your FTP server when requesting size of the file.

Can you try using this code before downloading the file:

using(Ftp ftp = new Ftp())
{
    ftp.ConnectSSL("ftp.server.com");
    ftp.Login("user", "password");

    ftp.Configuration.DontGetFileSizeBeforeDownload = true;

    ftp.Download("report.txt", @"c:\report.txt");

    ftp.Close();
}
answered May 17, 2018 by Limilabs support (237,290 points)
...