我正在尝试连接到Unity中的SQL Server,但它会引发错误:
SocketException:地址与请求的协议不兼容
System.Net.Sockets.Socket.Connect(System.Net.EndPoint remoteEP,Boolean requireSocketPolicy)
System.Net.Sockets.Socket + Worker.Connect()
Rethrow as TdsInternalException:服务器不存在或连接被拒绝 Mono.Data.Tds.Protocol.TdsComm..ctor(System.String dataSource,Int32 port,Int32 packetSize,Int32 timeout,TdsVersion tdsVersion)
Mono.Data.Tds.Protocol.Tds..ctor(System.String dataSource,Int32 port,Int32 packetSize,Int32 timeout,TdsVersion tdsVersion)
Mono.Data.Tds.Protocol.Tds70..ctor(System.String服务器,Int32端口,Int32 packetSize,Int32超时,TdsVersion版本)
Mono.Data.Tds.Protocol.Tds80..ctor(System.String服务器,Int32端口,Int32 packetSize,Int32超时)
Mono.Data.Tds.Protocol.TdsConnectionPoolManager.CreateConnection(Mono.Data.Tds.Protocol.TdsConnectionInfo info)
Mono.Data.Tds.Protocol.TdsConnectionPool.GetConnection()
System.Data.SqlClient.SqlConnection.Open()
Rethrow as SqlException:服务器不存在或连接被拒绝 System.Data.SqlClient.SqlConnection.Open()
我的SQL Server连接字符串(它在Visual Studio中正常工作):
<a href="{{ route('member.edit',$data->id) }}"><i class="fa fa-pencil-square-o" aria-hidden="true"></i>Edit</a>
SQL Server配置管理器屏幕截图:
注意:我认为这个问题与SQL Server配置不一致。