Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to FTP files using the MFC "CInternetSession:GetFtpConnection"

Status
Not open for further replies.

musso

Programmer
Nov 6, 2002
1
KR
Using the the code (below), I am able to establish a session and FTP files to a unix server. However, when this program is called from within MQSeries (via a trigger mechanism), I get the error message: "A connection with the server could not be established".

Any ideas ?



CInternetSession sess(_T("MyProgram/1.0"));
CFtpConnection* pConnect = NULL;


try
{

pConnect = sess.GetFtpConnection(hostname,_T("user"),_T("user02"));
BOOL put_success = pConnect->PutFile(file1,file2);

......
}

catch (CInternetException* pEx)
{
TCHAR sz[1024];
pEx->GetErrorMessage(sz, 1024);
printf("ERROR! %s\n", sz);
pEx->Delete();
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top