ASP.NET 將 MemberShip 既 資料庫 轉移 至自己 既 資料庫 上
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\
執行 -> aspnet_regsql.exe
web.conf |
<connectionStrings> <add name="ConnStr1" connectionString="Data Source=(Host Name);Initial Catalog=(Database Schema);Persist Security Info=True;User ID=(ID);password=(Password)"> </add> </connectionStrings> <system.web> <roleManager enabled="true" defaultProvider="SqlProvider" > <providers> <add name="SqlProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ConnStr1" applicationName="/" /> </providers> </roleManager> <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15"> <providers> <add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ConnStr1" applicationName="/" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" /> </providers> </membership> <authentication mode="Forms" > <forms loginUrl="login.aspx"></forms> </authentication> </system.web> |
係 Web Site Administration Tool
設定 Provider 指定係 ConnectionString 指定既資料庫上面 ….
完成啦 ….