C# 登录请求错误80131904,登录失败

C# 登录请求错误80131904,登录失败,c#,sql-server,winforms,C#,Sql Server,Winforms,当我想安排我的设置时,我得到了以下错误:数据恢复: (0x80131904):无法打开登录请求的数据库“myfile location”,登录失败。 用户“myuser”登录失败。 我猜连接字符串是错的 正是这样。您需要通过在配置文件中指定用户ID和密码为其提供正确的凭据,或者为其提供trusted_connection=true以使用Windows身份验证,或者为您想要连接的用户在数据库中添加用户帐户,因为您不知道如何关闭该帐户@ <connectionStrings> &

当我想安排我的设置时,我得到了以下错误:数据恢复:

(0x80131904):无法打开登录请求的数据库“myfile location”,登录失败。 用户“myuser”登录失败。

我猜连接字符串是错的


正是这样。您需要通过在配置文件中指定用户ID和密码为其提供正确的凭据,或者为其提供trusted_connection=true以使用Windows身份验证,或者为您想要连接的用户在数据库中添加用户帐户,因为您不知道如何关闭该帐户@
<connectionStrings>
    <add name="mehreparsian.Properties.Settings.lastmehreparsianConnectionString"
        connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|datadirectory|\lastmehreparsian.mdf;Integrated Security=True;Connect Timeout=30"
        providerName="System.Data.SqlClient" />
</connectionStrings>