Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
1.9k views
in FAQ: edtFTPnet/PRO by (162k points)
reopened by
How to fix AccessViolationException when using FTPS?

1 Answer

0 votes
by (20.4k points)
reshown by
Some people have been reporting the following exception when using FTPS on Windows 8 or 2012:

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

If this is happening from within Visual Studio, it seems that it is a bug with the Visual Studio hosting process.

Go to the project Debug settings, and uncheck "Enable the Visual Studio hosting process".
by (51.6k points)
There's a bug causing this, which we weren't aware of until now. The bug is in the method SSLFTPCertificate.ShowCertificateManager(), which is called in the example. Because of this, you're not going to be able to run these examples in the example viewer. Instead, I suggest that you make your own Visual Studio project and copy the code in the C# Code tab into it. It should work as-is, except for the PrintLine() and PrintLines() methods, which you can replaced with calls to Console.WriteLine(). You'll also need to add the following Using statement:

using EnterpriseDT.Net.Ftp;
...