From: Prab on
Hi,


When i Execute this portion of Code When httpFile->EndRequest(); is
Executed i get Server Terminated the Connection.

Whats the cause and I need a Fix Cany any one help me out frm this
issue............

CInternetSession session;
CHttpConnection * httpConnection;

CHttpFile * httpFile;
CFile *inFile = NULL;
CString csret;

inFile = new CFile();
inFile->Open("D:\\Date.txt", CFile::modeRead, NULL);
int nCount = inFile->GetLength();
char *cpBuffer = new char[nCount];
nCount = inFile->Read(cpBuffer, nCount);
inFile->Close();

httpConnection = session.GetHttpConnection("172.16.70.89", 0, 80,
NULL, NULL);
httpFile = httpConnection-
>OpenRequest(CHttpConnection::HTTP_VERB_PUT, "MysampleText.txt",
csret);
//httpFile = httpConnection-
>OpenRequest(CHttpConnection::HTTP_VERB_POST, "/MySampleText.txt",
csret);
httpFile->SendRequestEx(nCount);
httpFile->Write(cpBuffer, nCount);

//Sleep(2000);
httpFile->EndRequest();