I have been looking for the answer to my question for some time, but I can not find what I was looking for, so I hope someone can help me :)
Scenario:
3 Projects:
- Asp.net Web Api Project (SQL Server CE 4 Database + Asp.Net Membership)
- Windows Phone 7.5 application (authenticates SQL Server CE database with REST)
- Asp.net MVC 4 project (which wants to contact the same SQL Server CE database, also using REST)
Authentication of WP7 applications is already working. But I'm having trouble trying to figure out how to allow my MVC application to authenticate with the same SQL Server CE database.
I can probably create my own controls and use the same authentication logic that I used in the WP7 application, but I want to keep the existing functionality that the [Authorize] attribute offers.
So my question is:
how can I let my MVC project authenticate through the Web Api project and still support functions that when a user tries to access a page that needs authentication, it will be redirected to the login page and such
Hope my question is clear enough! If not, feel free to ask additional questions!
Yours faithfully,
Gert
source share