locked
Forms Authentication and OSX RRS feed

  • General discussion

  • I have a problem with Forms Authentication and OSX. I'm using the AuthenticationService that comes with RIA Services. Once a user is logged in, each use of the WebClient class should send the right credentials along. In my case I calling a custom HttpHandler and cehck the credentials like this:

    public class NexusFeed : IHttpHandler
        {
    
            public void ProcessRequest(HttpContext context)
            {
                var member = Membership.GetUser(false);
                if (member != null)
                {
                    var roles = Roles.GetRolesForUser(member.UserName);
                    if (member != null && roles.Contains("XXXXXXX"))
                    {
                                .. do my stuff here
                    }
                    else
                    {
                        context.Response.StatusCode = 403;
                        context.Response.Write("Access denied for user " + member.UserName);
                    }
                }
                else
                {
                    context.Response.StatusCode = 403;
                    context.Response.Write("Unknown user or password.");
                }
            }

     

    THis works just fine on Windows but when I try my app on OSX it doesn't. So my guess is that the WebClient on OSX doesn't send the cookies along. Any idea for a workaround?

    Friday, June 8, 2012 4:04 PM