The value for a decimal is too big or too low C#

Advertisement

Guest

The value for a decimal is too big or too low C#

Hello,
im using winscp now for a while, great library.
Suddenly, i now get an error everytime i try to sycronize my data. I posted the log as an attachment.

SessionOptions sessionOptions = new SessionOptions();
 
string host;
string username;
string pass;
string ssh;
Protocol prot;
if (getConfig("server") == "0")
{
    sessionOptions.Protocol = Protocol.Sftp;
    sessionOptions.HostName = "185.230.160.62";
    sessionOptions.UserName = "syncron";
    sessionOptions.Password = "secret";
    sessionOptions.SshHostKeyFingerprint = "ssh-rsa 2048 1BhqosNZwy6vhEGlckOG44+6UiLqr5ezaBih/m3d5/0=";
 
}
else
{
        sessionOptions.Protocol = Protocol.Ftp;
        sessionOptions.HostName = "91.132.147.185";
        sessionOptions.UserName = "syncron";
        sessionOptions.Password = "secret";
        sessionOptions.FtpMode = FtpMode.Passive;
}
 
using (Session session = new Session())
{
    session.DebugLogPath = @"C:\Users\alexa\source\repos\OutbackLifeNew\OutbackLifeNew\bin\Release\log.txt";
 
    session.FileTransferProgress += SessionFileTransferProgress;
    session.FileTransferred += FileTransferred;
 
    session.Open(sessionOptions);
    SynchronizationResult synchronizationResult;
 
    localPath = Directory.GetCurrentDirectory() + @"\mod";
 
    remotePath = "/syncron/mod";
    if (!Directory.Exists(localPath))
    {
 
        Directory.CreateDirectory(localPath);
    };
 
 
    ComparisonDifferenceCollection CompareDirectories;
 
    CompareDirectories =
    session.CompareDirectories(
        SynchronizationMode.Local, localPath, remotePath, true, false, SynchronizationCriteria.Either);
 
    synchronizationResult =
        session.SynchronizeDirectories(
            SynchronizationMode.Local, localPath,
            remotePath, true, false, SynchronizationCriteria.Either);
    synchronizationResult.Check();
}

i dont know what i should do now. it worked everytime and suddenly it doesn't. I tried really everything but nothing worked. can someone help me?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
33,846
Location:
Prague, Czechia

Re: The value for a decimal is too big or too low C#

Please attach a full session log file (not debug log file).

Reply with quote

Advertisement

You can post new topics in this forum