Asp.net mvc 4 将开源mvc forum 1.5与asp.net标识表集成?
Mvc forum 1.5使用成员表,但我的应用程序创建Mvc 5+实体框架6+asp.net标识表。如何将Mvc forum与我的应用程序集成。Asp.net mvc 4 将开源mvc forum 1.5与asp.net标识表集成?,asp.net-mvc-4,Asp.net Mvc 4,Mvc forum 1.5使用成员表,但我的应用程序创建Mvc 5+实体框架6+asp.net标识表。如何将Mvc forum与我的应用程序集成。Hi Mahaveer, Hi Mahaveer, You will have to do following changes in connection string and system.web: The UserManagement_Connection is basically a connection string <add
Hi Mahaveer,
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.
:)
您必须对连接字符串和system.web进行以下更改:
UserManagement\u连接基本上是一个连接字符串
然后可以直接在应用程序中使用成员函数
如果你面临任何问题,请告诉我。
:)
感谢您的回复,但我只使用asp.net标识表来管理用户,因此我在标识中迁移了成员表。但mvc论坛用户数据使用成员表。