1
Mvc论坛1.5使用会员表,但我的应用程序创建mvc 5 +实体框架6 + asp.net身份table.how与我的应用程序整合mvc论坛。集成开源mvc论坛1.5与asp.net身份表?
Mvc论坛1.5使用会员表,但我的应用程序创建mvc 5 +实体框架6 + asp.net身份table.how与我的应用程序整合mvc论坛。集成开源mvc论坛1.5与asp.net身份表?
Hi Mahaveer,
You will have to do following changes in connection string and system.web:
The UserManagement_Connection is basically a connection string
<add name="UserManagement_Connection" connectionString="Data Source=.\SQLExpress;Initial Catalog=ASPNETDB;Integrated Security=false;User Id=userId;Password=pwd" providerName="System.Data.SqlClient" />
<system.web>
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
<providers>
<clear />
<add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="UserManagement_Connection" applicationName="myapplication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="RoleProvider">
<providers>
<add connectionStringName="UserManagement_Connection" applicationName="myapplication" name="RoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>
Then directly you can use the Membership functions in your application
Let me know if you face any issue.
:)
感谢您的回应,但我只使用asp.net身份表来管理用户,所以我已经在identity.but mvc论坛用户数据使用成员资格表中迁移成员表。 – 2014-11-03 13:04:53