why only works for Localhost?

  • Thread starter Thread starter larry
  • Start date Start date
L

larry

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top