[英]Can't access Azure SQL Database from 1&1 Windows server
I host my ASP.NET app on a 1&1 Windows Server. 我在1&1 Windows Server上托管我的ASP.NET应用程序。 My database is hosted on Azure.
我的数据库托管在Azure上。 My application try to access the database but it doesn't work : "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"
我的应用程序尝试访问数据库但它不起作用:“连接尝试失败,因为连接方在一段时间后没有正确响应,或者建立的连接失败,因为连接的主机无法响应”
I tried to open the firewall of my database to the worl (0.0.0.0 to 255.255.255.255) but nothing. 我试图打开我的数据库的防火墙到worl(0.0.0.0到255.255.255.255),但没有。
Here is my connection string : 这是我的连接字符串:
connectionString="Data Source=servername.database.windows.net;Initial Catalog=NameDB;Persist Security Info=True;User ID=USERID;Password=PASSWORD;Connect Timeout=30;Encrypt=True;TrustServerCertificate=True"
In my local computer it works perfectly and when i hosted my app on azure it worked too. 在我的本地计算机上,它工作得很好,当我在azure上托管我的应用程序时,它也可以工作。 But now, I am lost.
但现在,我迷失了。
Any idea ? 任何想法 ?
@Z. @Z。 Mohamed , Here are some steps to troubleshoot Azure SQL connectivity issue you can try to see everything is configured correctly.
Mohamed,以下是解决Azure SQL连接问题的一些步骤,您可以尝试查看所有内容都已正确配置。 Some of the common connectivity error messages that you would see while connecting to SQL Azure as listed below:
连接到SQL Azure时会看到的一些常见连接错误消息,如下所示:
Login to your SQL Azure portal, Select your project and then switch to the Firewall setting tab. 登录到您的SQL Azure门户,选择您的项目,然后切换到防火墙设置选项卡。 Verify that the SQL Azure firewall is configured to allow remote connections from the IP address(es) that you will be connecting from.
验证SQL Azure防火墙是否配置为允许来自将要连接的IP地址的远程连接。
Open a command prompt window and use the PING command to confirm that name resolution successfully translates your logical server name to an IP address. 打开命令提示符窗口并使用PING命令确认名称解析成功将逻辑服务器名称转换为IP地址。 The “Request timed out” message shown below is expected because SQL Azure will never respond to ping requests.
预期下面显示的“请求超时”消息是因为SQL Azure永远不会响应ping请求。
If you encountered difficulties in Section 2 then you are not reaching the VIP and are instead being blocked between your client and the VIP. 如果您在第2部分遇到困难,那么您没有到达VIP,而是在您的客户和VIP之间被阻止。 The below steps may be helpful, but at this point a network investigation by your ISP or network engineer is required
以下步骤可能会有所帮助,但此时需要您的ISP或网络工程师进行网络调查
Many firewall products allow individual users and domain administrators to block or restrict outbound access on a specific port and or destination IP address. 许多防火墙产品允许单个用户和域管理员阻止或限制特定端口和/或目标IP地址的出站访问。 Therefore it is necessary to check the outbound rules that are defined on the local machine as well as any routers or proxies that are in the network path.
因此,有必要检查在本地计算机上定义的出站规则以及网络路径中的任何路由器或代理。 Rules must allow outbound access on port 1433 to destination IP address range 65.55.
规则必须允许端口1433上的出站访问到目标IP地址范围65.55。 .
。 .
。 Most firewalls also allow the specification of DNS names to allow.
大多数防火墙还允许允许DNS名称的规范。 Network products that might block access include:
可能阻止访问的网络产品包括:
For complete guide please refer . 如需完整指南,请参阅 。 Hope it helps.
希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.