Limitation of Upload and Download files

Advertisement

dh
Joined:
Posts:
8

Limitation of Upload and Download files

I am using the .NET library to create a Windows Application (VS2013).
I am trying to upload/download SFTP to/from a NonStop Tandem Guardian server, but it stops at 184217600 bytes.
Is there a way to by-pass this limitation?
My files can reach upto 600 MB.



TransferOptions opt = new TransferOptions();
opt.OverwriteMode = OverwriteMode.Overwrite;
opt.TransferMode = TransferMode.Binary;
opt.PreserveTimestamp = false;
FilePermissions perm = new FilePermissions();
opt.FilePermissions = perm;
perm.GroupWrite = true;
perm.GroupRead = true;
perm.GroupExecute = true;
perm.UserExecute = true;
perm.UserRead = true;
perm.UserWrite = true;
perm.OtherExecute = true;
perm.OtherRead = true;
perm.OtherWrite = true;


DateTime start = DateTime.Now;
TransferOperationResult res = session.PutFiles(@"C:\SQLXXX2", "SQLXXX2", false, opt);
DateTime end = DateTime.Now;
res.Check();
if (res.IsSuccess)
{
Console.WriteLine("SUCCESS - TIME: {0}", end.Subtract(start3));
}
else
{
SessionRemoteExceptionCollection erCol = res.Failures;
foreach (SessionException er in erCol)
Console.WriteLine(er.Message);
}

Reply with quote

Advertisement

dh
Joined:
Posts:
8

Re: Limitation of Upload and Download files

It throws an exception

Copying files to remote side failed.
General failure (server should provide error description).
Error code: 4
Error message from server: Failure

Common reasons for the Error code 4 are:
- Renaming a file to a name of already existing file.
- Creating a directory that already exists.
- Moving a remote file to a different filesystem (HDD).
- Uploading a file to a full filesystem (HDD).
- Exceeding a user disk quota.


dh wrote:

I am using the .NET library to create a Windows Application (VS2013).
I am trying to upload/download SFTP to/from a NonStop Tandem Guardian server, but it stops at 184217600 bytes.
Is there a way to by-pass this limitation?
My files can reach upto 600 MB.



TransferOptions opt = new TransferOptions();
opt.OverwriteMode = OverwriteMode.Overwrite;
opt.TransferMode = TransferMode.Binary;
opt.PreserveTimestamp = false;
FilePermissions perm = new FilePermissions();
opt.FilePermissions = perm;
perm.GroupWrite = true;
perm.GroupRead = true;
perm.GroupExecute = true;
perm.UserExecute = true;
perm.UserRead = true;
perm.UserWrite = true;
perm.OtherExecute = true;
perm.OtherRead = true;
perm.OtherWrite = true;


DateTime start = DateTime.Now;
TransferOperationResult res = session.PutFiles(@"C:\SQLXXX2", "SQLXXX2", false, opt);
DateTime end = DateTime.Now;
res.Check();
if (res.IsSuccess)
{
Console.WriteLine("SUCCESS - TIME: {0}", end.Subtract(start3));
}
else
{
SessionRemoteExceptionCollection erCol = res.Failures;
foreach (SessionException er in erCol)
Console.WriteLine(er.Message);
}

Reply with quote

dh
Joined:
Posts:
8

Re: Limitation of Upload and Download files

Found it. I needed to turn off the Resume Support State in the Transfer options.


TransferResumeSupport sup = new TransferResumeSupport();
sup.State = TransferResumeSupportState.Off;
opt.ResumeSupport = sup;




dh wrote:

I am using the .NET library to create a Windows Application (VS2013).
I am trying to upload/download SFTP to/from a NonStop Tandem Guardian server, but it stops at 184217600 bytes.
Is there a way to by-pass this limitation?
My files can reach upto 600 MB.



TransferOptions opt = new TransferOptions();
opt.OverwriteMode = OverwriteMode.Overwrite;
opt.TransferMode = TransferMode.Binary;
opt.PreserveTimestamp = false;
FilePermissions perm = new FilePermissions();
opt.FilePermissions = perm;
perm.GroupWrite = true;
perm.GroupRead = true;
perm.GroupExecute = true;
perm.UserExecute = true;
perm.UserRead = true;
perm.UserWrite = true;
perm.OtherExecute = true;
perm.OtherRead = true;
perm.OtherWrite = true;


DateTime start = DateTime.Now;
TransferOperationResult res = session.PutFiles(@"C:\SQLXXX2", "SQLXXX2", false, opt);
DateTime end = DateTime.Now;
res.Check();
if (res.IsSuccess)
{
Console.WriteLine("SUCCESS - TIME: {0}", end.Subtract(start3));
}
else
{
SessionRemoteExceptionCollection erCol = res.Failures;
foreach (SessionException er in erCol)
Console.WriteLine(er.Message);
}

Reply with quote

Advertisement

You can post new topics in this forum