ftp.Connect() not working on windows server 2012 R2

+1 vote
asked Dec 4, 2014 by Liviu Damaschin (130 points)
edited Dec 5, 2014

Hello,

I have a job that runs fine on local and din on windows server 2008, but after upgrading to windows server 2012 R2 I get an error:

Unhandled Exception: System.MissingMethodException: Method not found: 'System.String Rebex.Net.Ftp.Connect(System.String, Int32, Rebex.Net.TlsParameters, Rebex.Net.FtpSecurity)'. at CopyFileToFTPS.Program.TransferFileViaFTPS(String hostName, Int32 hostPort, String userName, String password, String sourceFile, String destinationFile) at CopyFileToFTPS.Program.Main(String[] args) in d:\Work\CopyFileToFTPS\Program.cs:line 49. Process Exit Code -532459699.

Any Idea?

Thank You.

Applies to: Rebex FTP/SSL
commented Dec 4, 2014 by Tomas Knopp (58,890 points)
edited Dec 4, 2014

Hello, what is the version of Rebex components that you are using? Could you please send the dlls back to support@rebex.net? Rebex also comes with precompiled binaries for different frameworks - what is your target .NET framework?

commented Dec 4, 2014 by Liviu Damaschin (130 points)
edited Dec 4, 2014

I use: Rebex.Net.Ftp.dll - 3.0.3854.0 Rebex.Net.ProxySocket.dll - 2.0.3854.0 Rebex.Net.SecureSocket.dll - 3.0.3854.0 Rebex.Security.dll - 1.5.385.4.4

Target framework is .NET Framework 3.5

Thank You

1 Answer

0 votes
answered Dec 4, 2014 by Tomas Knopp (58,890 points)
edited Dec 5, 2014

Hello,

the Rebex.Net.Ftp.dll you are using was distributed in two variants - SSL and non-SSL. The non-SSL version of the FTP dll really lacked the method you are trying to use.

From the dll names you sent we guess you actually own the SSL version, so you should be able to download the SSL version. Please login into your Rebex account and there you should be able to download the installation package for the SSL variant.

Make sure to change the dlls from the SSL package and the problem should be resolved then. Please let us know whether you were able to make it work this way!

By the way, the version 3854 is pretty old, it comes from year 2010. You can see the bugfixes and new features introduces since then at the release note page. Updating to the latest version cost just 1/3 of the component price and it is definitely recommended. Let us know your license details so that we can send you a renewal link.

commented Dec 4, 2014 by Liviu Damaschin (130 points)
edited Dec 5, 2014

Downloaded the 3.0.4086.0 version and replaced the dll's in the application folder on the server and still got the same error.

On my local PC it's working.

Thank You.

commented Dec 4, 2014 by Tomas Knopp (58,890 points)
edited Dec 4, 2014

The old dll is probably stuck somewhere on the server and the program might be loading the old version still. To make sure that the newer version of Rebex (4086 in your case) is deployed correctly to the server, please follow this tutorial: http://forum.rebex.net/questions/4217/upgrade-to-newer-version-of-rebex-component

commented Dec 4, 2014 by Tomas Knopp (58,890 points)
edited Dec 4, 2014

One more idea, do you have the Rebex assemblies in the GAC on the Windows Server 2012R2? In this case you would need to update the binaries there as the GAC has higher priority than the program folder.

commented Dec 5, 2014 by Liviu Damaschin (130 points)
edited Dec 5, 2014

Thank You all for help.

I seems that on the new server was registered in the GAC the wrong version of the Rebex. Uninstalled from GAC and now it's working.

Thank You.

...