|
-
April 30th, 2008, 04:38 AM
#1
problem when using GetFtpConnection from the CInternetSession class
Hello every one, I have a problem when i call GetFtpConnection method from CInternetSession class, I call it as follows:
////////////////////////////////////////////////
CInternetSession netSession;
CFtpConnection *pFtp;
CString SERVER_IP = "158.10.25.6";
int PORT = 5000;
TRY
{
pFtp = netSession.GetFtpConnection(SERVER_IP,"user","pass",PORT);
}
CATCH (CInternetException,ex)
{
char szError[100];
memset(szError,0,100);
ex->GetErrorMessage(szError,100);
AfxMessageBox(szError);
}
END_CATCH
////////////////////////////////////////////////
some times it successfully connected to the FTP server, but at some times it throw an exception told me that "Computer is disconnected from the network" , i don't know why however both the FTP server is on and connected to the network and also the client which contains this code is also on and connected to the network, so from where this error.
Can you help me please, any help will be greatly appreciated.
thank you
-
May 5th, 2008, 07:21 AM
#2
Re: problem when using GetFtpConnection from the CInternetSession class
I read that the Internet Explorer setting "work offline" can give this error.
* Does it work one second and the next it fails?
* Can you see any "pattern" or is it completely random?
Nobody cares how it works as long as it works
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|