我已将.mdf移动到生产 sql Server 数据库,但是当我更新"defaultconnection"连接字符串时,身份验证提供程序会引发错误。 我的连接字符串<add name="DefaultConnection" connectionString="Data Source=(LocalDb)v11.0;Initial Catalog=aspnet-MvcApplication1-20181218212041;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnet-MvcApplication1-20181218212041.mdf" providerName="System.Data.SqlClient" />
这必须很容易解决。 既然我已经将生产数据库移动到我的生产 sql,有人可以让我知道这里需要什么吗?这不是SQLExpress。 谢谢!
那么你的ConnectionString
应该如下所示:
<add name="DefaultConnection" connectionString="Data Source= YourServerNameYourSqlServerInstanceName;Initial Catalog=YourDatabaseName;Integrated Security=False;User Id=YourUsername;
Password=YourPassword; providerName="System.Data.SqlClient" />