连接性问题 [英] Connectivity Issues

查看:85
本文介绍了连接性问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去的几天中,我们一直在开发一个Web应用程序,从坚如磐石变为几乎无法工作.一次几个小时,它将无法连接其Azure SQL数据库:

Over the last few days a web application we have been developing has gone from being rock solid to barely working. For several hours at a time it will fail to connect its Azure SQL Database:

System.Data.SqlClient.SqlException(0x80131904):与网络相关或特定于实例的建立与SQL Server的连接时发生错误.找不到或找到服务器 无法访问.验证实例名称正确,并且已将SQL Server配置为允许远程连接. (提供者:TCP提供程序,错误:0-连接尝试失败,因为一段时间后被连接方未正确响应, 或建立的连接失败,因为已连接的主机无法响应.)---> System.ComponentModel.Win32Exception(10060):连接尝试失败,因为经过一段时间或已建立的连接,被连接方未正确响应 失败,因为连接的主机未能响应. 然后在其他时间数据库将正常工作,但对其他地方托管的API的调用将因连接问题而失败.

System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. 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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) ---> System.ComponentModel.Win32Exception (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. Then at other times the database will work but calls to APIs hosted elsewhere will fail with connectivity issues.

这两个连接问题加在一起意味着我们只能在50次中返回1页...但是偶尔它可以完成所有工作(因此我们知道它不是像错误的连接字符串或URL那样愚蠢的东西).我们可以寻找问题的任何想法.蔚蓝 门户认为根本没有问题.

These two connectivity issues combined mean we only get a page back 1 in 50 times... but very occasionally it does all work (so we know it is not something silly like a wrong connection string or URL). Any ideas where we could look for problems. The Azure portal thinks there are no issues at all.

推荐答案

您对问题的原因是正确的.通常是由于错误的连接字符串引起的.

You are right about the cause of the issue. It'll usually come due to a wrong connection string.


请确保您具有正确的连接字符串和

Please make sure you have correct connection string and

我有一个问题要问您是否正在VM中使用Azure SQL数据库(或)Azure SQL Server?

I have a question for you that are you using Azure SQL Database (or) Azure SQL Server in VM?

如果您在本地/VM上使用SQL Server,请确保打开端口1434并且sql服务运行正常

If you are using SQL Server on-prem/VM then make sure you open the port 1434 and sql service is running fine



这篇关于连接性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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