Ok - Ive tried a few things:
The demo works fine, both C# and VB versions...
I tried the following:
ftpclient = New FTPClient(New System.Net.IPAddress(19627151))
This gave me the following error:
Message: Invalid PInvoke metadata format.
Trace: at System.Net.OSSOCK.gethostbyname(String host)
at System.Net.Dns.GetHostByName(String hostName)
at System.Net.Dns.Resolve(String hostName)
at EnterpriseDT.Net.Ftp.FTPClient..ctor(String remoteHost, Int32 controlPort, Int32 timeout)
at EnterpriseDT.Net.Ftp.FTPClient..ctor(String remoteHost)
at ImageCompressor.main.SaveFiles(Int32 mode)
Source: System
Then I treid these two, which both gave the same errors:
' Same as I used in the demo
ftpclient = New FTPClient("ftp.spotted-productions.com")
ftpclient = New FTPClient()
The errors they gave:
An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in system.dll
Additional information: Error loading XML file c:\windows\microsoft.net\framework\v1.0.3705\Config\machine.config Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
Then:
Message: The type initializer for "EnterpriseDT.Util.Debug.Logger" threw an exception.
Trace: at EnterpriseDT.Util.Debug.Logger.GetLogger(Type clazz)
at EnterpriseDT.Net.Ftp.FTPClient.InitBlock()
at EnterpriseDT.Net.Ftp.FTPClient..ctor(IPAddress remoteAddr, Int32 controlPort, Int32 timeout)
at EnterpriseDT.Net.Ftp.FTPClient..ctor(IPAddress remoteAddr)
at ImageCompressor.main.SaveFiles(Int32 mode)
Source: edtftpnet-1.1.4
Why would the demo work, and not my code??