Solved

CInternetSession & OpenURL w/cookies

Posted on 1999-01-26
2
609 Views
Last Modified: 2009-12-16
I'm using CStdioFile, CInternetSession, & OpenURL to bring down web pages.  I've come across a web page that sets a cookie as a user session.

When I access it in VC++6.0 I get a "session timed out" page returned, "please turn on cookies".  If I turn off cookies on my IE4, my program prompts me to save, but regardless of if I do or not I can't get my webpage to load up.

Any help?
0
Comment
Question by:peshoff
2 Comments
 
LVL 1

Accepted Solution

by:
arbitrary earned 100 total points
ID: 1185211
As i can see it you should increase the server time out as the following :
m_pSession = new CInternetSession;
int nTimeOut= 30000;  
m_pSession->SetOption(INTERNET_OPTION_CONNECT_TIMEOUT,nTimeOut);
and adding the following option is useful as well.
m_pSession->SetOption(INTERNET_OPTION_CONNECT_BACKOFF,1000);
the wininet suppose to handle the cookies by default but you can
add your own handling by using Get / SetCookie in CInternetSession .

it looks like a time out problem only

0
 

Author Comment

by:peshoff
ID: 1185212
Thanks.  I will try out the timeout variable.  I may not be going to the page that sets the cookie initially, which I think may be the problem if the timeout doesn't work.

I thought that the wininet was supposed to take care of that by itself.  Thanks for your help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to address a class using javah; or, what are fully-qualified java class names? 13 86
Getting IP address 8 89
Find Visual Studio Tools 2 111
boost::uuid crashes 17 11
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question