Discussion:
session cookie
(too old to reply)
john
2004-05-04 19:06:04 UTC
Permalink
Hi

I am using InternetOpen, InternetConnect, InternetOpenRequest etc to connect to a web service. The WS places a cookie on my machine. After I am done with the webservice how can I get the cookie to delete without shuttong down our app? If I leave the app running and someone else tries to log into the app they can't because the WS sees that a different name from that in the cookie is being used. If I close the app and restart all is well as the cookie has gone. Is there some flag I am missing or API call thaty can be used to 'recycle' the session, so it acts as if the app has been closed down

thank

-john
Stephen Sulzer
2004-05-04 23:25:46 UTC
Permalink
When the user logs out, be sure to close all your WinInet handles including
the handle created by InternetOpen. Then call:

InternetSetOption(NULL, INTERNET_OPTION_END_BROWSER_SESSION, NULL, 0);

The END_BROWSER_SESSION option will cause WinInet to discard various cached
global data, including all session cookies.

Stephen
Post by john
Hi,
I am using InternetOpen, InternetConnect, InternetOpenRequest etc to
connect to a web service. The WS places a cookie on my machine. After I am
done with the webservice how can I get the cookie to delete without shuttong
down our app? If I leave the app running and someone else tries to log into
the app they can't because the WS sees that a different name from that in
the cookie is being used. If I close the app and restart all is well as the
cookie has gone. Is there some flag I am missing or API call thaty can be
used to 'recycle' the session, so it acts as if the app has been closed
down?
Post by john
thanks
-john
john
2004-05-05 01:21:03 UTC
Permalink
Thank you Stephen. I very much appreciate your help

Loading...