login about faq


0
1

OK, so I'm working on an ASP.NET webapp with AJAX and the Windows Live ID SDK. Again. I've successfully gotten it to authenticate via Live (Again); however...

The Windows Live ID spec indicates that I have to look for request headers "login", "logout", and "clearcookie". The recommended code samples include a Response.Redirect, which doesn't seem to work when your page has extensive use of UpdatePanels:

loginCookie = new HttpCookie(strLoginCookie);
loginCookie.Expires = DateTime.Now.AddYears(-10);
Response.Cookies.Add(loginCookie);
Response.Redirect("default.aspx");
Response.End();

Further, the clearcookie Action requires I write directly to the Response:

public WindowsLiveLogin wll = new WindowsLiveLogin(key1, key2);

loginCookie = new HttpCookie(strLoginCookie);
loginCookie.Expires = DateTime.Now.AddYears(-10);
Response.Cookies.Add(loginCookie);

string type;
byte[] content;
wll.GetClearCookieResponse(out type, out content);
Response.ContentType = type;
Response.OutputStream.Write(content, 0, content.Length);

As a result, the response doesn't recognize it and the Windows Live logout feature times out, whether doing it via my logout button (logout Action) or the Windows Live site's logout feature (clearcookie Action). How can this be accomplished with static UpdatePanels and other AJAX controls in the markup?

I used this in a former AJAX project. I settled for not having logout functionality, which of course can be bypassed by clearing one's cookies. Please tell me a more elegant way!

asked Jun 04 '10 at 01:00

tsilb's gravatar image

tsilb
21.0k65199333


Well you will need to get hardware from microsoft and kinda dublicate the im's ui. but don't copy it completly because then you will be sued for stealing of an idea.

answered Jun 04 '10 at 01:59

Christopher%20Chambers's gravatar image

Christopher Chambers
223293237

Microsoft will sue me for letting people sign into my website via Windows Live? Using an SDK that they specifically released with that purpose?

(Jun 04 '10 at 07:37) tsilb tsilb's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported


Join Us in the Chat Room

Tags:

×16
×14
×11
×8
×4
×3

Asked: Jun 04 '10 at 01:00

Seen: 1,368 times

Last updated: Jun 04 '10 at 07:37