我有一个连接到SQLServer Express数据库文件以用于成员资格和数据存储的网站。因此我有两个.mdf文件。下面是连接字符串:SQLExpress - 如何为sql数据文件设置用户名/密码
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=; ";
现在删除并重新安装的网站,我在一个连接established.Here的部分已经越来越许多错误后的错误:
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中删除它并重新安装它。我被建议设置用户名和密码,并删除集成安全。但我不知道如何为数据文件设置用户名/密码。