我的Azure Web应用程序未连接到Azure DB。 [英] My Azure web application is not connecting to Azure DB.

查看:218
本文介绍了我的Azure Web应用程序未连接到Azure DB。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请任何一次可以帮助我从azure web应用程序连接azure数据库,因为它在我的本地机器上工作正常。  

Please any once can help me to connecting to azure db from azure web app as its working fine in my local machine.  

默认连接显示如下,

数据源= tcp:XXXX.database.windows.net,1433;初始目录= XXXX_db;用户标识= XXXXX;密码= XXXXXX;

default connection is showing like this,
Data Source=tcp:XXXX.database.windows.net,1433;Initial Catalog=XXXX_db;User Id=XXXXX;Password=XXXXXX;

谢谢,

Lokesh

推荐答案

嗨Lokesh,

Hi Lokesh,

您可能需要检查数据库的Azure防火墙/安全设置。

You may have to check your Azure firewall/security settings for the database.

以下是详细指南:

https://azure.microsoft.com/en-us/documentation/articles/sql-database-configure-firewall-settings/

我复制/粘贴了以下步骤,但上面的URL也有详细的截图(预览门户网站):

I have copy/pasted the steps below, but the URL above also has detailed screenshots (Preview portal):


  1. 通过以下网址登录Azure预览门户,位于
    http://portal.azure.com/
  2. 在左侧横幅中,单击"全部浏览"。将显示"浏览"刀片。

  3. 滚动并单击SQL Server。将显示SQL Server刀片。 (在门户中查找Azure SQL数据库服务器)
  4. 为方便起见,请单击最小化控件。早期浏览刀片。

  5. 在过滤器文本框中,开始键入服务器的名称。显示您的行。

  6. 单击服务器的行。将显示服务器的刀片。

  7. 在服务器刀片上,单击"设置"。将显示"设置"刀片。

  8. 单击"防火墙"。将显示"防火墙设置"边栏选项卡。
  9. 单击"添加客户端IP"。在第一个文本框中键入新规则的名称。

  10. 键入要启用的范围的低IP地址值和高IP地址值。 (将低值结束为.0,高值为.255可能很方便。  添加
    允许的IP地址范围
  11. 点击保存。

  1. Log in through the Azure preview portal, at http://portal.azure.com/.
  2. In the left banner, click BROWSE ALL. The Browse blade is displayed.
  3. Scroll and click SQL servers. The SQL servers blade is displayed. (Find your Azure SQL Database server in the portal)
  4. For convenience, click the minimize control on the earlier Browse blade.
  5. In the filter text box, start typing the name of your server. Your row is displayed.
  6. Click the row for your server. A blade for your server is displayed.
  7. On your server blade, click Settings. The Settings blade is displayed.
  8. Click Firewall. The Firewall Settings blade is displayed.
  9. Click Add Client IP. Type in a name for your new rule into the first text box.
  10. Type in the low and high IP address values for the range you want to enable. (It can be handy to have the low value end with .0 and the high with .255. Add an IP address range to allow)
  11. Click Save.

希望有所帮助! : - )

Hope that helps! :-)

Shahed


这篇关于我的Azure Web应用程序未连接到Azure DB。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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