我正在编写一个简单的C#程序,并希望使用SQL服务器来存储来自少数用户的条目。它在本地工作正常,但我无法使用TCP进行连接。我在配置管理器中设置了远程连接并启用了TCP。我不断收到这个错误。从C#应用程序远程连接到SQL Server 2012的最佳方式
The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
我的连接字符串是
“数据源= 127.0.0.1 \ WEBSTORAGE;网络库= DBMSSOCN;初始目录=字符;用户ID =用户ID,密码=密码;”
您可以使用SSMS连接到服务器吗? – MilkyWayJoe