Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2004

Tip: Looking for answers? Try searching our database.

why only works for Localhost?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
larry - 09 May 2004 22:12 GMT
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
andrea catto' - 10 May 2004 17:21 GMT
'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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.