Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to implement Client Application Service in WPF with Windows Authentication?

$
0
0

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



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>