开发者

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?


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);


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜