Windows Live Id and Browser Mail
Hello!
Im developing an application and would like to have the same capability as Messenger where you can click on a button and it logs you into hotmail automatically via your browser. Is this possible to do using the Windows live id SDK?
Thanks
[255 byte] By [
janeman] at [2008-3-6]
I'm wondering if anyone got the OpenAuthenticatedBrowser(...) method working?
I've got a small chunk of code that creates the identity and authenticates:
IdentityManager identityMgr = IdentityManager.CreateInstance( AppID, AppName );
_identity = identityMgr.CreateIdentity();
_identity.Authenticate();
This goes through all right (if I call _identity.IsAuthenticated(), it returns true). However, when I call:
_identity.OpenAuthenticatedBrowser( "http://mail.live.com", "lbi" );
, it doesn't function correctly. Instead of being signed into the site, I'm sent to https://login.live.com/ppsecure/sha1auth.srf?lc=1033 which claims that I entered an incorrect password. Of course, if I repeat the password that I just typed into the authentication box a moment ago into the new browser window, I'm logged in correctly.
Does anyone have this working? Is there something I'm doing incorrectly or missing? Is there a specific AppID/AppName I should be using? I know that with the Windows Live Search AppIDs, you have to have one created, but I don't see anything similiar for Windows Live ID. What about the second argument passed to the OpenAuthenticateBrowser method? Is there a specific policy I should be using?
Any help is appreciated.
Hi Craig,
If you reference the SDK documentation, you'll see that OpenAuthenticatedBrowser calls for 3 parameters. You will need to include a boolean (set it to true) as your third parameter in your call above.
Also, you have an incorrect value for your policy (second parameter). I'll teach you how to discover the policy for different Windows Live sites. If you go to mail.live.com, you are redirected to the Windows Live ID login page. Here's the url I get for the Windows Live ID login page after web mail redirects me: http://login.live.com/login.srf?wa=wsignin1.0&rpsnv=10&ct=1178737380&rver=4.0.1532.0&wp=MBI&wreply=http:%2F%2Fmail.live.com%2Fdefault.aspx&id=64855
To get the policy for a specific site, look at the wp= in the query string. In this case, wp=MBI. Therefore, your call to open the authenticated browsers should be:
_identity.OpenAuthenticatedBrowser("http://mail.live.com", "MBI", true);
Good Luck!!
Sarah, Program Manager -- Windows Live ID