locked
Trouble clearing authentication cookies from WebBrowser control RRS feed

  • Question

  • Hello,  We currently have an application that uses the webbrowser to authenticate and retrieve our athentication tokens.  We want to be able to "logout" of the application, but when we call something that is like the following code, the system doesnt seem to be clearing out the authentication cookies.

      Dispatcher.BeginInvoke(async () => 
                {
                    await this.WebView.ClearCookiesAsync();
                    await this.WebView.ClearInternetCacheAsync();
    
                    this.WebView.Navigate(new Uri(url, UriKind.Absolute));
                });

    Does anyone have any idea how i can make sure the WebBrowser removes the cookies, and cached data?

    Thank you,
    Dylan

    Tuesday, April 2, 2013 2:59 PM

Answers

  • Hi,

    There isn't a way to clear out the cookies. 

    I suspect that for your scenario, you will need to delete the WebBrowser instance and create a new instance.

    -Mark


    Mark Chamberlain Sr. Escalation Engineer | Microsoft Developer Support | Windows Phone 8

    Tuesday, April 2, 2013 9:10 PM

All replies

  • Hi,

    There isn't a way to clear out the cookies. 

    I suspect that for your scenario, you will need to delete the WebBrowser instance and create a new instance.

    -Mark


    Mark Chamberlain Sr. Escalation Engineer | Microsoft Developer Support | Windows Phone 8

    Tuesday, April 2, 2013 9:10 PM
  • Hi,

    So in what scenario are those codes used for since they can't be used to clear out cookies.

    Monday, May 27, 2013 5:01 PM