本文介绍了Azure的连接字符串例外"发生与网络相关的特定orinstance错误"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试使用以下连接字符串连接到SQL Azure的

When attempting to connect to SQL Azure with the following connection string

服务器= TCP:SERVER.database.windows.net,1433;数据库=数据库名;用户ID = USER @服务器;密码=密码; Trusted_Connection = FALSE;加密= TRUE

从本地运行ASP.NET MVC应用程序,我收到此异常:

from a locally running ASP.NET MVC application I receive this exception:

{与网络相关的或
  例如发生特定的错误,而
  建立SQL连接
  服务器。服务器没有被发现或
  无法访问。验证
  实例名称是否正确,以及SQL
  服务器被配置为允许远程
  连接。 (provider:TCP提供,
  错误:0 - 没有这样的主机已知)}

我意识到这是一个比较通用的错误消息。

I realize this is a relatively generic error message.

在排除故障的问题我已经打开入站,并通过端口1433我的Windows防火墙出站流量:

In troubleshooting the problem I have opened inbound and outbound traffic through my Windows firewall on port 1433:

的netsh advfirewall防火墙添加规则名称=打开端口80DIR =行动=允许协议= TCP将localPort = 80

我已经配置了Azure的防火墙,以接受来自我的IP地址的连接以及允许其他Windows Azure服务访问此服务器。我的可以的通过SQL Server Management Studio中2008 R2连接到Azure数据库。我的不能的通过

I have configured the Azure firewall to accept connections from my IP address as well to "Allow other Windows Azure services to access this server." I can connect to the Azure database via SQL Server Management Studio 2008 R2. I cannot telnet to the database via

远程登录SERVER.database.windows.net 1433

相关堆栈溢出的问题:




  • Problem while connecting to cloud database
  • SQL Azure : Connection to SQL Azure throws exception

我觉得我必须忽视的东西基本。是否有我错过了其他故障排除步骤?

I feel like I must be overlooking something basic. Are there other troubleshooting steps I have missed?

推荐答案

不好意思说,这一问题引起的,因为我胖手指的服务器名称。很显然,我真的很可怕的孤独编程这些天。谢谢所有上述这引起了我的意见,不断问自己,我错过了什么。

Embarrassed to say that that this issue was caused because I fat fingered the server name. Apparently, I really am terrible at solitary programming these days. Thank you to all of the comments above which caused me to keep asking myself what am I missing.

这篇关于Azure的连接字符串例外"发生与网络相关的特定orinstance错误"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 02:01