views:

26

answers:

1

I have a WPF C# client app with an embedded webbrowser control. I have all of the proper hooks in place so that if the site I'm browsing to requires authentication, I handle the IAuthenticate and pass in the required credentials (the user has already logged in to the client app itself). That works great, except...

If user "Bob" visits the site through IE and enters his username and password, then someone uses the client app and logs in as "Steve", "Bob"s session is still authenticated and the site never asks for new credentials, so the client connects as "Bob".

What I really want to do is every time the embedded browser connects to this site, I want to send the credentials and force the browser and site to use those credentials.

Any ideas?

Note that this is more of an issue during testing when I need to impersonate different users.

+1  A: 

Use Kerr Credentials

Dmitry Karpezo
OK, that is what I needed, thanks! The confusing thing is that NOTHING you can do from the IE browser or through the webcontrol will affect the Windows 7 Vault that stores your Windows Credentials. If you have ever said, "Remember this" on a Windows account login in Window 7, it will be stored in the vault and the only way to clear it is through Control Panel/User Management/Windows Vault or the library referenced in Dmitry's answer.
CMPalmer