「スクリプトの生成」を使用して ASPNETDB.mdf をサーバーにアップロードしました。問題は、メンバーシップのために接続する方法がわからないことです。(ログイン コントロールなど) ConnectionString はどこにありますか?
3 に答える
1
Web 構成のデータ ソース タグを更新します。
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=<<PATH Goes Here>>;Persist Security Info=False;
于 2009-04-21T21:33:44.763 に答える
0
アプリケーションの web.config ファイルを変更して、データベースを指すように LocalSqlServer 接続文字列を再定義します。
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer"
connectionString="server=.;database=aspnetdb;
integrated security=sspi;"/>
</connectionStrings>
メンバーシップ プロバイダーが "LocalSqlServer" を指していない場合は、web.config でも変更できます。
<membership>
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, ..."
connectionStringName="LocalSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="/"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""
/>
</providers>
</membership>
于 2009-04-21T21:29:59.233 に答える
0
接続文字列は web.config ファイルにあります。
于 2009-04-21T08:06:09.807 に答える