I configured a lightswitch application with an aspnet membership database. I use it to add users and roles. Now, I want my WPF to use Client Application Services with Windows Authentication set up to an specific applicationName (Same used in LightSwitch)
After configuring my project in the project properties (Services) to use Client Application Service, I added to the app.config Membership Provider the applicationName.
Then in my code, I tried the following:
if(Membership.ValidateUser(null,null)){if(Thread.CurrentPrincipal.IsInRole("TestRole")){MessageBox.Show("User is in TestRole Role");}}
When the IsInRole method is executed, I get the following exception: Invalid object name 'UserProperties'
Any idea or sample in how to verify user roles using windows authentication in WPF and aspnet membership database?
Thanks