how can i use asp.net membership in ServiceStack ? (ServiceStack.OrmLite , ServiceStack.Host.AspNet , etc )
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- How to store image outside of the website's ro
- 'System.Threading.ThreadAbortException' in
- Request.PathInfo issues and XSS attacks
- How to dynamically load partial view Via jquery aj
相关文章
- asp.net HiddenField控件扩展问题
- asp.net HiddenField控件扩展问题
- Asp.Net网站无法写入错误日志,测试站点可以,正是站点不行
- asp.net mvc 重定向到vue hash字符串丢失
- FormsAuthenticationTicket expires too soon
- how do I log requests and responses for debugging
- “Dynamic operations can only be performed in homog
- What is the best way to create a lock from a web a
If you want to use membership, and want to use the ORM lite with the membership framework (although you could still use the SqlMembershipProvider), you can create a custom provider class like so:
And implement all the methods (or at least the methods you need) using the ORM components.
You can host ServiceStack on a custom path, i.e. at /api which lets you run ASP.NET web forms and ServiceStack side-by-side and then use the normal ASP.NET membership provider in ASP.NET.
You can then share UserSessions with ServiceStack using its Session Provider, here's an example on how to instantiate a Session with MVC - you can use this same class with ASP.NET.
The alternative is to forgo the ASP.NET membership provider and just stick to the built-in authentication in ServiceStack. It includes support for Credentials (i.e. user/pass - what you want) but also Twitter / Facebook / BasicAuth + your own. With In-Memory, OrmLite and Redis backends.
Here's an example website of using all authentication options in the same ServiceStack app with an OrmLite backend.