Asp.Net components and Internet solutions
Quality Data

The CardSpace Login Control for Asp.Net


Drop the CardSpace Login Control onto your login page to provide your membership users with a convenient and secure means of logging into your web site. While the CardSpace Sign-in Control provides all this functionality and more, the CardSpace Login Control can be used in situations where you prefer to limit log-ins to existing members only.



The CardSpace Login Control

 

Rich design-time experience

If you've used the Asp.Net Login Control, you'll be instantly familiar with the CardSpace Login Control. It provides the same Auto-Format options (Elegant, Professional, Simple, Classic, etc.) and is fully templated. This means that you have complete control over the layout and style.

 

 

Intuitive run-time behavior

Just like the Asp.Net Login Control, the CardSpace Login Control redirects to the "ReturnUrl" upon successful login. You can also set familiar properties such as the DestinationPageUrl/Text, HelpPageUrl/Text, and CreateUserUrl/Text.  As illustrated above, the CardSpace Login Control introduces a couple of new prompts:

What is this? - User-definable prompt that displays a user-definable message describing information cards

What are information cards?


Don't have your card? - Url and Link Text to direct the user to a page where an alternate card can be associated with the membership account.

 

 

Events

In addition to base control events, the CardSpace Login Control raises the following events as it works through the process of receiving a card, authenticating the user and logging in.

  • ClaimsPresented - Provides a claims object
  • ClaimsPresentedError - Provides the claims object plus the exception
  • Authenticating - Provides the claims object plus a chance to cancel
  • Authenticated - Provides the claims object plus the membership user object
  • LoggingIn - Provides claims, membership user and a chance to cancel
  • LoggedIn - Provides the membership user object
  • LoginError - Provides claims object plus the exception

 

Database

The CardSpace Login Control uses the stored procedure, aspnetEx_InformationCards_GetUserIDForCard to search the aspnetEx_InformationCards table for the card/user. If a record is not found, you may direct the user to a standard membership login page then use the "CardSpace Manage" Control to associate cards with the account. As mentioned in the CardSpace Control Database Elements topic, the table and stored procedures are created automatically if possible.



About the CardSpace Button

The CardSpace Login Control includes the CardSpace Button as one of its constituent controls. Since the button is itself an input control that contains HTML markup (an embedded table, the image and the prompt text), Asp.Net will display the warning "A potentially dangerous Request.Form value was detected from the client".  This is the default behavior to prevent potential script/sql injection attacks. Assuming you've taken basic defensive measures, you can safely disable this behavior by setting "ValidateRequest = false" in the page declaration (first line in source view) of your web page.



Setting ValidateRequest = "False"



Support

If you need help getting the CardSpace Login Control to work on your web site, please visit our Support Forum. The complete API for the CardSpace Controls is available here.