Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Put Files not working in Amazon AWS server.

Without an exception callstack, it's difficult to tell what causes the problem.
Where do you have winscp.exe stored? Does the local account have permissions to that file?
ramakrishna

Re: Put Files not working in Amazon AWS server.

martin wrote:



Hi, Thanks for your reply.

I tried with

session.ExecutableProcessUserName = "XXXX";
session.ExecutableProcessPassword="XXXXXX";

Error message changed and now I am getting
"System.ComponentModel.Win32Exception (0x80004005): Access is denied" error.

and I changed IIS impersonation permissions levels also still I am facing the same issue.

Thanks,
Rahul.
ramakrishna

Re: Put Files not working in Amazon AWS server.

martin wrote:

We need log files! Both from GUI and the code.
And note that FTP is not SFTP. You are confusing those two.


Hi Martin, Waiting for your replay.

Thanks,
Ram.
ramakrishna

Re: Put Files not working in Amazon AWS server.

Hi,

Please find the attached code log file and GUI log file.

Thanks,
Rahul.
ramakrishna

Re: Put Files not working in Amazon AWS server.

Hi,

Please find the attached log file of GUI, from code, the log file is not generating (it's saying session timeout).
I am using SFTP not FTP its typing issue.


Thanks,
Rahul.
martin

Re: Put Files not working in Amazon AWS server.

We need log files! Both from GUI and the code.
And note that FTP is not SFTP. You are confusing those two.
ramakrishna

Re: Put Files not working in Amazon AWS server.

Thanks for the response Martin,

In a server when I'm trying to connect FTP box with WINScp client, I'm able to connect and get and put files. But on the same server when I'm trying to put files using WINSCP .net assembly, I'm getting connection timed out the issue.

I thought like it may be the firewall which blocks but in that scenario, I should not connect to FTP box with WINSCP client also.

Could you please let me know what could be the problem?

for your reference.
Below is my code

SessionOptions sessionOptions = new SessionOptions
{
Protocol = WinSCP.Protocol.Sftp,
HostName = "sftp.XXXXXX.com",
PortNumber = 22,
UserName = "XXXXXXXXX",
Password = "XXXXXXXXXX",
SshHostKeyFingerprint = "XXX-XXa 1098 xx:xx:xx:xx:xxx:xxx:xx:xx:xx:",
};

using (Session session = new Session())
{
// Connect
session.Open(sessionOptions);

// Your code
}
session.DebugLogPath = Server.MapPath("Temp/") + "logWinSCP";
session.Open(sessionOptions);

// Upload files
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;

TransferOperationResult transferResult = null;
transferResult = session.PutFiles(Server.MapPath("Temp/" + _fileName), "/users/adminTest/sample/", false, transferOptions);

// Throw on any error
transferResult.Check();

Thanks,
Rahul.
ramakrishna

Put Files not working in Amazon AWS server.

Hi, Team,

Getting session log out and put files not working in Amazon AWS server. But, its working fine in Local.
I am using 5.9.6 version.

Below is my code

SessionOptions sessionOptions = new SessionOptions
{
Protocol = WinSCP.Protocol.Sftp,
HostName = "sftp.XXXXXX.com",
PortNumber = 22,
UserName = "XXXXXXXXX",
Password = "XXXXXXXXXX",
SshHostKeyFingerprint = "XXX-XXa 1098 xx:xx:xx:xx:xxx:xxx:xx:xx:xx:",
};

using (Session session = new Session())
{
// Connect
session.Open(sessionOptions);

// Your code
}
session.DebugLogPath = Server.MapPath("Temp/") + "logWinSCP";
session.Open(sessionOptions);

// Upload files
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;

TransferOperationResult transferResult = null;
transferResult = session.PutFiles(Server.MapPath("Temp/" + _fileName), "/users/adminTest/sample/", false, transferOptions);

// Throw on any error
transferResult.Check();


Thanks,
Ram