Hi, I did a client program to send data to the server. there is a C++ CGI
program on the server to get the data.
It works perfectly on my local computer when each time I test it with my IIS
(server name "localhost"). But it doesn't work when I tried two different
computers(one server, another is client). neither my company website.
The connection looks ok, but just cannot send the data.
Do I need any special settings on the server side?
thanks a lot.
larry
here is the major client side code:
code:-----------------------------------------------------------------------
-------
sprintf((char *)pBuffer,"/cgi_bin/CGIRec.exe?upload
%s",p->m_sRemoteFileName);
p->m_pFile =
p->m_pConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST,(char
*)pBuffer);
p->m_pFile->SendRequestEx(file.GetLength());
do
{
dwBytesRead=file.Read( pBuffer, sizeof(pBuffer));
p->m_pFile->Write(pBuffer, dwBytesRead);
}
while (dwBytesRead == sizeof(pBuffer)) ;
p->m_pFile->EndRequest();
DWORD dwFlags;
p->m_pFile->QueryInfoStatusCode(dwFlags);
if(dwFlags>=300) AfxThrowUserException( ); // program out here
'from what I understand'...
IIS is set up to listen to only 'localhost' indeed, that is 127.0.0.1.
you need to change that clicking on properties and make the listener work
for 'any' IP not only on loopbackj
> Hi, I did a client program to send data to the server. there is a C++ CGI
> program on the server to get the data.
[quoted text clipped - 10 lines]
>
> here is the major client side code:
code:-----------------------------------------------------------------------
> -------
> sprintf((char *)pBuffer,"/cgi_bin/CGIRec.exe?upload
[quoted text clipped - 16 lines]
> p->m_pFile->QueryInfoStatusCode(dwFlags);
> if(dwFlags>=300) AfxThrowUserException( ); // program out here
larry - 11 May 2004 06:20 GMT
would you please provide some detail info?
thanks
> 'from what I understand'...
>
[quoted text clipped - 18 lines]
> >
> > here is the major client side code:
code:-----------------------------------------------------------------------
> > -------
> > sprintf((char *)pBuffer,"/cgi_bin/CGIRec.exe?upload
[quoted text clipped - 16 lines]
> > p->m_pFile->QueryInfoStatusCode(dwFlags);
> > if(dwFlags>=300) AfxThrowUserException( ); // program out here