I have recently been prototyping an application using WPF and Client Application Services. I am trying to use all three features of the Client Application Services : Forms Authenticiation, Role Security, and Client Profile. I have managed to
get everything working, but I feel like my solution is a kludge and want a better way.
For the discussion assume the following:
I have two WPF windows:
The first window is my main Application form. It has two buttons "Login" and "Check Thread Principal"
The second window is a login form which implements the IClientFormsAuthenticationCredentialsProvider interface to use the GetCredentials method to return a new ClientFormsAuthenticationCredentials object with the entered username and password.
The application starts, the Main Window is loaded and the user clicks the login button. In the button click event, a call is made to System.Web.Security.Membership.ValidateUser(String.Empty, String.Empty). This causes the GetCredentials method
in my login form to be called which in turns shows the login window. The code in the button click event of the main window waits until the user enters information in the login window.
Once the user submits the login information, the login form closes, the flow of execution is returned to the main window login cl
View Complete Post