Search code examples
c#asp.net-mvcwcfasp.net-identity-2

Should I use WCF for identity methods?


I'm using ASP.NET MVC 5 with identity 2 and I'm using WCF services.

In my controller, I use the identity methods like

usermanager...FindById(...)

My question now: which is the better solution between these?

  1. use identity methods on server side and call them by WCF services

OR

  1. use identity methods directly in controllers without using WCF services

Thanks


Solution

  • The answer depends on your decision . I think on both side it should be implemented because WCF service can be access from any other application as its endpoint are exposed if someone know the endpoint and there is no security then they can call the function and get the data or delete it . So I think it must be done on both sides . WCF provides very nice way to allow certain users to execute certain method or restrict so you should use on both side .