asp.net mvc - Authenticate users in MVC5 using a method called from WCF -


i have wcf service performs actions on database , has method validateuser. have asp-net mvc 5 app not have access database. want authorize asp.net mvc users using validate() method in wcf service. how can achieved?

you should create actionfilter (iauthorizationfilter) in application. ensure application wide authorization.

to accomplish this, you'll need add service reference wcf service, , authorize user inside actionfilter. consider caching result sessions prevent having authorize on each call (as adversely impact performance).

you can find overview of actionfilters here


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -