Click here to Skip to main content
15,113,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm just trying to do a simple ecommerce application using WCF service and MVC. I worked with asp.net MVC before but I'm completely new to the CF service. The architecture of the application is I'm using MVC as a client and WCF service will connect to my database. I have no problems in implementing simple functions like retrieving products or adding products.

Now I want to implement Login and Register functionality(more like authentication and authorization functionality). I'm having trouble in how to do implement this. Usually I use Asp.net Identity for authentication and authorization in MVC. But from what I've read it is a bad idea to connect database to client application, so I can't directly use asp.net identity.

I've searched in many sites and saw using membership providers to implement this but I'm not sure how to do this. And every solution I've seen just indicates that adding some configuration in web.config file of WCF service but I'm confused about how to wire this configuration in Wcf service with my client application. Can anyone guide me in this? How I can implement authentication in WCF service and how do I call it from my MVC client application?

What I have tried:

I thought of using asp.net identity directly but I realized it's a bad idea to connecting database to mvc client. I have seen people saying using custom membership providers but I'm not sure how to implement that.

I'm sorry if I'm repeating a previous question or I'm following wrong format to submit my question.
Posted
Updated 17-Nov-20 22:59pm
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900