I’ve been scouring the internets looking for a simple solution for authentication with WP7.
I am using a simple WCF REST web service based on the template for .net 4.0
Here are the two solutions I ended up with:
Solution 1 – Use the built in authentication service
Add a new WCF service to your project, remove the code behind file and change the svc file to this:
<%@ ServiceHost Language="C#" Debug="true" Service="System.Web.ApplicationServices.AuthenticationService" %>
Add the forms authentication and membership configuration (just like any asp.net website)
Now in the WP7 project, you can add a service reference, again, this part is very standard.
To get this working, you need to use the cookie container on calls to both services.
Instead of detailing this approach, I figured I’ll just link to Kevin Hoffman’s blog post
Read More from: Original Source
Post Contributed by: Kunal Chowdhury
Kunal is the Site Admin and Contributor of Silverlight-Zone. He is a Software Engineer, Microsoft Silverlight MVP, Code Project Mentor and a Code Project MVP. He is also an active Author in SilverlightShow.net and a speaker in various community events. He works on Microsoft Platform and very passionate about Silverlight technology. He started his career in 2007 and achieved various awards during his professional life.
He shares his findings in his personal blog: http://www.kunal-chowdhury.com and he also tweets at: @kunal2383.