I have a desktop app
I authenticate using the wcf authentication service login method, by calling the desktop application.
开发者_开发百科Everything seems to work.
I then open internet explorer and try and browse to a protected page.
I get bounced to the login.
Why? How can I authenticate using the WCF Service?
Internet Explorer and your desktop app are not the same application, so the forms authentication cookie can't be read/encrypted/decrypted by both at the same time. A method you might try is to embed a web-browser control in your desktop app (even make it invisible if you like) and perform a post login through an HttpWebRequest object (formulating post headers etc). This would instantiate a web browser and generate an auth cookie at the same time your desktop app logs in. I can't vouch for the security of it though.
精彩评论