开发者

Forms-based authentication - do I need RIA services or can I use a WCF service?

I am starting a project that is primarily a website-driven application via ASP.NET MVC 3, but includes a Silverlight component.

The typical workflow will be as follows:

  1. A user visits the website and signs on.
  2. The user does various things on the website.
  3. The user launches the Silverlight app (in browser).

The Silverlight app needs to know the identity of the authenticated user in order to:

  • Display information pertinent to that user, and
  • Allow/deny certain functionality based on the authenticated user

I know that when Silverlight makes a service call back to the website the forms authentication cookie is passed along. I created a simple WCF service with a GetUserDetails method that looks up and returns the user information for the currently logged on user - their username, the last logon date, their display name, their birthdate, and other information that makes up a user in my application. I have this information displayed in my Si开发者_运维问答lverlight app.

Where I'm getting bogged down is how to maintain that user context throughout all of my Silverlight views without having to continually recall the service.

All of the articles I've found online have said to use RIA services to handle authentication, but I'm interested (at least for learning) to build up this authentication service and handling in Silverlight from the ground up, if possible.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜