请容忍我,因为我是第一次这样做。我做了一个简单的网络应用程序,我正在尝试迁移到在线网站。迁移后出现错误:[SqlException (0x80131904):建立与SQL Server的连接时出现网络相关或特定于实例的错误。
我试图弄清楚,我只有localDB连接字符串。我需要再做一个吗?我该怎么做?
这是我在webconig中得到的。
<connectionStrings>
<add name="KlientEntities" connectionString="metadata=res://*/Models.Klient.csdl|res://*/Models.Klient.ssdl|res://*/Models.Klient.msl;provider=System.Data.SqlClient;provider connection string="data source=(LocalDb)\MSSQLLocalDB;initial catalog=Test;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
这是我从托管中得到的:
Classic ASP (ADO Library) Provider=SQLOLEDB;Data source=mssql4.webio.pl,2401;Initial catalog=databaseName;User ID=Username;Password=password;
ASP.NET (ADO.NET Library) Server=mssql4.webio.pl,2401;Database=databaseName;Uid=Username;Password=password;发布于 2018-08-17 00:50:38
您需要更新(已部署的)连接字符串,使其与数据库的字符串匹配。
这就是这一部分:
provider=System.Data.SqlClient;provider connection string="data source=(LocalDb)\MSSQLLocalDB;initial catalog=Test;
它当前引用了LocalDb
https://stackoverflow.com/questions/51881486
复制相似问题