1

I'm looking at writing my first WPF application. Before I begin, I was wondering if it is possible to manipulate an existing browser cookie.

I need to check if a specific cookie exists (I have the cookie name). If it does exist, I want to modify it's value.

I would appreciate any input.

Matt F
  • 231
  • 2
  • 10
  • 2
    WPF is a desktop technology, and has nothing to do with browsers, or cookies. Are you mistaken in some way? (Question is akin to asking, "I want to buy a car. Before I begin, how should I best groom my cat?" – Kieren Johnstone Nov 17 '12 at 22:34
  • so...no? WPF doesn't have any type of browser control? – Matt F Nov 17 '12 at 22:53
  • Sure WPF does have a browser control, but the WPF controller does not manage the Cookies. You will most likely need to do some reverse engineering to achieve this. Take a look at this one http://stackoverflow.com/questions/1975576/managing-cookies-in-a-wpf-webbrowser-control – eandersson Nov 17 '12 at 23:05
  • Feel free to check: http://stackoverflow.com/questions/1975576/managing-cookies-in-a-wpf-webbrowser-control – Krzysztof Cieslak Nov 17 '12 at 23:07

1 Answers1

1

To Set a Cookie:

Uri u = new Uri(@"C:\Paths");

Application.SetCookie(u, file.FileName);

To Get the Value stored in the Cookie: Uri u = new Uri(@"C:\Paths"); string value = Application.GetCookie(u);