2014-02-23 26 views
0

我想知道如何將我的Web角色連接到現有的SQL數據庫?在Web角色的屬性設置選項卡下我試圖添加新的設置與連接字符串到我的數據庫,但是當我嘗試登錄(我使用asp.net身份,並使用代碼第一次遷移我已成功播種數據庫),我得到這個錯誤:如何使用sql數據庫設置Azure Web服務

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: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)] 

那麼什麼是正確的方式來連接我的數據庫到web角色?

回答

1

我的連接字符串有一個愚蠢的問題,我解決了它。

0

查看SQL Azure數據庫的儀表板。點擊「管理允許的IP地址」鏈接。

確保在允許的服務下將Windows Azure服務設置爲YES。

Azure上的所有SQL數據庫都需要可訪問它們的IP範圍的白名單。

+0

謝謝,但選擇YES – hyperN

相關問題