ActiveX web browser control is not deleting session cookies even after it's closed
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: ActiveX web browser control is not deleting session cookies even after it's closed

  1. #1
    Join Date
    Apr 2013
    Posts
    4

    ActiveX web browser control is not deleting session cookies even after it's closed

    HI ,

    I have an C++ application which uses Microsoft Web browser ActiveX control to launch any URL within the application.

    The browser is embedded in C++ form and It's working fine with all the feature Microsoft has exposed through Interface(IID_IWebBrowser2).But while any url that is using session cookie has been launched, even after closing the browser the session cookies are not getting deleted. For example if user login info is stored as session cookies,the url is using the cookies and getting launched without asking for user log in info.

    But if I close the browser, and again relaunch , the cookies should be deleted and the url will not find the cookies to be used for log in . That is not happening here. Although this is session cookies , it's not getting deleted and being used by embedded browser. However, if the url is launched in IE, it is behaving as expected.



    So, Do I need to delete the cookies explicitly? If Yes, How to do that?

    Please needs input here.



    Thanks in advance.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,197

    Re: ActiveX web browser control is not deleting session cookies even after it's close

    Are you calling IWebBrowser2::Quit ?

    If so, to clear the process's cookies, call

    Code:
    InternetSetOption(NULL, INTERNET_OPTION_END_BROWSER_SESSION, NULL, 0);

  3. #3
    Join Date
    Apr 2013
    Posts
    4

    Re: ActiveX web browser control is not deleting session cookies even after it's close

    Hi,

    I haven't used Quit method instead tried to use the same function from my browser destructure which is getting called while I close the browser. But it didn't work.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center