I have written a Silverlight 2 application communicating with a WCF service (BasicHttpBinding). The site hosting the Silverlight content is protected using a ASP.NET Membership Provider. I can access the current user using HttpContext.Current.User.Identity.Name from my WCF service, and I have turned on AspNetCompatibilityRequirementsMode.
I now want to write a Windows application using the exact same web service. To handle authentication I have enabled the Authentication service, and can call "login" to authenticate my user... Okey, all good... But how the heck do I get that authentication cookie set on my other service client?!
Both services are hosted on the same domain
- MyDataService.svc <- the one dealing with my data
- AuthenticationService.svc <- the one the windows app has to call to authenticate.
I don't want to create a new service for the windows client, or use another binding...
The Client Application Services is another alternative, but all the examples is limited to show how to get the user, roles and his profile... But once we're authenticated using the Client Application Services there should be a way to get that authentication cookie attached to my service clients when calling back to the same server.
According to input from colleagues the solution is adding a wsHttpBinding end-point, but I'm hoping I can get around that...