0

プロジェクトで使用するカスタム nhibernate メンバーシップ プロバイダーの実用的なソリューションを実装しmvc3ました。これは、Web アプリで必要なすべてをカバーする分離された web.membership プロジェクトでした。

今、私は mvc4 に切り替えたいのですが、それが でSystem.Web.Security.FormsAuthenticationクラスをAccount controller使用していることに気付きましたWebMatrix.WebData.Security

カスタム (nhibernate かどうか) を記述する方法に関する有用なチュートリアルを誰かが知っていれば、simple membership provider それは素晴らしいことです。

ありがとう

4

1 に答える 1

1

The System.Web.Security.FormsAuthentication has absolutely nothing to do with Membership. This is used to emit forms authentication cookies and this was class was present since ASP.NET 1.0 and is not specific to MVC4.

The SimpleMembership Provider is indeed a new custom membership provider that was designed for ASP.NET MVC 4 and it uses SQL Server to query the database.

You could still use your custom membership provider in MVC4 without any problems. The Simple Membership Provider was created in order for users that do not have any existing membership provider code to get started with MVC. Since you already have a working implementation with NHibernate I would recommend you using that. The Simple Membership Provider was not intended to be customized that way.

于 2013-02-07T21:25:25.763 に答える