I’m trowing some lines together to upload a log file to a FTP server but i get
#### Exception System.IndexOutOfRangeException - 0xa9000000 (9) ####
#### Message:
#### System.Net.FtpWebRequest::UploadThread [IP: 000d] ####
A first chance exception of type 'System.IndexOutOfRangeException' occurred in System.Ftp.dll
An unhandled exception of type 'System.IndexOutOfRangeException' occurred in System.Ftp.dll
The program '[2] Micro Framework application: Managed' has exited with code 0 (0x0).
on Stream requestStream = request.GetRequestStream();
The FTP Server is very buggy. I wouldn’t be surprised if FTP client is as well. :think:
1st I would change UsePassive to true (just to try if that works.
If that does not help, and you need FTP, I would get the sources and fix it (I did for the Server, it’s on codeshare). https://www.ghielectronics.com/community/codeshare/entry/836
Alternatively you could use my CIFS client (also on codeshare) if a network share is an alternative for you. https://www.ghielectronics.com/community/codeshare/entry/817
It should work quite well, but currently it supports plain text authentication only.
The FTPClient is working but indeed not really stable.
If i run my sample on a fixed network connection al seems to work fine but if i connect to a 3G Wlan i get a bunch socket errors.
I download the porting kit and had a look at the code but there is allot unfinished code…
I also had a look to the codeshare entry’s (these are 4.1) and i think extending the functionality in there is probably the shortest route…
I do not see what the Problem should be with sockets in 4.2.
There is a Limit on parallel open sockets, but that’s partially in the GHI FW and was increased in later Versions.
I make really heavy use of Sockets with TCP connections on a G120 wit FW V4.2.11.1. No problem so far. May be a small memory leak, but I’m not sure if it comes from sockets or anything else.