1

を使ってログインシステムを作りたいaspnet_regsql.exe

aspnet_regsql.exeインストールしたらSQL Server、次に何をすればよいですか?

aspnet_regsql.exeインストール後、誰かが順を追って説明してくれますか?

4

3 に答える 3

3

ここに書くには少し多すぎますが、優れた一連の記事がここにあり ます http://www.4guysfromrolla.com/articles/120705-1.aspx

于 2011-07-21T13:12:33.333 に答える
1

asp .net 認証について説明しているサイトは次のとおりです - http://www.codeproject.com/KB/aspnet/ASPDOTNETauthentication.aspx

于 2011-07-21T13:12:56.563 に答える
0

次の手順を実行します:

データベースに aspnet テーブルをインストールしたら、web.config ファイルに移動します。 <connectionStrings> <add name="UserConnectionString" providerName="System.Data.SqlClient" connectionString="User Id = sa; Password=sqlserver2008; Initial Catalog=UserDATABASE; Data Source = DATA_NET_139\SQLEXPRESS; "/> </connectionStrings>

メンバーシップセクションで、これらの行を追加します

<membership> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="UserConnectionString" applicationName="SampleApplication"/> </providers> </membership> <profile> <providers> <clear/> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="UserConnectionString" applicationName="SampleApplication"/> </providers> </profile> <roleManager enabled="false"> <providers> <clear/> <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="UserConnectionString" applicationName="SampleApplication"/> </providers> </roleManager>

この後、CreateUserWizar コントロールを aspx ページにドラッグして使用します。データベースにデータを挿入するためのコードを書く必要はありません asp.net は自動的に行います。

<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" OnCreatedUser="CreateUserWizard1_CreatedUser"> <WizardSteps> <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server"> </asp:CreateUserWizardStep> <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server"> </asp:CompleteWizardStep> </WizardSteps> </asp:CreateUserWizard>

データベース名のみを変更します。

于 2011-07-21T13:52:51.110 に答える