Mantzas
Mantzas

Reputation: 2653

ServiceStack as a ServiceLayer for MVC, WPF, WP7-8

after bumping into ServiceStack i would like to explore the option to have ServiceStack as a ServiceLayer for my existing MVC4 Project. The goal is to create a servicelayer for all other platform options like wpf, windows phone...

My main issue is the existing mvc project and the need to continue to use the SimpleMembershipProvider. Is it possible to move all code of the default AccountController to the ServiceStack ServiceLayer and call it from the AccountControler (WebSecurity Class)? Has someone tried something like this or should i dump this code and start a ServiceStack specific Security Class?

Regards,

S. Mantziaris

Upvotes: 2

Views: 251

Answers (1)

V.B.
V.B.

Reputation: 6382

The first part on service layer is in http://nuget.org/packages/ServiceStack.Host.Mvc/ (adding it to your MVC4 project via NuGet almost instantly gives your a working service layer, just run and check yourhost.com/api/metadata).

https://github.com/ServiceStack/SocialBootstrapApi gives you a detailed example how to do authentication and authorization the ServiceStack way.

Check these two answers on how to integrate ASP Membeship and ServiceStack: https://stackoverflow.com/a/8715958/801189 and https://stackoverflow.com/a/15078308/801189

Upvotes: 2

Related Questions