This topic describes the parameters and default values created when you add the IDLoginStatus control to enable Windows Live™ ID authentication on a Web page.
<live:IDLoginStatus
The parameters shown in the syntax section and IDLoginStatus1.
ApplicationContext
Optional. A string containing state information. For example, if your home page is and the user is on the page, you can pass contactus.aspx as context, and when the user is redirected back to, you can redirect them to.
ApplicationIDConfigKey
Required. A string specifying the name of the <appSettings> key that contains the value of the Application ID for the application. This parameter is available throughout the smart tag (the arrow in the upper right corner of the control in Design view). Set this to wll_appid.
ApplicationSecretConfigKey
Required. A string specifying the name of the <appSettings> key that contains the value of the secret key. This parameter is available through out the smart tag (the arrow in the upper right corner of the control in Design view). Set this to wll_secret.
AutomaticallyConvertAuthentication
Optional. Whether to automatically log in a user who has logged in with a Windows Live ID and who has previously associated that ID with an ASP.NET profile on the Web page. See the IDLoginView Control for more information.
The IDLoginStatus control enables you to use a Windows Live ID to authenticate users.
When users browse to your site, they are presented with a link to log in. When they click the link, they are taken to the Windows Live ID login page where they can log in with their Windows Live ID. Once Windows Live has authenticated them, they are redirected to the page you set up when you registered your application.
The IDLoginStatus control contains a number of read-only properties that you can access.
Action
A string containing the action that the user is doing. The possible values are:
Login means the user is signed into the site.
Logout means the user is signed out from Windows Live. You should clear any of the user's cookies and display the default, signed out page.
Clearcookie means the Windows Live ID Sign Out page is calling your site to clear user cookies.
ApplicationUserID
A string containing the unique identifier for the signed-in user.
TimeStamp
A 32-bit integer that represents the time in seconds that the user last authenticated, as measured from January 1, 1970 GMT.
LoggedInLiveID
A Boolean value containing information about whether the user has signed into Windows Live.
True means the user is signed in with a Windows Live ID.
False means the user is not signed in with a Windows Live ID.
The IDLoginStatus control can raise both server and client events. Server events occur before client events and are handled in server-side code that you write for the Web page. Client events are handled in client script, typically ECMAScript (JavaScript), and are raised after server events. The server-side events are triggered even if client-side events are not present.
OnClientSignIn
Client
Raised when the user signs in.
OnClientSignOut
Raised when the user signs out.
OnServerSignIn
Server
OnServerSignOut
A client event that is raised when the user signs in.
function OnClientSignInHandler(sender, args)
sender
The DOM element raising the event.
args
The event arguments object. This object has the methods get_cancel and set_cancel.
get_cancel
set_cancel
Use the set_cancel method to cancel the execution of the associated server event.
A client event that is raised when the user signs out.
function OnClientSignoutHandler(sender, args)
A server event that is raised when the user signs in.
using Microsoft.Live.ServerControls;
…
protected void OnServerSignInHandler(object sender, AuthEventArgs e)
The IDLoginStatus object.
e
The AuthEventArgs object. It has the following members, which help identify the user who signed in:
A server event that is raised when the user signs out.
using Microsoft.Live.ServerControls;
…
protected void OnServerSignOutHandler(object sender, AuthEventArgs e)
The AuthEventArgs object. The AuthEventArgs class is derived from the EventArgs class and has the following members, which are accessible during server-side event handling to help identify the user who signed out: