Hi,
"Stanislav Vlasic" <(E-Mail Removed)> wrote in
message news:euqyy3ilxplq.vyfjf22mmesf$.(E-Mail Removed)...
| Hi.
|
| I'm developing application for compact framework (windows mobile 2003) in
| C# and have one problem.
|
| From application, I'm connecting to FTP server and downloading some files.
| The problem is that I can connect to ftp only when internet connection is
| already established on device. If there is no connection to the internet
| (GPRS connection in my case), application raises exception.
Of course, as there is no connection to the remote host
| I managed to find out if there is active internet connection or not with
| InternetCheckConnection function from wininet.dll, but now having trouble
| trying to programmicaly establish default internet connection.
|
| Any suggestions?
Yes, depending of your device and how it's setup you have several options:
1- invoke RAS from your code, it's easy if you have an unmanaged dll that
already encapsulate the RAS methods, otherwise it may be a pain to P/invoke
them.
2- You may try to use WebRequest, IIRC it will try to establish a connection
if none is present. I'm not sure about this as I use the above option.
3- Instruct your user to be sure to be connected before doing the FTP. as
weird as this sound I'm using this option lately (from a iPaq 6315) and they
seems to be happier.
--
Ignacio Machin
machin AT laceupsolutions com