Yanshof
Yanshof

Reputation: 9926

How to manage customer 'log-in' in Silverlight ?

I wrote a web application in Silverlight and in some places the user need to log-in.

When the user logs-in I check the username + password (if it exists in the database) and simply give the permission to the user account.

Questions:

  1. Is there some class / framework that I can use to make this 'log-in' more easy to develop?

  2. How can I enable the 'Stay signed in' option in the log-in?

Upvotes: 0

Views: 162

Answers (2)

Emond
Emond

Reputation: 50682

When combining WCF and Silverlight you'll need to protect the services from unauthorized calls. Following this post should get you up and running

Upvotes: 1

Derek Beattie
Derek Beattie

Reputation: 9478

Here is a walkthrough of using Authentication Service with Silverlight Business Application. It's a good place to start.

It's fairly flexible and easy to work with. The example in the Business Application inherits from AuthenticaitonBase<> you can override Login, Logout, GetUser, and UpdateUser.

How can I enable the 'Stay signed in' option in the log-in?

If you're using FormsAuthentication, in your Login method:

FormsAuthentication.SetAuthCookie(userName, true);

Upvotes: 3

Related Questions