Solved

CInternetSession & OpenURL w/cookies

Posted on 1999-01-26
2
614 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

726 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