title: WCF RIA Services Form Authentication ServiceContext.User.Identity.Name Empty
body: <p>We are using WCF Ria Services with silverlight 5 project.For authentication we are using Custom membership provider.WCF Ria Service in RIA Services class library.
  Client side authentication running.We access current user name with WebContext.Current.User.Name.But server side ServiceContext.User empty.If we use [RequireAuthentication] attr. in DomainServices return always Access Denied.
  How Can we push WebContext.Current.user to ServiceContext.user.I read several document and tutorial but every test fail. </p>
  
  <p>Code examples :</p>
  
  <p>CustomMembershipProvider.cs:</p>
  
  <pre><code>   public class CustomMembershipProvider : MembershipProvider    {
      public override bool ValidateUser(string username, string password)
      {
          using (var context = new TimEntities())
          {
              var user = context.User.FirstOrDefault(u =&gt; u.Username == username &amp;&amp;
                                                           u.Password == password);
              return user != null;
          }
      }
  </code></pre>
  
  <p>}</p>
  
  <p>AuthenticationDomainService:</p>
  
  <pre><code>      [EnableClientAccess]
        public class AuthenticationDomainService : AuthenticationBase&lt;AuthUser&gt;
        {}
        public class AuthUser : UserBase
        {}
  </code></pre>
  
  <p>App.Xaml.Cs:           </p>
  
  <pre><code>  var webContext = new WebContext();
    var formsAuth = new FormsAuthentication();
    var authContext = new AuthenticationDomainContext();
    formsAuth.DomainContext = authContext;
    webContext.Authentication = formsAuth;
    ApplicationLifetimeObjects.Add(webContext);
  </code></pre>