My toolbar (as referenced in my other posts) has a "Login" link on it, that dynamically changes to "Logout" if my user is currently logged into the website the toolbar is tied to. This code works fine in 9x, 2k and XP:
string currentUser = System.Environment.GetEnvironmentVariable("USERPROFILE");
string[] cookieFiles = System.IO.Directory.GetFiles(currentUser + \\Cookies, "*" + myHost + "*");
However, in my Vista Ultimate beta this code explodes saying, "Access is denied." On further investigation, there are no cookies in this folder.
A different post suggested they were in User\AppData\Roaming\Microsoft\Windows\Cookies, but I can't seem to find them there either.
Is there a "correct" way to programmatically read the cookies in Vista using .NET Furthermore, is there a better way to do it in pre-Vista operating systems than the way I have listed above