メンバーシップとデータ ストレージのために SQLServer Express データベース ファイルに接続する Web サイトを持っているので、2 つの .mdf ファイルがあります。接続文字列は次のとおりです。
public static string ASPNETDB = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.mdf;Integrated Security=True;User Instance=True;User ID=;Password=; ";
public static string Dok = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\dok.mdf;Integrated Security=True;User Instance=True;User ID=;Password=; ";
ウェブサイトを削除して再インストールした後、接続が確立されている部分で多数のエラーが発生しています。エラーは次のとおりです。
Unable to open the physical file "C:\Inetpub\wwwroot\BSHHD\App_Data\aspnetdb_log.ldf".
Operating system error 5: "5(failed to retrieve text for this error. Reason: 1815)".
Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
File activation failure. The physical file name "C:\Inetpub\wwwroot\BSHHD\App_Data
\aspnetdb_log.ldf" may be incorrect.
The log cannot be rebuilt because there were open transactions/users when the database
was shutdown, no checkpoint occurred to the database, or the database was read-only.
This error could occur if the transaction log file was manually deleted or lost due to
a hardware or environment failure.
ウェブサイトに変更を加えていないので、非常に奇妙です。IISから削除して再インストールしました。ユーザー名とパスワードを設定し、統合セキュリティを削除するように提案されました。しかし、データファイルにユーザー名/パスワードを設定する方法がわかりません。