具有IP,端口和基础提供程序的连接字符串在打开时失败 [英] connection string with IP,Port and The underlying provider failed on Open

查看:104
本文介绍了具有IP,端口和基础提供程序的连接字符串在打开时失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨伙计们

i创建了一个需要连接到sql server 2008数据库的程序,这个程序将运行在5台计算机上,通过无线调制解调器[或路由器] <连接到一台计算机br />
,数据库在该计算机上。所以我应该如何在其他计算机上设置连接字符串。

安装在该计算机上的sql server更多的是使用Windows身份验证。

和连接字符串是这样的:

hi guys
i have created a program that needs to connect to sql server 2008 database, and this program will run on 5 computers, that connected to one computer via a wireless modem[or router]
and the database is on that computer. so how should i set connection string in other computers.
one more thing the sql server that installed on that computer is on windows authentication.
and the connection string is like this:

<add name="PgDBEntities" connectionstring="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="Data Source=192.168.1.101,1433;Initial Catalog=PgDB;Integrated Security=True;MultipleActiveResultSets=True"">
      providerName="System.Data.EntityClient" />;



当我尝试登录时我得到了这个错误=基础提供商在Open

上失败了所以我现在该怎么办?


when i try to login i got this error = The underlying provider failed on Open
so what should i do now?

推荐答案

无论wifi还是有线。要在客户端和SQL Server之间使用窗口身份验证/可信连接/集成安全性,服务器需要能够验证客户端用户身份。这只能在具有kerberos的域中或在本地环境中实现,而不能在工作组中或在独立机器之间实现。如果这些不适用,您可能需要使用sql本地身份验证(用户名和密码)。

检查一下这个理论:http://msdn.microsoft.com/en-us/library/bb669066.aspx [ ^ ]
Does not matter wifi or wired. To have window authentication / trusted connection / integrated security working between the client and the sql server, the server needs to be able to verify client user identity. This can be achieved only in a domain with kerberos or in local environment, but not in a workgroup or between independent machines. If these do not apply, you will probably need to use sql native authentication (username and password).
Check this out for some theory: http://msdn.microsoft.com/en-us/library/bb669066.aspx[^]


这篇关于具有IP,端口和基础提供程序的连接字符串在打开时失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆