views:

518

answers:

1

Hey all!

There are a number of questiosn on StackOverflow that ALMOST hit this topic head on, but they are either for other technologies, reference obsolets information or don;t supply an answer that I can suss out. So pardon the almost duplication :)

I have a working ADO.NET Data Service, and a WPF client that hits it. Now that they are working fine I want to add authentication / security to the system. My understanding of the steps so far is...

  1. Turn on forms authentication and configure it on the server (I have an existing asp.net membership service DB for other aspects of this app, so that isnt a problem) so that it is required for the service URL
  2. In WCF apply for and recieve a forms authentication "ticket" as part of a login routine
  3. Add that "ticket" to the headers of the ADO.NET service calls in WPF
  4. Profit!

All well and good - but does anyone have a line on a soup to nuts code sample, using the modern releases of these technologies?

Thanks!

+1  A: 

Hi SoulHuntre, I have an example of doing this from Silverlight on my blog. Check it out here : Forms Authentication and ADO.NET Data Services You should be able to adapt this to a WPF application with minor code changes.

Phani Raj