I have implemented a SQL Membership provider for my WCF service. The service gets accessed through the internet by a WPF client. I have a service getUser() which should return the a user.
Is it ok to return a MembershipUser by that method because I have read in another thread that it is not possible to do that because the class has a SecurityAttribute and XmlSerializer cannot serialize it.
Edit:
Also is it safe to return this type to the client. Is there any potential for misuse?
I’m not 100% sure the specific answer on whether that type can be serialized or not … but just give it a try. If you get an error, then simply make a proxy type that includes all the information you need to return. And return that in your WCF method 🙂