Like the
CardSpace Login control
the Sign In Control lets your users log in with an Identity Card that has been
associated with their Asp.Net Membership Account. The CardSpace SignIn Control
supercedes that functionality with built-in handling for various situations:
New account
New users can instantly register for a new account by simply presenting their information
card and clicking a confirmation link.
This is
the fastest sign-up process you'll find on the web.
Try it.
Existing account but unknown card
Your existing members can instantly associate their Information Card(s) with their
existing Asp.Net membership account. When they present their card, they'll receive
a confirmation Email that lets them conveniently and safely associate their card
with their account.
Your Complete Sign-In solution in
a single control!
Just drop this control onto your Login Page and you'll have support for the traditional
UserName/Password approach and the new Information Card technologies as supported
by Windows CardSpace.

The CardSpace Sign-in control
The control provides four views to handle the various scenarios:
- Sign-in View - Shown above,
prompts the user to log in with a card or UserName/Password
- Unknown Card View - Prompts
the user to either create a new account or try another card
-
Wrong Card View - Prompts the
user to associate the card with an existing account or try another card
- ValidateCard View - Allows
the user to enter a validation code which has been sent to the user by Email
Thanks to the built-in workflow, you don't have to program a thing! All the logic
for validating the card, prompting the user, updating the database and sending confirmation
emails is done by the control.

The WrongCard and ValidateCard Views
Rich design-time experience
If you've used the Asp.Net CreateUserWizard or Login Controls, you'll be instantly familiar with the CardSpace Sign-in 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 of each view.
Events
In addition to base control events, the CardSpace Sign-in Control raises numerous
events as it works through the process of receiving the card, checking account status,
verifying the confirmation code. Here are just a few:
-
ClaimsPresented - Occurs when the user presents an Information Card on the Sign-in
view. Provides a claims object
- AccountCreating - Occurs just before a new Asp.Net Membership account is created.
Provides information about the new user plus a chance to cancel
- AccountCreated - Occurs just after the new membership account is created.
- AssociatingCard - Occurs just before a card is associated with the membership account.
Provides a chance to cancel.
- SendingValidationMail - Occurs just before the validation email is sent. Provides
the mail message as well as a chance to cancel.
- SendingWelcomeMail - Occurs just before the welcome email is sent. Provides the
mail message as well as a chance to cancel.
- SendingAssociatedCardMail - Occurs just before the email is sent to notify the user
that a card has just been associated with his/her membership account. Provides the
mail message as well as a chance to cancel.
- LoggingIn - Occurs just before a user is logged in but just after validation of
the user account. Provides membership user information as well as a chance to cancel.
- LoggedIn - Occurs just after a user has logged in.
Database
In addition to calling methods in the underlying Asp.Net Membership Provider, the
CardSpace SignIn Control uses following stored procedures:
- aspnetEx_InformationCards_FindCardsByUserID
- aspnetEx_InformationCards_CreateCardForUserID
As
mentioned in the
CardSpace Control Database Elements topic,
the required database table and stored procedures are created automatically if possible.
About the CardSpace Button
The CardSpace SignIn 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 Sign-in Control to work on your web site, please visit our
Support Forum.
The complete API for the CardSpace Controls is available
here.